mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-02-20 02:18:06 +00:00
lsp: avoid loading cmp on startup
This commit is contained in:
parent
5e6677fb1a
commit
02676d4224
1 changed files with 54 additions and 1 deletions
|
@ -116,7 +116,60 @@ in {
|
|||
end
|
||||
|
||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
${optionalString usingNvimCmp "capabilities = require('cmp_nvim_lsp').default_capabilities()"}
|
||||
${optionalString usingNvimCmp ''
|
||||
-- TODO: copied from cmp-nvim-lsp. If we ever lazy load lspconfig we
|
||||
-- should re-evaluate whether we can just use `default_capabilities`
|
||||
capabilities = {
|
||||
textDocument = {
|
||||
completion = {
|
||||
dynamicRegistration = false,
|
||||
completionItem = {
|
||||
snippetSupport = true,
|
||||
commitCharactersSupport = true,
|
||||
deprecatedSupport = true,
|
||||
preselectSupport = true,
|
||||
tagSupport = {
|
||||
valueSet = {
|
||||
1, -- Deprecated
|
||||
}
|
||||
},
|
||||
insertReplaceSupport = true,
|
||||
resolveSupport = {
|
||||
properties = {
|
||||
"documentation",
|
||||
"detail",
|
||||
"additionalTextEdits",
|
||||
"sortText",
|
||||
"filterText",
|
||||
"insertText",
|
||||
"textEdit",
|
||||
"insertTextFormat",
|
||||
"insertTextMode",
|
||||
},
|
||||
},
|
||||
insertTextModeSupport = {
|
||||
valueSet = {
|
||||
1, -- asIs
|
||||
2, -- adjustIndentation
|
||||
}
|
||||
},
|
||||
labelDetailsSupport = true,
|
||||
},
|
||||
contextSupport = true,
|
||||
insertTextMode = 1,
|
||||
completionList = {
|
||||
itemDefaults = {
|
||||
'commitCharacters',
|
||||
'editRange',
|
||||
'insertTextFormat',
|
||||
'insertTextMode',
|
||||
'data',
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
''}
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue