Closed przepompownia closed 2 years ago
You cannot use the config? https://github.com/hrsh7th/nvim-cmp/issues/822#issuecomment-1056103013
If so, it is the LSP server problem instead of nvim-cmp. LSP server must support the capability.
Thanks, however I've seen before in source:is_available()
that overriding server_capabilities.completionProvider
can be another workaround (and works).
In general, what is "the proper way" to override the server capabilities (i.e. whether not checking resolved_capabilities.completion
is correct)?
https://github.com/neovim/neovim/blob/a7c999523dbcbb91db56c6eb834034d448e9481c/runtime/lua/vim/lsp.lua#L1469-L1474 https://github.com/neovim/neovim/blob/a7c999523dbcbb91db56c6eb834034d448e9481c/runtime/lua/vim/lsp.lua#L966-L974
Independently, I have no doubt that this is a server problem in particular :wink:
See :h cmp-nvim-lsp
I use a language server for which I want to disable the most of capabilities (it's too slow on some projects). Currently it does not disable any capability given restricted set of
capabilities
on initialization.I noticed that restricting
client.resolved_capabilities
withinon_attach
can also prevent from using some method ofclient
butcompletion
is an exception.Shouldn't
source:is_available()
returnfalse
ifself.client.resolved_capabilities.completion
isfalse
?