initial commit
This commit is contained in:
commit
970a7c22e1
8 changed files with 477 additions and 0 deletions
33
lua/configs/cmp.lua
Normal file
33
lua/configs/cmp.lua
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue