Fix LSP and update plugins
- Structure LSP configuration code - Since `lsp-zero` is deprecated, instead use `nvim-lspconfig` - Use `nvim_lsp_signature_help` instead of `lsp_signature`
This commit is contained in:
parent
b25bcaf11a
commit
456046c4a7
11 changed files with 105 additions and 103 deletions
25
nvim/lua/lsp/cmp.lua
Normal file
25
nvim/lua/lsp/cmp.lua
Normal file
|
@ -0,0 +1,25 @@
|
|||
local cmp = require('cmp')
|
||||
local sneng = require(snippet_engine)
|
||||
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
sneng.lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
window = {
|
||||
completion = cmp.config.window.bordered(),
|
||||
documentation = cmp.config.window.bordered(),
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
['<C-p>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-n>'] = cmp.mapping.scroll_docs(4),
|
||||
['<tab>'] = cmp.mapping.confirm({ select = true }),
|
||||
['<C-space>'] = cmp.mapping.complete(),
|
||||
}),
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'nvim_lsp_signature_help' },
|
||||
{ name = sneng_name },
|
||||
})
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue