Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot disable completion for a specified client #24

Closed
przepompownia opened this issue Mar 6, 2022 · 3 comments
Closed

Cannot disable completion for a specified client #24

przepompownia opened this issue Mar 6, 2022 · 3 comments

Comments

@przepompownia
Copy link

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 within on_attach can also prevent from using some method of client but completion is an exception.

Shouldn't source:is_available() return false if self.client.resolved_capabilities.completion is false?

@Shougo
Copy link

Shougo commented Mar 6, 2022

You cannot use the config?
hrsh7th/nvim-cmp#822 (comment)

If so, it is the LSP server problem instead of nvim-cmp.
LSP server must support the capability.

@przepompownia
Copy link
Author

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 😉

@hrsh7th
Copy link
Owner

hrsh7th commented May 1, 2022

See :h cmp-nvim-lsp

@hrsh7th hrsh7th closed this as completed May 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants