jackguo380 / vim-lsp-cxx-highlight

Vim plugin for C/C++/ObjC semantic highlighting using cquery, ccls, or clangd
MIT License
337 stars 26 forks source link

Not working for clangd 13 #56

Closed jackhub closed 3 years ago

jackhub commented 3 years ago

Download newest release for clangd. clangd version 13.0.0 (https://github.com/llvm/llvm-project beea06c10642e99051a472a534ac6ede02264e41)

https://github.com/clangd/clangd/releases

Maybe some protocol has changed?

jackhub commented 3 years ago

I have checked the log from clangd. Here is the error message, please help how to fix it, thanks.

E[23:44:29.579] Client requested legacy semanticHighlights notification, which is no longer supported. Migrate to standard semanticTokens request

jackguo380 commented 3 years ago

Hi,

Unfortunately, as that message says, clangd will no longer support the older protocol.

SemanticTokens is the new protocol that got accepted in to the official LSP specification. This means that LSP clients must implement it to be considered feature complete (coc.nvim is already implementing it neoclide/coc.nvim#2756).

Given that LSP clients will implement it eventually, I don't plan on updating vim-lsp-cxx-highlight to support it. Another reason is that it simply isn't feasible to implement semanticTokens in a third party/addon plugin. Most LSP clients support a very basic public API which plugins like this one currently use, the semanticTokens protocol is much more complex making it too hard to implement via those APIs.

If you would like your LSP client to implement the feature sooner consider contributing code or just help test the feature and provide feedback. Sorry I can't be of any help here.