begin nvim config cleanup
This commit is contained in:
parent
d2d85c8cff
commit
4ecc5566b4
37 changed files with 326 additions and 476 deletions
|
@ -4,16 +4,12 @@ vim.g.maplocalleader = ' '
|
||||||
vim.keymap.set({ 'n', 'v' }, '<Space>', '<Nop>', { silent = true })
|
vim.keymap.set({ 'n', 'v' }, '<Space>', '<Nop>', { silent = true })
|
||||||
|
|
||||||
-- Load modules
|
-- Load modules
|
||||||
if vim.g.vscode then
|
require("config")
|
||||||
require("config.mappings")
|
require("utils.lazy").lazy_init()
|
||||||
else
|
require("lazy").setup("plugins", {
|
||||||
require("utils.lazy").lazy_init()
|
|
||||||
require("lazy").setup("plugins", {
|
|
||||||
change_detection = {
|
change_detection = {
|
||||||
enabled = false,
|
enabled = false,
|
||||||
notify = false,
|
notify = false,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
require("config.lsp")
|
||||||
require("config")
|
|
||||||
end
|
|
||||||
|
|
|
@ -1,24 +1,4 @@
|
||||||
-- Open NvimTree on startup
|
vim.api.nvim_create_autocmd('FileType', {
|
||||||
vim.api.nvim_create_autocmd({ "VimEnter" }, {
|
pattern = "go",
|
||||||
callback = function(data)
|
command = "setlocal tabstop=4",
|
||||||
local real_file = vim.fn.filereadable(data.file) == 1
|
|
||||||
local no_name = data.file == "" and vim.bo[data.buf].buftype == ""
|
|
||||||
local directory = vim.fn.isdirectory(data.file) == 1
|
|
||||||
|
|
||||||
if real_file or no_name then
|
|
||||||
require("nvim-tree.api").tree.toggle({ focus = false, find_file = true, })
|
|
||||||
elseif directory then
|
|
||||||
vim.cmd.enew()
|
|
||||||
vim.cmd.cd(data.file)
|
|
||||||
require("nvim-tree.api").tree.open()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Resotre cursor on exit
|
|
||||||
-- vim.api.nvim_create_autocmd("VimLeave", {
|
|
||||||
-- pattern = "*",
|
|
||||||
-- callback = function()
|
|
||||||
-- vim.o.guicursor = "n:ver20-blinkwait700-blinkoff400-blinkon250"
|
|
||||||
-- end,
|
|
||||||
-- })
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
require("config.autocmd")
|
|
||||||
require("config.lsp")
|
|
||||||
require("config.mappings")
|
require("config.mappings")
|
||||||
require("config.options")
|
require("config.options")
|
||||||
require("config.plugins")
|
require("config.autocmd")
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
return {
|
|
||||||
autoformat = true,
|
|
||||||
}
|
|
|
@ -4,70 +4,70 @@ require('mason-lspconfig').setup()
|
||||||
local mason_lspconfig = require('mason-lspconfig')
|
local mason_lspconfig = require('mason-lspconfig')
|
||||||
|
|
||||||
local on_attach = function(_, bufnr)
|
local on_attach = function(_, bufnr)
|
||||||
local nmap = function(keys, func, desc)
|
local nmap = function(keys, func, desc)
|
||||||
if desc then
|
if desc then
|
||||||
desc = 'LSP: ' .. desc
|
desc = 'LSP: ' .. desc
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.keymap.set('n', keys, func, { buffer = bufnr, desc = desc })
|
||||||
end
|
end
|
||||||
|
|
||||||
vim.keymap.set('n', keys, func, { buffer = bufnr, desc = desc })
|
nmap('<leader>rn', vim.lsp.buf.rename, '[R]e[n]ame')
|
||||||
end
|
nmap('<leader>ca', vim.lsp.buf.code_action, '[C]ode [A]ction')
|
||||||
|
|
||||||
nmap('<leader>rn', vim.lsp.buf.rename, '[R]e[n]ame')
|
nmap('gd', require('telescope.builtin').lsp_definitions, '[G]oto [D]efinition')
|
||||||
nmap('<leader>ca', vim.lsp.buf.code_action, '[C]ode [A]ction')
|
nmap('gr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences')
|
||||||
|
nmap('gI', require('telescope.builtin').lsp_implementations, '[G]oto [I]mplementation')
|
||||||
|
nmap('<leader>D', require('telescope.builtin').lsp_type_definitions, 'Type [D]efinition')
|
||||||
|
nmap("<leader>i", vim.diagnostic.open_float)
|
||||||
|
|
||||||
nmap('gd', require('telescope.builtin').lsp_definitions, '[G]oto [D]efinition')
|
nmap('<leader>ds', require('telescope.builtin').lsp_document_symbols, '[D]ocument [S]ymbols')
|
||||||
nmap('gr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences')
|
-- nmap('<leader>ws', require('telescope.builtin').lsp_dynamic_workspace_symbols, '[W]orkspace [S]ymbols')
|
||||||
nmap('gI', require('telescope.builtin').lsp_implementations, '[G]oto [I]mplementation')
|
|
||||||
nmap('<leader>D', require('telescope.builtin').lsp_type_definitions, 'Type [D]efinition')
|
|
||||||
nmap("<leader>i", vim.diagnostic.open_float)
|
|
||||||
|
|
||||||
nmap('<leader>ds', require('telescope.builtin').lsp_document_symbols, '[D]ocument [S]ymbols')
|
-- See `:help K` for why this keymap
|
||||||
-- nmap('<leader>ws', require('telescope.builtin').lsp_dynamic_workspace_symbols, '[W]orkspace [S]ymbols')
|
nmap('K', vim.lsp.buf.hover, 'Hover Documentation')
|
||||||
|
nmap('<C-k>', vim.lsp.buf.signature_help, 'Signature Documentation')
|
||||||
|
|
||||||
-- See `:help K` for why this keymap
|
-- Lesser used LSP functionality
|
||||||
nmap('K', vim.lsp.buf.hover, 'Hover Documentation')
|
nmap('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration')
|
||||||
nmap('<C-k>', vim.lsp.buf.signature_help, 'Signature Documentation')
|
-- nmap('<leader>wa', vim.lsp.buf.add_workspace_folder, '[W]orkspace [A]dd Folder')
|
||||||
|
-- nmap('<leader>wr', vim.lsp.buf.remove_workspace_folder, '[W]orkspace [R]emove Folder')
|
||||||
|
-- nmap('<leader>wl', function()
|
||||||
|
-- print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
|
||||||
|
-- end, '[W]orkspace [L]ist Folders')
|
||||||
|
-- require("config.lsp.keybinds").init_keymap(bufnr)
|
||||||
|
|
||||||
-- Lesser used LSP functionality
|
vim.api.nvim_buf_create_user_command(bufnr, 'Format', function(_)
|
||||||
nmap('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration')
|
vim.lsp.buf.format()
|
||||||
-- nmap('<leader>wa', vim.lsp.buf.add_workspace_folder, '[W]orkspace [A]dd Folder')
|
end, { desc = 'Format current buffer with LSP' })
|
||||||
-- nmap('<leader>wr', vim.lsp.buf.remove_workspace_folder, '[W]orkspace [R]emove Folder')
|
|
||||||
-- nmap('<leader>wl', function()
|
|
||||||
-- print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
|
|
||||||
-- end, '[W]orkspace [L]ist Folders')
|
|
||||||
-- require("config.lsp.keybinds").init_keymap(bufnr)
|
|
||||||
|
|
||||||
vim.api.nvim_buf_create_user_command(bufnr, 'Format', function(_)
|
|
||||||
vim.lsp.buf.format()
|
|
||||||
end, { desc = 'Format current buffer with LSP' })
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local servers = {
|
local servers = {
|
||||||
ansiblels = {},
|
ansiblels = {},
|
||||||
clangd = require("config.lsp.clangd"),
|
clangd = {},
|
||||||
pyright = {},
|
pyright = {},
|
||||||
lua_ls = require("config.lsp.lua_ls"),
|
lua_ls = require("config.lsp.lua_ls"),
|
||||||
gopls = {},
|
gopls = {},
|
||||||
rust_analyzer = {},
|
rust_analyzer = {},
|
||||||
cmake = {},
|
cmake = {},
|
||||||
bashls = {},
|
bashls = {},
|
||||||
hls = {}
|
hls = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities)
|
capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities)
|
||||||
|
|
||||||
mason_lspconfig.setup({
|
mason_lspconfig.setup({
|
||||||
ensure_installed = vim.tbl_keys(servers),
|
ensure_installed = vim.tbl_keys(servers),
|
||||||
})
|
})
|
||||||
|
|
||||||
mason_lspconfig.setup_handlers {
|
mason_lspconfig.setup_handlers {
|
||||||
function(server_name)
|
function(server_name)
|
||||||
require('lspconfig')[server_name].setup {
|
require('lspconfig')[server_name].setup {
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
settings = servers[server_name],
|
settings = servers[server_name],
|
||||||
filetypes = (servers[server_name] or {}).filetypes,
|
filetypes = (servers[server_name] or {}).filetypes,
|
||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
require('neodev').setup()
|
require('neodev').setup()
|
||||||
|
|
||||||
return {
|
return {
|
||||||
Lua = {
|
Lua = {
|
||||||
workspace = { checkThirdParty = false },
|
workspace = { checkThirdParty = false },
|
||||||
telemetry = { enable = false },
|
telemetry = { enable = false },
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,9 @@ map({ 'n', 'v' }, 'H', '<NOP>')
|
||||||
map({ 'n', 'v' }, 'L', '<NOP>')
|
map({ 'n', 'v' }, 'L', '<NOP>')
|
||||||
map({ 'n', 'v' }, '<C-Space>', '<NOP>')
|
map({ 'n', 'v' }, '<C-Space>', '<NOP>')
|
||||||
|
|
||||||
|
-- Yes...
|
||||||
|
map({ 'n', 'v' }, 'q:', ':q')
|
||||||
|
|
||||||
-- Movement between buffers
|
-- Movement between buffers
|
||||||
map({ 'n', 'v' }, '<A-u>', ':bp<CR>', { silent = true })
|
map({ 'n', 'v' }, '<A-u>', ':bp<CR>', { silent = true })
|
||||||
map({ 'n', 'v' }, '<A-i>', ':bn<CR>', { silent = true })
|
map({ 'n', 'v' }, '<A-i>', ':bn<CR>', { silent = true })
|
||||||
|
@ -14,18 +17,8 @@ map({ 'n', 'v' }, '<A-i>', ':bn<CR>', { silent = true })
|
||||||
map({ 'n', 'v' }, 'k', 'v:count == 0 ? "gk" : "k"', { expr = true, silent = true })
|
map({ 'n', 'v' }, 'k', 'v:count == 0 ? "gk" : "k"', { expr = true, silent = true })
|
||||||
map({ 'n', 'v' }, 'j', 'v:count == 0 ? "gj" : "j"', { expr = true, silent = true })
|
map({ 'n', 'v' }, 'j', 'v:count == 0 ? "gj" : "j"', { expr = true, silent = true })
|
||||||
|
|
||||||
-- Exit buffers/nvim with <leader>
|
|
||||||
-- map('n', '<leader>q', function() require('utils.close_buffer').close_buffer() end)
|
|
||||||
-- map('n', '<leader>1', function() require('utils.close_buffer').close_buffer(true) end)
|
|
||||||
-- map('n', '<leader>Q', ':%bd | quit<CR>')
|
|
||||||
-- map('n', '<leader>!', ':%bd! | quit!<CR>')
|
|
||||||
-- map('n', '<leader>w', ':write<CR>')
|
|
||||||
-- -- map('n', '<leader>W', function() vim.cmd.write(vim.fn.input("File: ")) end)
|
|
||||||
-- map('n', '<leader>e', ':e<CR>')
|
|
||||||
|
|
||||||
-- Duplicate leader feats to gradually move to
|
-- Duplicate leader feats to gradually move to
|
||||||
map('n', '<C-q>', function() require('utils.close_buffer').close_buffer() end)
|
map('n', '<C-q>', function() require('utils.close_buffer').close_buffer() end)
|
||||||
map('n', '<C-1>', function() require('utils.close_buffer').close_buffer(true) end)
|
|
||||||
|
|
||||||
-- Copy and paste from clipboard
|
-- Copy and paste from clipboard
|
||||||
map('n', '<leader>y', '"+yy<ESC>')
|
map('n', '<leader>y', '"+yy<ESC>')
|
||||||
|
|
|
@ -9,12 +9,14 @@ vim.wo.relativenumber = true
|
||||||
vim.o.mouse = 'a'
|
vim.o.mouse = 'a'
|
||||||
|
|
||||||
-- Indentation
|
-- Indentation
|
||||||
vim.o.breakindent = true
|
vim.o.tabstop = 8
|
||||||
vim.o.tabstop = 4
|
vim.o.expandtab = true
|
||||||
vim.o.shiftwidth = 4
|
vim.o.shiftwidth = 4
|
||||||
vim.o.softtabstop = 0
|
vim.o.autoindent = true
|
||||||
vim.o.expandtab = false
|
|
||||||
vim.o.smartindent = true
|
vim.o.smartindent = true
|
||||||
|
vim.o.smarttab = true
|
||||||
|
vim.o.breakindent = true
|
||||||
|
vim.o.softtabstop = -1
|
||||||
|
|
||||||
-- Save undo history
|
-- Save undo history
|
||||||
vim.o.undofile = true
|
vim.o.undofile = true
|
||||||
|
@ -30,9 +32,6 @@ vim.wo.signcolumn = 'yes'
|
||||||
vim.o.updatetime = 250
|
vim.o.updatetime = 250
|
||||||
vim.o.timeoutlen = 300
|
vim.o.timeoutlen = 300
|
||||||
|
|
||||||
-- Set completeopt to have a better completion experience
|
|
||||||
vim.o.completeopt = 'menuone,noselect'
|
|
||||||
|
|
||||||
-- Enable TrueColor
|
-- Enable TrueColor
|
||||||
vim.o.termguicolors = true
|
vim.o.termguicolors = true
|
||||||
|
|
||||||
|
|
|
@ -1,74 +0,0 @@
|
||||||
require("cmake-tools").setup {
|
|
||||||
cmake_command = "cmake", -- this is used to specify cmake command path
|
|
||||||
cmake_regenerate_on_save = true, -- auto generate when save CMakeLists.txt
|
|
||||||
cmake_generate_options = { "-DCMAKE_EXPORT_COMPILE_COMMANDS=1" }, -- this will be passed when invoke `CMakeGenerate`
|
|
||||||
cmake_build_options = { "-j14" }, -- this will be passed when invoke `CMakeBuild`
|
|
||||||
-- support macro expansion:
|
|
||||||
-- ${kit}
|
|
||||||
-- ${kitGenerator}
|
|
||||||
-- ${variant:xx}
|
|
||||||
cmake_build_directory = "cmake-build-${variant:buildType}", -- this is used to specify generate directory for cmake, allows macro expansion
|
|
||||||
cmake_soft_link_compile_commands = true, -- this will automatically make a soft link from compile commands file to project root dir
|
|
||||||
cmake_compile_commands_from_lsp = false, -- this will automatically set compile commands file location using lsp, to use it, please set `cmake_soft_link_compile_commands` to false
|
|
||||||
cmake_kits_path = nil, -- this is used to specify global cmake kits path, see CMakeKits for detailed usage
|
|
||||||
cmake_variants_message = {
|
|
||||||
short = { show = true }, -- whether to show short message
|
|
||||||
long = { show = true, max_length = 40 }, -- whether to show long message
|
|
||||||
},
|
|
||||||
cmake_dap_configuration = { -- debug settings for cmake
|
|
||||||
name = "cpp",
|
|
||||||
type = "codelldb",
|
|
||||||
request = "launch",
|
|
||||||
stopOnEntry = false,
|
|
||||||
runInTerminal = true,
|
|
||||||
console = "integratedTerminal",
|
|
||||||
},
|
|
||||||
cmake_executor = { -- executor to use
|
|
||||||
name = "quickfix", -- name of the executor
|
|
||||||
opts = {}, -- the options the executor will get, possible values depend on the executor type. See `default_opts` for possible values.
|
|
||||||
default_opts = { -- a list of default and possible values for executors
|
|
||||||
quickfix = {
|
|
||||||
show = "always", -- "always", "only_on_error"
|
|
||||||
position = "belowright", -- "bottom", "top"
|
|
||||||
size = 10,
|
|
||||||
},
|
|
||||||
overseer = {
|
|
||||||
new_task_opts = {}, -- options to pass into the `overseer.new_task` command
|
|
||||||
on_new_task = function(task) end, -- a function that gets overseer.Task when it is created, before calling `task:start`
|
|
||||||
},
|
|
||||||
terminal = {}, -- terminal executor uses the values in cmake_terminal
|
|
||||||
},
|
|
||||||
},
|
|
||||||
cmake_terminal = {
|
|
||||||
name = "terminal",
|
|
||||||
opts = {
|
|
||||||
name = "Main Terminal",
|
|
||||||
prefix_name = "[CMakeTools]: ", -- This must be included and must be unique, otherwise the terminals will not work. Do not use a simple spacebar " ", or any generic name
|
|
||||||
split_direction = "horizontal", -- "horizontal", "vertical"
|
|
||||||
split_size = 11,
|
|
||||||
|
|
||||||
-- Window handling
|
|
||||||
single_terminal_per_instance = true, -- Single viewport, multiple windows
|
|
||||||
single_terminal_per_tab = true, -- Single viewport per tab
|
|
||||||
keep_terminal_static_location = true, -- Static location of the viewport if avialable
|
|
||||||
|
|
||||||
-- Running Tasks
|
|
||||||
start_insert_in_launch_task = false, -- If you want to enter terminal with :startinsert upon using :CMakeRun
|
|
||||||
start_insert_in_other_tasks = false, -- If you want to enter terminal with :startinsert upon launching all other cmake tasks in the terminal. Generally set as false
|
|
||||||
focus_on_main_terminal = false, -- Focus on cmake terminal when cmake task is launched. Only used if executor is terminal.
|
|
||||||
focus_on_launch_terminal = true, -- Focus on cmake launch terminal when executable target in launched.
|
|
||||||
},
|
|
||||||
},
|
|
||||||
cmake_notifications = {
|
|
||||||
enabled = true, -- show cmake execution progress in nvim-notify
|
|
||||||
spinner = { "⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏" }, -- icons used for progress display
|
|
||||||
refresh_rate_ms = 100, -- how often to iterate icons
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
-- Mappings
|
|
||||||
vim.keymap.set('n', '<leader>b', ':CMakeBuild<CR>')
|
|
||||||
vim.keymap.set('n', '<leader>c', ':CMakeClose<CR>')
|
|
||||||
vim.keymap.set('n', '<leader>r', ':CMakeRun<CR>')
|
|
||||||
vim.keymap.set('n', '<leader>G', ':CMakeGenerate<CR>')
|
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
local map = vim.keymap.set
|
|
||||||
|
|
||||||
map({ 'n', 'i' }, '<C-_>', require('Comment.api').toggle.linewise.current)
|
|
||||||
|
|
||||||
map('v', '<C-_>', function()
|
|
||||||
vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes('<ESC>', true, false, true), 'nx', false)
|
|
||||||
require('Comment.api').toggle.linewise(vim.fn.visualmode())
|
|
||||||
end
|
|
||||||
)
|
|
|
@ -1,10 +0,0 @@
|
||||||
require('config.plugins.cmake-tools')
|
|
||||||
require('config.plugins.comment')
|
|
||||||
require('config.plugins.lualine')
|
|
||||||
require('config.plugins.nvim-autopairs')
|
|
||||||
require('config.plugins.nvim-cmp')
|
|
||||||
require('config.plugins.nvim-tree')
|
|
||||||
require('config.plugins.telescope')
|
|
||||||
require('config.plugins.treesitter')
|
|
||||||
require('config.plugins.navigator')
|
|
||||||
require('config.plugins.trouble')
|
|
|
@ -1 +0,0 @@
|
||||||
require('lualine').setup()
|
|
|
@ -1,8 +0,0 @@
|
||||||
require('Navigator').setup()
|
|
||||||
|
|
||||||
local map = vim.keymap.set
|
|
||||||
|
|
||||||
map('n', '<A-h>', function () require("Navigator").left() end)
|
|
||||||
map('n', '<A-j>', function () require("Navigator").down() end)
|
|
||||||
map('n', '<A-k>', function () require("Navigator").up() end)
|
|
||||||
map('n', '<A-l>', function () require("Navigator").right() end)
|
|
|
@ -1,3 +0,0 @@
|
||||||
require('nvim-autopairs').setup({
|
|
||||||
disable_filetype = { "TelescopePrompt" , "vim" },
|
|
||||||
})
|
|
|
@ -1,49 +0,0 @@
|
||||||
local cmp = require 'cmp'
|
|
||||||
local luasnip = require 'luasnip'
|
|
||||||
require('luasnip.loaders.from_vscode').lazy_load()
|
|
||||||
luasnip.config.setup {}
|
|
||||||
|
|
||||||
cmp.setup {
|
|
||||||
snippet = {
|
|
||||||
expand = function(args)
|
|
||||||
luasnip.lsp_expand(args.body)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
completion = {
|
|
||||||
completeopt = 'menu,menuone,noinsert'
|
|
||||||
},
|
|
||||||
mapping = cmp.mapping.preset.insert {
|
|
||||||
['<C-n>'] = cmp.mapping.select_next_item(),
|
|
||||||
['<C-p>'] = cmp.mapping.select_prev_item(),
|
|
||||||
['<C-d>'] = cmp.mapping.scroll_docs(-4),
|
|
||||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
|
||||||
['<C-Space>'] = cmp.mapping.complete {},
|
|
||||||
['<CR>'] = cmp.mapping.confirm {
|
|
||||||
behavior = cmp.ConfirmBehavior.Replace,
|
|
||||||
select = true,
|
|
||||||
},
|
|
||||||
['<Tab>'] = cmp.mapping(function(fallback)
|
|
||||||
if cmp.visible() then
|
|
||||||
cmp.select_next_item()
|
|
||||||
elseif luasnip.expand_or_locally_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.locally_jumpable(-1) then
|
|
||||||
luasnip.jump(-1)
|
|
||||||
else
|
|
||||||
fallback()
|
|
||||||
end
|
|
||||||
end, { 'i', 's' }),
|
|
||||||
},
|
|
||||||
sources = {
|
|
||||||
{ name = 'nvim_lsp' },
|
|
||||||
{ name = 'luasnip' },
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
vim.g.loaded_netrw = 1
|
|
||||||
vim.g.loaded_netrwPlugin = 1
|
|
||||||
|
|
||||||
require("nvim-tree").setup({
|
|
||||||
update_focused_file = {
|
|
||||||
enable = true,
|
|
||||||
update_root = false,
|
|
||||||
ignore_list = { "help" },
|
|
||||||
},
|
|
||||||
filters = {
|
|
||||||
custom = { '.git' },
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.keymap.set('n', '<C-m>', ':NvimTreeToggle<CR>', { silent=true })
|
|
|
@ -1,30 +0,0 @@
|
||||||
require('telescope').setup {
|
|
||||||
defaults = {
|
|
||||||
mappings = {
|
|
||||||
i = {
|
|
||||||
['<C-u>'] = false,
|
|
||||||
['<C-d>'] = false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
pcall(require('telescope').load_extension, 'fzf')
|
|
||||||
|
|
||||||
vim.keymap.set('n', '<leader>?', require('telescope.builtin').oldfiles, { desc = '[?] Find recently opened files' })
|
|
||||||
vim.keymap.set('n', '<leader>/', function()
|
|
||||||
require('telescope.builtin').current_buffer_fuzzy_find(require('telescope.themes').get_dropdown {
|
|
||||||
winblend = 10,
|
|
||||||
previewer = false,
|
|
||||||
})
|
|
||||||
|
|
||||||
end, { desc = '[/] Fuzzily search in current buffer' })
|
|
||||||
|
|
||||||
vim.keymap.set('n', '<leader>gf', require('telescope.builtin').git_files, { desc = 'Search [G]it [F]iles' })
|
|
||||||
vim.keymap.set('n', '<leader>sf', require('telescope.builtin').find_files, { desc = '[S]earch [F]iles' })
|
|
||||||
vim.keymap.set('n', '<leader>sh', require('telescope.builtin').help_tags, { desc = '[S]earch [H]elp' })
|
|
||||||
vim.keymap.set('n', '<leader>sw', require('telescope.builtin').grep_string, { desc = '[S]earch current [W]ord' })
|
|
||||||
vim.keymap.set('n', '<leader>sg', require('telescope.builtin').live_grep, { desc = '[S]earch by [G]rep' })
|
|
||||||
vim.keymap.set('n', '<leader>sd', require('telescope.builtin').diagnostics, { desc = '[S]earch [D]iagnostics' })
|
|
||||||
vim.keymap.set('n', '<leader>sr', require('telescope.builtin').resume, { desc = '[S]earch [R]esume' })
|
|
||||||
vim.keymap.set('n', '<leader>sm', require('telescope.builtin').treesitter)
|
|
|
@ -1,51 +0,0 @@
|
||||||
vim.defer_fn(function()
|
|
||||||
require('nvim-treesitter.configs').setup {
|
|
||||||
-- Add languages to be installed here that you want installed for treesitter
|
|
||||||
ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'tsx', 'javascript', 'typescript', 'vimdoc', 'vim', 'bash' },
|
|
||||||
|
|
||||||
-- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!)
|
|
||||||
auto_install = true,
|
|
||||||
|
|
||||||
highlight = { enable = true },
|
|
||||||
indent = { enable = true },
|
|
||||||
incremental_selection = {
|
|
||||||
enable = true,
|
|
||||||
},
|
|
||||||
textobjects = {
|
|
||||||
select = {
|
|
||||||
enable = true,
|
|
||||||
lookahead = true, -- Automatically jump forward to textobj, similar to targets.vim
|
|
||||||
keymaps = {
|
|
||||||
-- You can use the capture groups defined in textobjects.scm
|
|
||||||
['aa'] = '@parameter.outer',
|
|
||||||
['ia'] = '@parameter.inner',
|
|
||||||
['af'] = '@function.outer',
|
|
||||||
['if'] = '@function.inner',
|
|
||||||
['ac'] = '@class.outer',
|
|
||||||
['ic'] = '@class.inner',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
move = {
|
|
||||||
enable = true,
|
|
||||||
set_jumps = true, -- whether to set jumps in the jumplist
|
|
||||||
goto_next_start = {
|
|
||||||
[']m'] = '@function.outer',
|
|
||||||
[']]'] = '@class.outer',
|
|
||||||
},
|
|
||||||
goto_next_end = {
|
|
||||||
[']M'] = '@function.outer',
|
|
||||||
[']['] = '@class.outer',
|
|
||||||
},
|
|
||||||
goto_previous_start = {
|
|
||||||
['[m'] = '@function.outer',
|
|
||||||
['[['] = '@class.outer',
|
|
||||||
},
|
|
||||||
goto_previous_end = {
|
|
||||||
['[M'] = '@function.outer',
|
|
||||||
['[]'] = '@class.outer',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
swap = { enable = false, },
|
|
||||||
},
|
|
||||||
}
|
|
||||||
end, 0)
|
|
|
@ -1,6 +0,0 @@
|
||||||
vim.keymap.set("n", "<leader>xx", function() require("trouble").toggle() end)
|
|
||||||
vim.keymap.set("n", "<leader>xw", function() require("trouble").toggle("workspace_diagnostics") end)
|
|
||||||
vim.keymap.set("n", "<leader>xd", function() require("trouble").toggle("document_diagnostics") end)
|
|
||||||
vim.keymap.set("n", "<leader>xq", function() require("trouble").toggle("quickfix") end)
|
|
||||||
vim.keymap.set("n", "<leader>xl", function() require("trouble").toggle("loclist") end)
|
|
||||||
vim.keymap.set("n", "gR", function() require("trouble").toggle("lsp_references") end)
|
|
7
.config/nvim/lua/plugins/autopairs.lua
Normal file
7
.config/nvim/lua/plugins/autopairs.lua
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
return {
|
||||||
|
'windwp/nvim-autopairs',
|
||||||
|
event = 'InsertEnter',
|
||||||
|
opts = {
|
||||||
|
disable_filetype = { "TelescopePrompt", "vim" },
|
||||||
|
},
|
||||||
|
}
|
59
.config/nvim/lua/plugins/cmp.lua
Normal file
59
.config/nvim/lua/plugins/cmp.lua
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
return {
|
||||||
|
'hrsh7th/nvim-cmp',
|
||||||
|
|
||||||
|
dependencies = {
|
||||||
|
'hrsh7th/cmp-nvim-lsp',
|
||||||
|
'hrsh7th/cmp-buffer',
|
||||||
|
'onsails/lspkind.nvim'
|
||||||
|
},
|
||||||
|
|
||||||
|
config = function()
|
||||||
|
local cmp = require('cmp')
|
||||||
|
local lspkind = require('lspkind')
|
||||||
|
cmp.setup({
|
||||||
|
completion = {
|
||||||
|
completeopt = 'menu,menuone,noinsert'
|
||||||
|
},
|
||||||
|
|
||||||
|
mapping = cmp.mapping.preset.insert {
|
||||||
|
['<C-n>'] = cmp.mapping.select_next_item(),
|
||||||
|
['<C-p>'] = cmp.mapping.select_prev_item(),
|
||||||
|
['<C-k>'] = cmp.mapping.scroll_docs(-4),
|
||||||
|
['<C-j>'] = cmp.mapping.scroll_docs(4),
|
||||||
|
['<C-Space>'] = cmp.mapping.complete {},
|
||||||
|
['<CR>'] = cmp.mapping.confirm { select = true },
|
||||||
|
['<Tab>'] = cmp.mapping(function(fallback)
|
||||||
|
if cmp.visible() then
|
||||||
|
cmp.select_next_item()
|
||||||
|
else
|
||||||
|
fallback()
|
||||||
|
end
|
||||||
|
end, { 'i', 's' }),
|
||||||
|
['<S-Tab>'] = cmp.mapping(function(fallback)
|
||||||
|
if cmp.visible() then
|
||||||
|
cmp.select_prev_item()
|
||||||
|
else
|
||||||
|
fallback()
|
||||||
|
end
|
||||||
|
end, { 'i', 's' }),
|
||||||
|
},
|
||||||
|
|
||||||
|
sources = {
|
||||||
|
{ name = 'nvim_lsp' },
|
||||||
|
{ name = 'buffer' },
|
||||||
|
},
|
||||||
|
|
||||||
|
--- @diagnostic disable-next-line: missing-fields
|
||||||
|
formatting = {
|
||||||
|
format = lspkind.cmp_format({
|
||||||
|
mode = 'symbol_text',
|
||||||
|
show_labelDetails = true,
|
||||||
|
menu = ({
|
||||||
|
buffer = "[Buffer]",
|
||||||
|
nvim_lsp = "[LSP]",
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
end
|
||||||
|
}
|
12
.config/nvim/lua/plugins/comment.lua
Normal file
12
.config/nvim/lua/plugins/comment.lua
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
return {
|
||||||
|
'numToStr/Comment.nvim',
|
||||||
|
opts = {},
|
||||||
|
config = function()
|
||||||
|
vim.keymap.set({ 'n', 'i' }, '<C-_>', require('Comment.api').toggle.linewise.current)
|
||||||
|
vim.keymap.set('v', '<C-_>', function()
|
||||||
|
vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes('<ESC>', true, false, true), 'nx', false)
|
||||||
|
require('Comment.api').toggle.linewise(vim.fn.visualmode())
|
||||||
|
end
|
||||||
|
)
|
||||||
|
end
|
||||||
|
}
|
|
@ -1,5 +0,0 @@
|
||||||
return {
|
|
||||||
'lukas-reineke/indent-blankline.nvim',
|
|
||||||
main = 'ibl',
|
|
||||||
opts = {},
|
|
||||||
}
|
|
|
@ -1,20 +1,24 @@
|
||||||
return {
|
return {
|
||||||
'Civitasv/cmake-tools.nvim',
|
'rcarriga/nvim-notify',
|
||||||
'averms/black-nvim',
|
{ 'kylechui/nvim-surround', version = '*', event = 'VeryLazy', opts = {} },
|
||||||
'numToStr/Navigator.nvim',
|
{ 'akinsho/bufferline.nvim', config = {} },
|
||||||
'nvim-lualine/lualine.nvim',
|
{ 'ethanholz/nvim-lastplace', config = {} },
|
||||||
'nvim-tree/nvim-tree.lua',
|
{ 'norcalli/nvim-colorizer.lua', opts = {}, config = function ()
|
||||||
'nvim-tree/nvim-web-devicons',
|
require('colorizer').setup()
|
||||||
'rcarriga/nvim-notify',
|
end },
|
||||||
'tmux-plugins/vim-tmux',
|
{ 'nvim-treesitter/nvim-treesitter-context', dependencies = { 'nvim-treesitter/nvim-treesitter' }},
|
||||||
'tpope/vim-fugitive',
|
{ 'wakatime/vim-wakatime', event = 'VeryLazy' },
|
||||||
'tpope/vim-rhubarb',
|
|
||||||
'tpope/vim-sleuth',
|
{ 'lukas-reineke/indent-blankline.nvim',
|
||||||
'tpope/vim-surround',
|
main = 'ibl',
|
||||||
'nvim-treesitter/nvim-treesitter-context',
|
opts = {},
|
||||||
{ 'akinsho/bufferline.nvim', config = {} },
|
dependencies = { 'olimorris/onedarkpro.nvim' }
|
||||||
{ 'ethanholz/nvim-lastplace', config = {} },
|
},
|
||||||
{ 'numToStr/Comment.nvim', opts = {} },
|
|
||||||
{ 'wakatime/vim-wakatime', event = 'VeryLazy' },
|
{ 'neovim/nvim-lspconfig', dependencies = {
|
||||||
{ "folke/trouble.nvim", dependencies = { "nvim-tree/nvim-web-devicons" }, opts = { }, }
|
'folke/neodev.nvim',
|
||||||
|
'williamboman/mason-lspconfig.nvim',
|
||||||
|
'williamboman/mason.nvim',
|
||||||
|
{ 'j-hui/fidget.nvim', opts = {} },
|
||||||
|
}},
|
||||||
}
|
}
|
||||||
|
|
14
.config/nvim/lua/plugins/navigator.lua
Normal file
14
.config/nvim/lua/plugins/navigator.lua
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
return {
|
||||||
|
'numToStr/Navigator.nvim',
|
||||||
|
config = function()
|
||||||
|
require('Navigator').setup({
|
||||||
|
disable_on_zoom = true
|
||||||
|
})
|
||||||
|
local map = vim.keymap.set
|
||||||
|
|
||||||
|
map('n', '<A-h>', function() require("Navigator").left() end)
|
||||||
|
map('n', '<A-j>', function() require("Navigator").down() end)
|
||||||
|
map('n', '<A-k>', function() require("Navigator").up() end)
|
||||||
|
map('n', '<A-l>', function() require("Navigator").right() end)
|
||||||
|
end
|
||||||
|
}
|
|
@ -1,5 +0,0 @@
|
||||||
return {
|
|
||||||
'windwp/nvim-autopairs',
|
|
||||||
event = "InsertEnter",
|
|
||||||
opts = {}
|
|
||||||
}
|
|
|
@ -1,14 +0,0 @@
|
||||||
return {
|
|
||||||
'hrsh7th/nvim-cmp',
|
|
||||||
dependencies = {
|
|
||||||
-- Snippet Engine & its associated nvim-cmp source
|
|
||||||
'L3MON4D3/LuaSnip',
|
|
||||||
'saadparwaiz1/cmp_luasnip',
|
|
||||||
|
|
||||||
-- Adds LSP completion capabilities
|
|
||||||
'hrsh7th/cmp-nvim-lsp',
|
|
||||||
|
|
||||||
-- Adds a number of user-friendly snippets
|
|
||||||
'rafamadriz/friendly-snippets',
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
return {
|
|
||||||
'neovim/nvim-lspconfig',
|
|
||||||
dependencies = {
|
|
||||||
'williamboman/mason.nvim',
|
|
||||||
'williamboman/mason-lspconfig.nvim',
|
|
||||||
|
|
||||||
{ 'j-hui/fidget.nvim', opts = {} },
|
|
||||||
|
|
||||||
'folke/neodev.nvim',
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -1,8 +0,0 @@
|
||||||
return {
|
|
||||||
-- Highlight, edit, and navigate code
|
|
||||||
'nvim-treesitter/nvim-treesitter',
|
|
||||||
dependencies = {
|
|
||||||
'nvim-treesitter/nvim-treesitter-textobjects',
|
|
||||||
},
|
|
||||||
build = ':TSUpdate',
|
|
||||||
}
|
|
|
@ -1,6 +0,0 @@
|
||||||
return {
|
|
||||||
'navarasu/onedark.nvim',
|
|
||||||
config = function()
|
|
||||||
vim.cmd.colorscheme 'onedark'
|
|
||||||
end,
|
|
||||||
}
|
|
|
@ -1,8 +1,41 @@
|
||||||
return {
|
return {
|
||||||
'nvim-telescope/telescope.nvim',
|
'nvim-telescope/telescope.nvim',
|
||||||
branch = '0.1.x',
|
branch = '0.1.x',
|
||||||
dependencies = {
|
dependencies = {
|
||||||
'nvim-lua/plenary.nvim',
|
'nvim-lua/plenary.nvim',
|
||||||
{ 'nvim-telescope/telescope-fzf-native.nvim', build = 'make', },
|
{ 'nvim-telescope/telescope-fzf-native.nvim', build = 'make' },
|
||||||
},
|
},
|
||||||
|
|
||||||
|
config = function()
|
||||||
|
require('telescope').setup {
|
||||||
|
defaults = {
|
||||||
|
mappings = {
|
||||||
|
i = {
|
||||||
|
['<C-u>'] = false,
|
||||||
|
['<C-d>'] = false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
pcall(require('telescope').load_extension, 'fzf')
|
||||||
|
|
||||||
|
|
||||||
|
vim.keymap.set('n', '<leader>/', function()
|
||||||
|
require('telescope.builtin').current_buffer_fuzzy_find(require('telescope.themes').get_ivy {
|
||||||
|
winblend = 10,
|
||||||
|
previewer = true,
|
||||||
|
})
|
||||||
|
end)
|
||||||
|
|
||||||
|
vim.keymap.set('n', '<leader>?', require('telescope.builtin').live_grep)
|
||||||
|
vim.keymap.set('n', '<leader>of', require('telescope.builtin').oldfiles)
|
||||||
|
vim.keymap.set('n', '<leader>af', require('telescope.builtin').git_files)
|
||||||
|
vim.keymap.set('n', '<leader>sf', require('telescope.builtin').find_files)
|
||||||
|
vim.keymap.set('n', '<leader>sh', require('telescope.builtin').help_tags)
|
||||||
|
vim.keymap.set('n', '<leader>sw', require('telescope.builtin').grep_string)
|
||||||
|
vim.keymap.set('n', '<leader>sd', require('telescope.builtin').diagnostics)
|
||||||
|
vim.keymap.set('n', '<leader>sr', require('telescope.builtin').resume)
|
||||||
|
vim.keymap.set('n', '<leader>sm', require('telescope.builtin').treesitter)
|
||||||
|
end
|
||||||
}
|
}
|
||||||
|
|
42
.config/nvim/lua/plugins/theme.lua
Normal file
42
.config/nvim/lua/plugins/theme.lua
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
return {
|
||||||
|
'navarasu/onedark.nvim',
|
||||||
|
config = function()
|
||||||
|
require('onedark').setup {
|
||||||
|
style = 'darker',
|
||||||
|
transparent = false,
|
||||||
|
term_colors = false,
|
||||||
|
ending_tildes = false,
|
||||||
|
cmp_itemkind_reverse = false,
|
||||||
|
|
||||||
|
code_style = {
|
||||||
|
comments = 'italic',
|
||||||
|
keywords = 'none',
|
||||||
|
functions = 'none',
|
||||||
|
strings = 'none',
|
||||||
|
variables = 'none'
|
||||||
|
},
|
||||||
|
|
||||||
|
lualine = {
|
||||||
|
transparent = true,
|
||||||
|
},
|
||||||
|
|
||||||
|
colors = {
|
||||||
|
bg0 = "#101010",
|
||||||
|
bg1 = "#1a1a1a",
|
||||||
|
bg2 = "#151515",
|
||||||
|
bg3 = "#242424",
|
||||||
|
bg_d = "#101010",
|
||||||
|
fg = "#c6c6c6",
|
||||||
|
},
|
||||||
|
highlights = {},
|
||||||
|
|
||||||
|
diagnostics = {
|
||||||
|
darker = true,
|
||||||
|
undercurl = true,
|
||||||
|
background = true,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
vim.o.termguicolors = true
|
||||||
|
vim.cmd.colorscheme 'onedark'
|
||||||
|
end,
|
||||||
|
}
|
|
@ -1,3 +0,0 @@
|
||||||
return {
|
|
||||||
"numToStr/Navigator.nvim",
|
|
||||||
}
|
|
26
.config/nvim/lua/plugins/tree.lua
Normal file
26
.config/nvim/lua/plugins/tree.lua
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
return {
|
||||||
|
'nvim-tree/nvim-tree.lua',
|
||||||
|
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
||||||
|
config = function()
|
||||||
|
vim.g.loaded_netrw = 1
|
||||||
|
vim.g.loaded_netrwPlugin = 1
|
||||||
|
|
||||||
|
require("nvim-tree").setup({
|
||||||
|
update_focused_file = {
|
||||||
|
enable = true,
|
||||||
|
update_root = false,
|
||||||
|
ignore_list = { "help" },
|
||||||
|
},
|
||||||
|
filters = {
|
||||||
|
custom = { '.git' },
|
||||||
|
},
|
||||||
|
actions = {
|
||||||
|
open_file = {
|
||||||
|
quit_on_open = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.keymap.set('n', 'Ā', ':NvimTreeToggle<CR>', { silent = true })
|
||||||
|
end
|
||||||
|
}
|
14
.config/nvim/lua/plugins/treesitter.lua
Normal file
14
.config/nvim/lua/plugins/treesitter.lua
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
return {
|
||||||
|
'nvim-treesitter/nvim-treesitter',
|
||||||
|
dependencies = { 'nvim-treesitter/nvim-treesitter-textobjects', },
|
||||||
|
build = ':TSUpdate',
|
||||||
|
config = function()
|
||||||
|
vim.defer_fn(function()
|
||||||
|
require('nvim-treesitter.configs').setup({
|
||||||
|
auto_install = true,
|
||||||
|
highlight = { enable = true },
|
||||||
|
indent = { enable = true },
|
||||||
|
})
|
||||||
|
end, 0)
|
||||||
|
end
|
||||||
|
}
|
|
@ -1,31 +1,15 @@
|
||||||
local M = { }
|
local M = { }
|
||||||
|
|
||||||
local function try_quit(command)
|
|
||||||
local success, errorMsg = pcall(vim.api.nvim_command, command)
|
|
||||||
if not success then
|
|
||||||
print("Failed to quit: " .. errorMsg)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function M.close_buffer(force)
|
function M.close_buffer(force)
|
||||||
local buf_cmd = "bd"
|
if #vim.fn.filter(vim.fn.range(1, vim.fn.bufnr '$'), 'buflisted(v:val)') <= 1 then
|
||||||
local quit_cmd = "qa"
|
vim.api.nvim_command("qa" .. (force and "!" or ""))
|
||||||
|
else
|
||||||
|
local tree = require("nvim-tree.api").tree
|
||||||
|
|
||||||
if force then
|
tree.toggle({ focus = false })
|
||||||
buf_cmd = "bd!"
|
vim.api.nvim_command("bd" .. (force and "!" or ""))
|
||||||
quit_cmd = "qa!"
|
tree.toggle({ focus = false })
|
||||||
end
|
end
|
||||||
|
|
||||||
local tree = require("nvim-tree.api").tree
|
|
||||||
local buffer_count = #vim.fn.filter(vim.fn.range(1, vim.fn.bufnr '$'), 'buflisted(v:val)')
|
|
||||||
|
|
||||||
if buffer_count == 1 or buffer_count == 0 then
|
|
||||||
try_quit(quit_cmd)
|
|
||||||
else
|
|
||||||
tree.toggle({ focus = false })
|
|
||||||
try_quit(buf_cmd)
|
|
||||||
tree.toggle({ focus = false })
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
local M = { }
|
local M = { }
|
||||||
|
|
||||||
function M.lazy_init()
|
function M.lazy_init()
|
||||||
local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
|
local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
|
||||||
if not vim.loop.fs_stat(lazypath) then
|
if not vim.loop.fs_stat(lazypath) then
|
||||||
vim.fn.system {
|
vim.fn.system {
|
||||||
'git',
|
'git',
|
||||||
'clone',
|
'clone',
|
||||||
'--filter=blob:none',
|
'--filter=blob:none',
|
||||||
'https://github.com/folke/lazy.nvim.git',
|
'https://github.com/folke/lazy.nvim.git',
|
||||||
'--branch=stable', -- latest stable release
|
'--branch=stable',
|
||||||
lazypath,
|
lazypath,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
vim.opt.rtp:prepend(lazypath)
|
vim.opt.rtp:prepend(lazypath)
|
||||||
end
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue