This commit is contained in:
kenyzum
2026-02-26 15:09:38 +01:00
commit cf8f6fc5f4
8 changed files with 125 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
return {
"hrsh7th/nvim-cmp",
dependencies = {
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-path",
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-nvim-lua",
"saadparwaiz1/cmp_luasnip",
"L3MON4D3/LuaSnip",
},
config = function()
local cmp = require'cmp'
local luasnip = require'luasnip'
cmp.setup({
snippet = { expand = function(args) luasnip.lsp_expand(argx.body) end },
mapping = cmp.mapping.preset.insert({
['<Tab>'] = cmp.mapping.select_next_item(),
['<S-Tab>'] = cmp.mapping.select_prev_item(),
['<CR>'] = cmp.mapping.confirm({ select = true }),
['<C-Space>'] = cmp.mapping.complete(),
}),
sources = {
{ name = 'nvim_lsp' },
{ name = 'luasnip' },
{ name = 'buffer' },
{ name = 'path' },
}
})
end
}