Add completion, cli on nvim session and others functions

This commit is contained in:
riesjack
2026-03-08 18:44:50 +01:00
parent 291e981da1
commit fd01d77a3b
5 changed files with 92 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
return {
"hrsh7th/nvim-cmp",
dependencies = {
"hrsh7th/cmp-nvim-lsp", -- Source LSP
"hrsh7th/cmp-buffer", -- Source mots du buffer actuel
"hrsh7th/cmp-path", -- Source chemins de fichiers
"L3MON4D3/LuaSnip", -- Moteur de snippets
},
config = function()
local cmp = require("cmp")
cmp.setup({
mapping = cmp.mapping.preset.insert({
['<C-b>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
['<C-Space>'] = cmp.mapping.complete(),
['<CR>'] = cmp.mapping.confirm({ select = true }), -- Entrée pour valider
['<Tab>'] = cmp.mapping.select_next_item(), -- Tab pour descendre
}),
sources = cmp.config.sources({
{ name = 'nvim-lsp' },
{ name = 'buffer' },
{ name = 'path' },
})
})
end
}