lazy: split completion plugins
This commit is contained in:
parent
a6e02d4c04
commit
60c9579bab
1 changed files with 29 additions and 0 deletions
29
lua/plugins/completion.lua
Normal file
29
lua/plugins/completion.lua
Normal file
|
@ -0,0 +1,29 @@
|
|||
return {
|
||||
{
|
||||
"hrsh7th/cmp-nvim-lsp"
|
||||
},
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
|
||||
config = function()
|
||||
local cmp = require("cmp")
|
||||
|
||||
cmp.setup({
|
||||
window = {
|
||||
completion = cmp.config.window.bordered(),
|
||||
documentation = cmp.config.window.bordered()
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
["<C-b>"] = cmp.mapping.scroll_docs(-4),
|
||||
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
||||
["<C-Space>"] = cmp.mapping.complete(),
|
||||
["<C-e>"] = cmp.mapping.abort(),
|
||||
["<CR>"] = cmp.mapping.confirm({ select = true }),
|
||||
}),
|
||||
sources = cmp.config.sources({
|
||||
{ name = "nvim_lsp" }
|
||||
})
|
||||
})
|
||||
end
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue