Closed MuAlphaOmegaEpsilon closed 4 years ago
Hi, as mentioned in the readme, clangd is only supported when you are using coc.nvim with coc-clangd. I don't plan on implementing it either for reasons stated in #14, tl;dr its too hard/impossible without the LSP client allowing a third-party plugin control over negotation with the server.
As for why :help
isn't working, its probably to do with needing to generate helptags
since you are using the builtin plugin manager rather than something like vim-plug
which does it automatically.
Oh, reading the README.md I thought coc-clangd
was necessary only if using coc.nvim
...
Clangd at the moment is supported by nvim-lsp, so I thought that by leveraging the latter it would be possible to also support the former.
Ok, I'm not aware of helptags, but I'll dig into that.
Give me a shout if one day or another you integrate clangd into this plugin, because I would be really interested in that.
Thank you!
Technically all LSP clients support all LSP servers to some degree since that is the goal of the protocol. But unfortunately since the protocol is so slow to standardize things (semantic highlighting in particular), various servers have added non-standard extensions for various features. Even though nvim-lsp works well with clangd for completion and code navigation it won't work with clangd's semantic highlighting since its a different protocol from what is currently standardized.
Here are the options if you are looking for semantic highlighting:
coc.nvim
for your LSP client, if you prefer clangd
over ccls
ccls
as your LSP server since it works with all the clients vim-lsp-cxx-highlight works with.Thank you for your time and tips!
Here are the options if you are looking for semantic highlighting:
* Wait for semantic highlighting to become part of the standard, at that point nvim-lsp will have to implement it. * Switch to `coc.nvim` for your LSP client, if you prefer `clangd` over `ccls` * Switch to `ccls` as your LSP server since it works with all the clients vim-lsp-cxx-highlight works with.
+another option: Have a look at treesitter (for neovim: nvim-treesitter), it's not perfect (yet), but I think it could provide the highlighting you are looking for + some handy extra features, and personally, it "feels" more "accurate" than the clangd highlighting. It's being implemented into neovim right now. Below is a screenshot comparing different plugins/highlighters:
Top right is nvim-treesitter, bottom right is LanguageClient-Neovim + clangd.
EDIT: nvim-treesitter bug seems to be fixed in their latest release, my bad...
Describe the bug
:help vim-lsp-cxx-highlight
returnsE149: Sorry, no help for vim-lsp-cxx-highlight
:LspCxxHl...
commands are autocompleted by nvim, but the highlight related ones do nothing, and the symbols one return an empty list, like the one belowIntent I would like to use this plugin in combination with nvim-lsp and clangd, which is the LSP server that I am actually using. The plugin is correctly loaded, as it appears under the list generated by
:scriptnames
.To Reproduce
Expected behavior The highlighting should actually work. Symbols related commands should return a non-empty list. The plugin help should show up.
Configuration (Fill this out):
Log File: