mirror of
https://github.com/darwincereska/nvim-config.git
synced 2026-02-12 00:44:42 -05:00
feat(init): first init
This commit is contained in:
41
lazy-lock.json
Normal file
41
lazy-lock.json
Normal file
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
|
||||
"LuaSnip": { "branch": "master", "commit": "ccf25a5452b8697a823de3e5ecda63ed3d723b79" },
|
||||
"barbar.nvim": { "branch": "master", "commit": "fb4369940a07dda35fa4d7f54cf4a36aa00440e6" },
|
||||
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
|
||||
"cmp-cmdline": { "branch": "main", "commit": "d126061b624e0af6c3a556428712dd4d4194ec6d" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "bd5a7d6db125d4654b50eeae9f5217f24bb22fd3" },
|
||||
"cmp-path": { "branch": "main", "commit": "c642487086dbd9a93160e1679a1327be111cbc25" },
|
||||
"cmp-spell": { "branch": "master", "commit": "694a4e50809d6d645c1ea29015dad0c293f019d6" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
|
||||
"dropbar.nvim": { "branch": "master", "commit": "ce202248134e3949aac375fd66c28e5207785b10" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
|
||||
"image.nvim": { "branch": "master", "commit": "446a8a5cc7a3eae3185ee0c697732c32a5547a0b" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "ed4dc336a73c18da6fea6e1cf7ad6e1b76d281eb" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "3946f0122255bc377d14a59b27b609fb3ab25768" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "35ec9e1425c2f9a36f556893336af4f302c63214" },
|
||||
"mason.nvim": { "branch": "main", "commit": "ad7146aa61dcaeb54fa900144d768f040090bff0" },
|
||||
"mini.icons": { "branch": "main", "commit": "284798619aed9f4c1ac1b9417b9a5e3b4b85ef3a" },
|
||||
"mini.nvim": { "branch": "main", "commit": "d1a91582bf2d16026ae84292874c70fb2d0ffe42" },
|
||||
"neo-tree.nvim": { "branch": "main", "commit": "fa61e064895d6eff509f5fcb7b2b77b195c4291f" },
|
||||
"nord.nvim": { "branch": "main", "commit": "07647ad23e5b7fc1599a841dcd8f173b9aeb0419" },
|
||||
"notes.nvim": { "branch": "main", "commit": "d525da711fcf19461a6930d467782e5d26d7932b" },
|
||||
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "7a2c97cccd60abc559344042fefb1d5a85b3e33b" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "a7bcf1d88069fc67c9ace8a62ba480b8fe879025" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "2b52bc2190c8efde2e4de02d829a138666774c7c" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
||||
"nvim-ufo": { "branch": "main", "commit": "72d54c31079d38d8dfc5456131b1d0fb5c0264b0" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "8dcb311b0c92d460fac00eac706abd43d94d68af" },
|
||||
"oil.nvim": { "branch": "master", "commit": "7e1cd7703ff2924d7038476dcbc04b950203b902" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
||||
"presenting.nvim": { "branch": "main", "commit": "e78245995a09233e243bf48169b2f00dc76341f7" },
|
||||
"promise-async": { "branch": "main", "commit": "119e8961014c9bfaf1487bf3c2a393d254f337e2" },
|
||||
"render-markdown.nvim": { "branch": "main", "commit": "bfd67f1402b97ac619cb538f4bbaed12a7fa89aa" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" },
|
||||
"toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" },
|
||||
"universal-clipboard.nvim": { "branch": "main", "commit": "48a625ab592633a05446ef66031611593a5b55d9" },
|
||||
"vim-be-good": { "branch": "master", "commit": "0ae3de14eb8efc6effe7704b5e46495e91931cc5" },
|
||||
"vim-table-mode": { "branch": "master", "commit": "e156dbbedce0bbf61c0919db7678fa246fabd616" }
|
||||
}
|
||||
BIN
lua/.DS_Store
vendored
Normal file
BIN
lua/.DS_Store
vendored
Normal file
Binary file not shown.
37
lua/config/keymap.lua
Normal file
37
lua/config/keymap.lua
Normal file
@@ -0,0 +1,37 @@
|
||||
-- Clear search if in NORMAL mode
|
||||
vim.keymap.set('n', "<Esc>", "<CMD>noh<CR><Esc>", { silent = true, desc = "Clear search" })
|
||||
|
||||
-- Add Shift+Tab support
|
||||
vim.keymap.set("n", "<Tab>", ">>", { silent = true })
|
||||
vim.keymap.set("n", "<S-Tab>", "<<", { silent = true })
|
||||
vim.keymap.set("v", "<Tab>", ">gv", { silent = true })
|
||||
vim.keymap.set("v", "<S-Tab>", "<gv", { silent = true })
|
||||
vim.keymap.set("i", "<S-Tab>", "<C-d>", { silent = true })
|
||||
|
||||
-- File tree keybinds
|
||||
vim.keymap.set("n", "<D-b>", "<CMD>Neotree toggle<CR>", { silent = true, desc = "Open file tree" })
|
||||
vim.keymap.set("n", "<D-S-e>", "<CMD>Neotree focus<CR>", { silent = true, desc = "Focus on file tree" })
|
||||
|
||||
-- Telescope keybinds
|
||||
vim.keymap.set("n", "<D-p>", "<CMD>Telescope find_files<CR>", { silent = true, desc = "Open fuzzy finder" })
|
||||
|
||||
-- Tabs
|
||||
vim.keymap.set("n", "<A-Tab>", "<CMD>BufferNext<CR>", { silent = true, desc = "Cycle to next tab"})
|
||||
vim.keymap.set("n", "<A-S-Tab>", "<CMD>BufferPrevious<CR>", { silent = true, desc = "Cycle to previous tab" })
|
||||
vim.keymap.set("n", "<A-w>", "<CMD>BufferClose<CR>", { silent = true, desc = "Close tab" })
|
||||
|
||||
-- File manager
|
||||
vim.keymap.set("n", "<D-o>", "<CMD>Oil<CR>", { silent = true , desc = "Open parent directory" })
|
||||
|
||||
-- Comment toggle
|
||||
vim.keymap.set("n", "<D-/>", "gcc", { remap = true, desc = "Toggle comment" })
|
||||
vim.keymap.set("v", "<D-/>", "gc", { remap = true, desc = "Toggle comment" })
|
||||
vim.keymap.set("i", "<D-/>", "<C-o>gcc", { remap = true, desc = "Toggle comment" })
|
||||
|
||||
-- Small text shortcuts
|
||||
vim.keymap.set("i", "<D-Del>", "<C-u>", { desc = "Clear Line" })
|
||||
vim.keymap.set("i", "<A-BS>", "<C-w>", { desc = "Delete word backwards" })
|
||||
|
||||
-- Terminal
|
||||
vim.keymap.set({ "n", "i", "v", "t" }, "<D-y>", "<CMD>ToggleTerm<CR>", { remap = true, silent = true, desc = "Toggle terminal" })
|
||||
|
||||
41
lua/config/lazy.lua
Normal file
41
lua/config/lazy.lua
Normal file
@@ -0,0 +1,41 @@
|
||||
-- Bootstrap lazy.nvim
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
||||
if vim.v.shell_error ~= 0 then
|
||||
vim.api.nvim_echo({
|
||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||
{ out, "WarningMsg" },
|
||||
{ "\nPress any key to exit..." },
|
||||
}, true, {})
|
||||
vim.fn.getchar()
|
||||
os.exit(1)
|
||||
end
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
-- Make sure to setup `mapleader` and `maplocalleader` before
|
||||
-- loading lazy.nvim so that mappings are correct.
|
||||
-- This is also a good place to setup other settings (vim.opt)
|
||||
vim.opt.relativenumber = true
|
||||
vim.opt.clipboard = "unnamedplus"
|
||||
vim.opt.tabstop = 4
|
||||
vim.opt.softtabstop = 4
|
||||
vim.opt.shiftwidth = 4
|
||||
vim.opt.expandtab = true
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = "\\"
|
||||
vim.o.foldenable = true
|
||||
|
||||
-- Setup lazy.nvim
|
||||
require("lazy").setup({
|
||||
spec = {
|
||||
{ import = "plugins" },
|
||||
},
|
||||
-- Configure any other settings here. See the documentation for more details.
|
||||
-- colorscheme that will be used when installing plugins.
|
||||
install = { colorscheme = { "nord" } },
|
||||
-- automatically check for plugin updates
|
||||
checker = { enabled = true },
|
||||
})
|
||||
29
lua/config/plugin/comment.lua
Normal file
29
lua/config/plugin/comment.lua
Normal file
@@ -0,0 +1,29 @@
|
||||
require("Comment").setup({
|
||||
-- Add a space b/w comment and the line
|
||||
padding = true,
|
||||
-- Whether the cursor should stay at its position
|
||||
sticky = true,
|
||||
-- Lines to be ignored while (un)comment
|
||||
ignore = nil,
|
||||
-- LHS of toggle mappings in NORMAL mode
|
||||
toggler = {
|
||||
line = 'gcc', -- Line-comment toggle keymap
|
||||
block = 'gbc', -- Block-comment toggle keymap
|
||||
},
|
||||
-- LHS of operator-pending mappings in NORMAL and VISUAL mode
|
||||
opleader = {
|
||||
line = 'gc', -- Line-comment keymap
|
||||
block = 'gb', -- Block-comment keymap
|
||||
},
|
||||
-- LHS of extra mappings
|
||||
extra = {
|
||||
above = 'gcO', -- Add comment on the line above
|
||||
below = 'gco', -- Add comment on the line below
|
||||
eol = 'gcA', -- Add comment at the end of line
|
||||
},
|
||||
-- Enable keybindings
|
||||
mappings = {
|
||||
basic = true, -- Operator-pending mapping; `gcc` `gbc` `gc[count]{motion}` `gb[count]{motion}`
|
||||
extra = true, -- Extra mapping; `gco`, `gcO`, `gcA`
|
||||
},
|
||||
})
|
||||
27
lua/config/plugin/neo-tree.lua
Normal file
27
lua/config/plugin/neo-tree.lua
Normal file
@@ -0,0 +1,27 @@
|
||||
require("neo-tree").setup({
|
||||
close_if_last_window = true,
|
||||
hijack_netrw_behavior = "disabled",
|
||||
filesystem = {
|
||||
filtered_items = {
|
||||
hide_gitignored = true,
|
||||
hide_hidden = true,
|
||||
},
|
||||
follow_current_file = { enabled = true },
|
||||
},
|
||||
git_status = {
|
||||
enable = true,
|
||||
},
|
||||
window = {
|
||||
position = "left",
|
||||
auto_expand_width = false,
|
||||
hijack_netrw_behavior = "disabled",
|
||||
width = 35,
|
||||
mappings = {
|
||||
["<space>"] = "toggle_node",
|
||||
["<2-LeftMouse>"] = "open",
|
||||
["e"] = function() vim.api.nvim_exec("Neotree focus filesystem", true) end,
|
||||
["g"] = function() vim.api.nvim_exec("Neotree focus git_status", true) end,
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
10
lua/config/plugin/oil.lua
Normal file
10
lua/config/plugin/oil.lua
Normal file
@@ -0,0 +1,10 @@
|
||||
require("oil").setup({
|
||||
default_file_explorer = true,
|
||||
columns = {
|
||||
"icon",
|
||||
},
|
||||
keymaps = {
|
||||
["g."] = { "actions.toggle_hidden", mode = "n"}
|
||||
}
|
||||
|
||||
})
|
||||
73
lua/config/plugin/render-markdown.lua
Normal file
73
lua/config/plugin/render-markdown.lua
Normal file
@@ -0,0 +1,73 @@
|
||||
require("render-markdown").setup({
|
||||
completions = { lsp = { enabled = true } },
|
||||
|
||||
heading = {
|
||||
enabled = true,
|
||||
sign = false,
|
||||
icons = { " ", " ", " ", " ", " ", " " },
|
||||
signs = { "▶"},
|
||||
left_pad = 0,
|
||||
right_pad = 0,
|
||||
width = "full",
|
||||
min_width = 0,
|
||||
border = true,
|
||||
border_virtual = true,
|
||||
above = "▄",
|
||||
below = "▀",
|
||||
},
|
||||
|
||||
code = {
|
||||
enabled = true,
|
||||
sign = true,
|
||||
style = "full",
|
||||
position = "left",
|
||||
language_pad = 2,
|
||||
disable_background = { "diff" },
|
||||
width = "full",
|
||||
left_pad = 0,
|
||||
right_pad = 0,
|
||||
min_width = 0,
|
||||
border = "thin",
|
||||
above = "▄",
|
||||
below = "▀",
|
||||
highlight = "RenderMarkdownCode",
|
||||
highlight_inline = "RenderMarkdownCodeInline",
|
||||
},
|
||||
|
||||
win_options = {
|
||||
conceallevel = {
|
||||
default = vim.o.conceallevel,
|
||||
rendered = 3,
|
||||
},
|
||||
concealcursor = {
|
||||
default = vim.o.concealcursor,
|
||||
rendered = "n",
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
-- Fix tab behavior in markdown files
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = "markdown",
|
||||
callback = function()
|
||||
-- Override tab mapping in markdown files
|
||||
vim.keymap.set("i", "<Tab>", function()
|
||||
-- Check if we're in a code block
|
||||
local line = vim.api.nvim_get_current_line()
|
||||
local col = vim.api.nvim_win_get_cursor(0)[2]
|
||||
|
||||
-- If we're at the beginning of a line or after whitespace, insert tab
|
||||
if col == 0 or line:sub(1, col):match("^%s*$") then
|
||||
return "<Tab>"
|
||||
else
|
||||
-- Otherwise, let completion handle it if available
|
||||
if vim.fn.pumvisible() == 1 then
|
||||
return "<C-n>"
|
||||
else
|
||||
return "<Tab>"
|
||||
end
|
||||
end
|
||||
end, { expr = true, buffer = true })
|
||||
end,
|
||||
})
|
||||
|
||||
49
lua/config/plugin/statusbar.lua
Normal file
49
lua/config/plugin/statusbar.lua
Normal file
@@ -0,0 +1,49 @@
|
||||
require("lualine").setup {
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
theme = "auto",
|
||||
component_separators = { left = "", right = "" },
|
||||
section_separators = { left = "", right = "" },
|
||||
disabled_filetypes = {
|
||||
statusline = { "NvimTree", "neo-tree", "alpha", "dashboard" },
|
||||
winbar = { "NvimTree", "neo-tree", "alpha", "dashboard" },
|
||||
},
|
||||
ignore_focus = { "NvimTree", "neo-tree" },
|
||||
always_divide_middle = true,
|
||||
globalstatus = true, -- This makes lualine span the entire bottom
|
||||
refresh = {
|
||||
statusline = 1000,
|
||||
tabline = 1000,
|
||||
winbar = 1000,
|
||||
}
|
||||
},
|
||||
sections = {
|
||||
lualine_a = { "mode" }, -- Shows full text like "NORMAL", "INSERT", "VISUAL"
|
||||
lualine_b = { "branch", "diff", "diagnostics" },
|
||||
lualine_c = {
|
||||
"filename",
|
||||
{
|
||||
function()
|
||||
return vim.b.table_mode_active == 1 and "[TABLE]" or ""
|
||||
end,
|
||||
color = { fg = "#98c379" }, -- Green color
|
||||
},
|
||||
},
|
||||
lualine_x = { "encoding", "fileformat", "filetype" },
|
||||
lualine_y = { "progress" },
|
||||
lualine_z = { "location" }
|
||||
},
|
||||
inactive_sections = {
|
||||
lualine_a = {},
|
||||
lualine_b = {},
|
||||
lualine_c = { "filename" },
|
||||
lualine_x = { "location" },
|
||||
lualine_y = {},
|
||||
lualine_z = {}
|
||||
},
|
||||
tabline = {},
|
||||
winbar = {},
|
||||
inactive_winbar = {},
|
||||
extensions = { "nvim-tree", "neo-tree" }
|
||||
}
|
||||
|
||||
5
lua/config/plugin/telescope.lua
Normal file
5
lua/config/plugin/telescope.lua
Normal file
@@ -0,0 +1,5 @@
|
||||
require("telescope").setup({
|
||||
defaults = {
|
||||
file_ignore_patterns = { "node_modules", ".git/" },
|
||||
},
|
||||
})
|
||||
27
lua/config/plugin/treesitter.lua
Normal file
27
lua/config/plugin/treesitter.lua
Normal file
@@ -0,0 +1,27 @@
|
||||
require("nvim-treesitter.configs").setup({
|
||||
ensure_installed = {
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"lua",
|
||||
"python",
|
||||
"javascript",
|
||||
"typescript",
|
||||
"html",
|
||||
"css",
|
||||
"json",
|
||||
"yaml",
|
||||
"bash",
|
||||
"vim",
|
||||
"c",
|
||||
"cpp",
|
||||
"lua",
|
||||
"go",
|
||||
},
|
||||
highlight = {
|
||||
enable = true,
|
||||
additional_vim_regex_highlighting = { "markdown" },
|
||||
},
|
||||
indent = {
|
||||
enable = true,
|
||||
},
|
||||
})
|
||||
22
lua/config/plugin/ufo.lua
Normal file
22
lua/config/plugin/ufo.lua
Normal file
@@ -0,0 +1,22 @@
|
||||
-- Basic fold UI
|
||||
vim.o.foldcolumn = '1'
|
||||
vim.o.foldlevel = 99
|
||||
vim.o.foldlevelstart = 99
|
||||
vim.o.foldenable = true
|
||||
|
||||
-- Triangles for folds
|
||||
vim.opt.fillchars = {
|
||||
foldopen = "▼",
|
||||
foldclose = "▶",
|
||||
foldsep = " ",
|
||||
}
|
||||
|
||||
require("ufo").setup({
|
||||
provider_selector = function(bufnr, filetype, buftype)
|
||||
if filetype == "markdown" then
|
||||
return { "treesitter", "indent" }
|
||||
end
|
||||
return { "lsp", "indent" }
|
||||
end,
|
||||
})
|
||||
|
||||
7
lua/plugins/autopairs.lua
Normal file
7
lua/plugins/autopairs.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
return {
|
||||
"windwp/nvim-autopairs",
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
event = "InsertEnter",
|
||||
config = true,
|
||||
}
|
||||
3
lua/plugins/clipboard.lua
Normal file
3
lua/plugins/clipboard.lua
Normal file
@@ -0,0 +1,3 @@
|
||||
return {
|
||||
"swaits/universal-clipboard.nvim",
|
||||
}
|
||||
9
lua/plugins/colorscheme.lua
Normal file
9
lua/plugins/colorscheme.lua
Normal file
@@ -0,0 +1,9 @@
|
||||
return {
|
||||
"gbprod/nord.nvim",
|
||||
lazy=false,
|
||||
priority=1000,
|
||||
config = function()
|
||||
require("nord").setup({})
|
||||
vim.cmd.colorscheme("nord")
|
||||
end,
|
||||
}
|
||||
7
lua/plugins/comment.lua
Normal file
7
lua/plugins/comment.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
return {
|
||||
"numToStr/Comment.nvim",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
config = function()
|
||||
require("config.plugin.comment")
|
||||
end,
|
||||
}
|
||||
115
lua/plugins/completions.lua
Normal file
115
lua/plugins/completions.lua
Normal file
@@ -0,0 +1,115 @@
|
||||
return {
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
event = "InsertEnter",
|
||||
dependencies = {
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
"hrsh7th/cmp-buffer",
|
||||
"hrsh7th/cmp-path",
|
||||
"hrsh7th/cmp-cmdline",
|
||||
"L3MON4D3/LuaSnip",
|
||||
"saadparwaiz1/cmp_luasnip",
|
||||
"f3fora/cmp-spell",
|
||||
"rafamadriz/friendly-snippets",
|
||||
},
|
||||
config = function()
|
||||
local cmp = require("cmp")
|
||||
local luasnip = require("luasnip")
|
||||
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
|
||||
vim.api.nvim_set_hl(0, "CmpBorder", { link = "FloatBorder" })
|
||||
vim.api.nvim_set_hl(0, "CmpDocBorder", { link = "FloatBorder" })
|
||||
vim.api.nvim_set_hl(0, "CmpDocNormal", { link = "NormalFloat" })
|
||||
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
luasnip.lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
["<C-b>"] = cmp.mapping.scroll_docs(-4),
|
||||
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
||||
["<C-Space>"] = cmp.mapping.complete(),
|
||||
["<C-e>"] = cmp.mapping.abort(),
|
||||
["<CR>"] = cmp.mapping.confirm({ select = true }),
|
||||
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif luasnip.expand_or_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
|
||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif luasnip.jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
}),
|
||||
|
||||
sources = cmp.config.sources({
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "luasnip" },
|
||||
{ name = "buffer" },
|
||||
{ name = "path" },
|
||||
{ name = "spell" },
|
||||
}),
|
||||
|
||||
window = {
|
||||
completion = cmp.config.window.bordered({
|
||||
border = "rounded",
|
||||
winhighlight = "Normal:NormalFloat,FloatBorder:CmpBorder",
|
||||
scrollbar = true,
|
||||
winblend = 8,
|
||||
}),
|
||||
documentation = cmp.config.window.bordered({
|
||||
border = "rounded",
|
||||
winhighlight = "Normal:CmpDocNormal,FloatBorder:CmpDocBorder",
|
||||
winblend = 8,
|
||||
max_width = 60,
|
||||
max_height = 20,
|
||||
}),
|
||||
},
|
||||
|
||||
formatting = {
|
||||
format = function(entry, vim_item)
|
||||
vim_item.menu = ({
|
||||
nvim_lsp = "[LSP]",
|
||||
luasnip = "[Snippet]",
|
||||
buffer = "[Buffer]",
|
||||
path = "[Path]",
|
||||
spell = "[Spell]",
|
||||
})[entry.source.name]
|
||||
return vim_item
|
||||
end,
|
||||
},
|
||||
})
|
||||
|
||||
cmp.setup.cmdline({ "/", "?" }, {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = {
|
||||
{ name = "buffer" },
|
||||
},
|
||||
})
|
||||
|
||||
cmp.setup.cmdline(":", {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = cmp.config.sources({
|
||||
{ name = "path" },
|
||||
}, {
|
||||
{ name = "cmdline" },
|
||||
}),
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
10
lua/plugins/dropbar.lua
Normal file
10
lua/plugins/dropbar.lua
Normal file
@@ -0,0 +1,10 @@
|
||||
return {
|
||||
"Bekaboo/dropbar.nvim",
|
||||
dependencies = {
|
||||
"nvim-telescope/telescope-fzf-native.nvim",
|
||||
build = "make"
|
||||
},
|
||||
config = function()
|
||||
local dropbar_api = require("dropbar.api")
|
||||
end
|
||||
}
|
||||
25
lua/plugins/image.lua
Normal file
25
lua/plugins/image.lua
Normal file
@@ -0,0 +1,25 @@
|
||||
return {
|
||||
"3rd/image.nvim",
|
||||
config = function()
|
||||
require("image").setup({
|
||||
backend = "kitty",
|
||||
processor = "magick_cli",
|
||||
integrations = {
|
||||
markdown = {
|
||||
enabled = true,
|
||||
clear_in_insert_mode = true,
|
||||
download_remote_images = true,
|
||||
only_render_image_at_cursor = true,
|
||||
floating_windows = false,
|
||||
filetypes = { "markdown", "vimwiki"},
|
||||
}
|
||||
},
|
||||
scale_factor = 1.0,
|
||||
max_width = nil,
|
||||
max_height = nil,
|
||||
max_height_window_percentage = 50,
|
||||
max_width_window_percentage = nil,
|
||||
window_overlap_clear_enabled = false
|
||||
})
|
||||
end
|
||||
}
|
||||
44
lua/plugins/lsp.lua
Normal file
44
lua/plugins/lsp.lua
Normal file
@@ -0,0 +1,44 @@
|
||||
return {
|
||||
{
|
||||
"mason-org/mason.nvim",
|
||||
config = function()
|
||||
require("mason").setup()
|
||||
end,
|
||||
},
|
||||
{
|
||||
"mason-org/mason-lspconfig.nvim",
|
||||
dependencies = { "mason-org/mason.nvim" },
|
||||
config = function()
|
||||
require("mason-lspconfig").setup({
|
||||
ensure_installed = {
|
||||
"gopls",
|
||||
"clangd",
|
||||
"pyright",
|
||||
"lua_ls",
|
||||
"ts_ls",
|
||||
},
|
||||
automatic_installation = true,
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
dependencies = {
|
||||
"mason-org/mason-lspconfig.nvim",
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
},
|
||||
config = function()
|
||||
local lspconfig = require("lspconfig")
|
||||
local cmp_nvim_lsp = require("cmp_nvim_lsp")
|
||||
|
||||
local capabilities = cmp_nvim_lsp.default_capabilities()
|
||||
|
||||
-- Setup each server
|
||||
vim.lsp.enable("gopls")
|
||||
vim.lsp.enable("clangd")
|
||||
vim.lsp.enable("pyright")
|
||||
vim.lsp.enable("lua_ls")
|
||||
vim.lsp.enable("ts_ls")
|
||||
end,
|
||||
},
|
||||
}
|
||||
28
lua/plugins/markdown.lua
Normal file
28
lua/plugins/markdown.lua
Normal file
@@ -0,0 +1,28 @@
|
||||
return {
|
||||
{
|
||||
"MeanderingProgrammer/render-markdown.nvim",
|
||||
dependencies = {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
"nvim-mini/mini.nvim",
|
||||
},
|
||||
config = function()
|
||||
require("config.plugin.render-markdown")
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = "markdown",
|
||||
callback = function()
|
||||
vim.opt_local.spell = true
|
||||
vim.opt_local.spelllang = "en_us"
|
||||
end,
|
||||
})
|
||||
|
||||
end,
|
||||
},
|
||||
{
|
||||
"dhruvasagar/vim-table-mode",
|
||||
ft = "markdown",
|
||||
config = function()
|
||||
vim.g.table_mode_corner = "|"
|
||||
vim.api.nvim_set_keymap("n", "<leader>tm", ":TableModeToggle<CR>", { noremap = true, silent = true })
|
||||
end,
|
||||
},
|
||||
}
|
||||
8
lua/plugins/notes.lua
Normal file
8
lua/plugins/notes.lua
Normal file
@@ -0,0 +1,8 @@
|
||||
return {
|
||||
"darwincereska/notes.nvim",
|
||||
config = function()
|
||||
require("notes").setup({
|
||||
git_remote = "git@github.com:darwincereska/notes.git"
|
||||
})
|
||||
end
|
||||
}
|
||||
11
lua/plugins/oil.lua
Normal file
11
lua/plugins/oil.lua
Normal file
@@ -0,0 +1,11 @@
|
||||
return {
|
||||
"stevearc/oil.nvim",
|
||||
---@module "oil"
|
||||
---@module oil.setupOpts
|
||||
opts = {},
|
||||
dependencies = { "nvim-mini/mini.icons" },
|
||||
lazy = false,
|
||||
config = function()
|
||||
require("config.plugin.oil")
|
||||
end,
|
||||
}
|
||||
5
lua/plugins/presenting.lua
Normal file
5
lua/plugins/presenting.lua
Normal file
@@ -0,0 +1,5 @@
|
||||
return {
|
||||
"sotte/presenting.nvim",
|
||||
opts = {},
|
||||
cmd = { "Presenting" }
|
||||
}
|
||||
7
lua/plugins/statusbar.lua
Normal file
7
lua/plugins/statusbar.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
return {
|
||||
"nvim-lualine/lualine.nvim",
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
config = function()
|
||||
require("config.plugin.statusbar")
|
||||
end,
|
||||
}
|
||||
16
lua/plugins/tabs.lua
Normal file
16
lua/plugins/tabs.lua
Normal file
@@ -0,0 +1,16 @@
|
||||
return {
|
||||
"romgrk/barbar.nvim",
|
||||
dependencies = {
|
||||
"nvim-tree/nvim-web-devicons"
|
||||
},
|
||||
init = function() vim.g.barbar_auto_setup = false end,
|
||||
opts = {
|
||||
insert_at_start = true,
|
||||
animation = false,
|
||||
auto_hide = false,
|
||||
sidebar_filetypes = {
|
||||
NvimTree = true,
|
||||
NeoTree = false,
|
||||
},
|
||||
}
|
||||
}
|
||||
7
lua/plugins/telescope.lua
Normal file
7
lua/plugins/telescope.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
return {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
config = function()
|
||||
require("config.plugin.telescope")
|
||||
end,
|
||||
}
|
||||
15
lua/plugins/terminal.lua
Normal file
15
lua/plugins/terminal.lua
Normal file
@@ -0,0 +1,15 @@
|
||||
return {
|
||||
"akinsho/toggleterm.nvim",
|
||||
version = "*",
|
||||
opt = {
|
||||
|
||||
},
|
||||
config = function()
|
||||
require("toggleterm").setup({
|
||||
direction = "float",
|
||||
close_on_exit = true,
|
||||
shell = "/bin/zsh -l",
|
||||
shade_in_terminals = true,
|
||||
})
|
||||
end,
|
||||
}
|
||||
7
lua/plugins/treesitter.lua
Normal file
7
lua/plugins/treesitter.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
return {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
build = ":TSUpdate",
|
||||
config = function()
|
||||
require("config.plugin.treesitter")
|
||||
end,
|
||||
}
|
||||
8
lua/plugins/ufo.lua
Normal file
8
lua/plugins/ufo.lua
Normal file
@@ -0,0 +1,8 @@
|
||||
return {
|
||||
"kevinhwang91/nvim-ufo",
|
||||
dependencies = "kevinhwang91/promise-async",
|
||||
lazy = false,
|
||||
config = function()
|
||||
require("config.plugin.ufo")
|
||||
end
|
||||
}
|
||||
15
lua/plugins/ui.lua
Normal file
15
lua/plugins/ui.lua
Normal file
@@ -0,0 +1,15 @@
|
||||
return {
|
||||
{
|
||||
"nvim-neo-tree/neo-tree.nvim", -- NVim File Tree
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
"MunifTanjim/nui.nvim",
|
||||
},
|
||||
config = function()
|
||||
require("config.plugin.neo-tree")
|
||||
end,
|
||||
},
|
||||
}
|
||||
3
lua/plugins/vim-be-good.lua
Normal file
3
lua/plugins/vim-be-good.lua
Normal file
@@ -0,0 +1,3 @@
|
||||
return {
|
||||
"ThePrimeagen/vim-be-good"
|
||||
}
|
||||
Reference in New Issue
Block a user