Initial commit

This commit is contained in:
Alexey 2026-02-24 11:55:27 +03:00
commit e7b4be7296
17 changed files with 213 additions and 0 deletions

33
lua/plugins/cmp.lua Normal file
View file

@ -0,0 +1,33 @@
return {
{
"hrsh7th/nvim-cmp",
event = "InsertEnter",
dependencies = {
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-buffer",
},
opts = function()
local cmp = require 'cmp'
return {
snippet = {
expand = function(args)
vim.snippet.expand(args.body)
end,
},
window = {
completion = cmp.config.window.bordered(),
},
mapping = cmp.mapping.preset.insert({
['<C-Space>'] = cmp.mapping.complete(),
['<C-e>'] = cmp.mapping.abort(),
['<CR>'] = cmp.mapping.confirm({ select = true }),
}),
sources = cmp.config.sources({
{ name = 'nvim_lsp' },
{ name = 'buffer' },
{ name = 'lazydev', group_index = 0 }
}),
}
end,
}
}