initial commit

This commit is contained in:
ant 2023-08-11 21:22:09 +02:00
commit 970a7c22e1
8 changed files with 477 additions and 0 deletions

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

@ -0,0 +1,33 @@
local cmp = require "cmp"
local options = {
completion = {
completeopt = 'menu,menuone,noinsert,noselect'
},
mapping = {
["<C-p>"] = cmp.mapping.select_prev_item(),
["<C-n>"] = cmp.mapping.select_next_item(),
["<C-d>"] = cmp.mapping.scroll_docs(-4),
["<C-f>"] = cmp.mapping.scroll_docs(4),
["<C-Space>"] = cmp.mapping.complete(),
["<C-e>"] = cmp.mapping.close(),
["<CR>"] = cmp.mapping.confirm {
behavior = cmp.ConfirmBehavior.Replace,
select = false,
},
["<Tab>"] = function(callback)
callback()
end,
["<S-Tab>"] = function(callback)
callback()
end,
},
sources = {
{ name = "nvim_lsp" },
{ name = "nvim_lua" },
{ name = "path" },
},
}
return options