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

Doubt regarding capabilities #1847

Closed
BSiddharth opened this issue Mar 9, 2024 · 5 comments
Closed

Doubt regarding capabilities #1847

BSiddharth opened this issue Mar 9, 2024 · 5 comments

Comments

@BSiddharth
Copy link

Should I do local capabilities = require('cmp_nvim_lsp').default_capabilities() or local capabilities = require("cmp_nvim_lsp").update_capabilities(vim.lsp.protocol.make_client_capabilities())

@netrolite
Copy link

Probably local capabilities = require('cmp_nvim_lsp').default_capabilities() because I've only seen people use that and it seems to work just fine

@BSiddharth
Copy link
Author

BSiddharth commented Mar 16, 2024

I am using local capabilities = require('cmp_nvim_lsp').default_capabilities() for now tho I was confused bcz the two examples in https://github.com/hrsh7th/nvim-cmp/wiki/Language-Server-Specific-Samples did it in two different ways

@hrsh7th hrsh7th closed this as completed Mar 22, 2024
@BSiddharth
Copy link
Author

@hrsh7th This was closed but I am still not sure of the answer.

@hrsh7th hrsh7th reopened this Mar 23, 2024
@QuantenToast
Copy link

If you actually try using update_capabilities you are greeted with a deprecation message pointing to default_capabilities as its successor. Does that answer your question?

@BSiddharth
Copy link
Author

@QuantenToast Thanks for that. I guess examples need to be updated and reflect that

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

4 participants