new config

This commit is contained in:
Dario48true 2025-02-03 10:21:51 +01:00
parent ee2563cac6
commit e3d3ab6680
36 changed files with 262 additions and 611 deletions

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

@ -0,0 +1,33 @@
return {
"hrsh7th/nvim-cmp",
dependencies = {
'hrsh7th/cmp-nvim-lsp',
'hrsh7th/cmp-buffer',
'hrsh7th/cmp-path',
'hrsh7th/cmp-cmdline',
'neovim/nvim-lspconfig'
},
config= function()
local cmp = require('cmp')
cmp.setup({
sources = {
{name = 'nvim_lsp'},
{ name = "neorg" },
},
snippet = {
expand = function(args)
-- You need Neovim v0.10 to use vim.snippet
vim.snippet.expand(args.body)
end,
},
mapping = cmp.mapping.preset.insert({
['<C-Space>'] = cmp.mapping.complete(),
['<S-NL>'] = cmp.mapping.scroll_docs(-4),
['<C-S-K>'] = cmp.mapping.scroll_docs(-4),
[' '] = cmp.mapping.confirm(),
['<CR>'] = cmp.mapping.confirm({ select = true }),
}),
})
end
}