Coc.nvim: Optionally allow extra client capabilities (semanticHighlight)

Created on 20 Mar 2020  路  8Comments  路  Source: neoclide/coc.nvim

Is your feature request related to a problem? Please describe.
not a problem - just extra capabilities: In order to use the semantic highlighting provided by clangd (9), extra capabilities support is needed - see: https://github.com/jackguo380/vim-lsp-cxx-highlight/issues/14

Describe the solution you'd like
I'm not sure I know the best way to support this - maybe allow extra config params for capabilities OR allow other plugins to register extra capabilities?

Describe alternatives you've considered
Right now I run both ccls and clangd...the former is just for highlighting. I like the features of clangd and would prefer to just run that one.

Additional context
The issue referenced above has some links to other LSP client implementations

Thank you.

Most helpful comment

This needs to be done by coc not by each extension.

Yes, but semanticHighlighting, or new called semanticTokens protocol has not finished yet, it's in proposed state. https://github.com/microsoft/vscode-languageserver-node/blob/master/protocol/src/protocol.semanticTokens.proposed.ts We will add it when it finished.

All 8 comments

Create extension is the best way to make use of extra language server capabilities

Maybe coc-clangd can add this, I'll look into it.

@chemzqm https://github.com/autozimu/LanguageClient-neovim/pull/954
I don't know if you're aware of it, but microsoft apparently created extension for LSP that provides semantic highlights. It's already used by vscode and language-client-neovim is implemented it already. It's a great feature, so maybe this issue needs to be reopened?

@purpleP -- I believe @fannheyward added support for semantic-highlight to https://github.com/clangd/coc-clangd already - It works quite well. See the readme for more information.

@mellery451 It's a general feature that wil be supported by most language servers.
Why are you mentioning clangd extension?

You need to have a code that will send requests to language server on each change to get changes in highlights etc etc. This needs to be done by coc not by each extension.

This needs to be done by coc not by each extension.

Yes

This needs to be done by coc not by each extension.

Yes, but semanticHighlighting, or new called semanticTokens protocol has not finished yet, it's in proposed state. https://github.com/microsoft/vscode-languageserver-node/blob/master/protocol/src/protocol.semanticTokens.proposed.ts We will add it when it finished.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

aareman picture aareman  路  3Comments

chemzqm picture chemzqm  路  3Comments

zhou13 picture zhou13  路  3Comments

svenstaro picture svenstaro  路  4Comments

tom-james-watson picture tom-james-watson  路  3Comments