-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
vim.lsp.buf.hover don't have any syntax highlight in C file #27563
Comments
Your Neovim version is much too old. Please test the latest nightly. |
Not an Nvim issue. The hover content comes from the language server and the highlights are provided by your colorscheme. |
No it seem that the colorscheme is not the issue here, I change it from dracula to catppuccin - which a very popular colorscheme and you tell me that it does not have the syntax highlight for vim.lsp.buf.hover? |
Who knows; we don't maintain these. (There's a reason the issue template requests reproduction steps with |
And how I can I do that step, can you guide me please? |
Continue this thread, I have gone to the clangd issue and have some progress:
So the first conclusion is that this is the client issue. and after extracting the lsp.log, they say this. Here is my lsp capabilities and attatch:
My apologize, gently ping @clason. |
Please try the latest development version; the hover support has been extensively rewritten. |
Ok I change my nvim to 0.9.5, if this is not the version you want me to change to please tell me, here is the lsp.log. |
I meant the latest nightly (which you can download as an appimage from our releases page). |
NVIM v0.10.0-dev-2427+geb4783fb6 this one? |
Yes. |
Here is the lsp.log for nvim 0.10.0 nightly. The hover still don't work on this version. |
Works for me. So please create a minimal reproducible example (without plugins) I can test with |
And your log is full of |
The log still shows the client sending broken client capabilities. I'm pretty sure the issue is related to the lines mentioning |
Ok the issue fix somewhat thanks to @HighCommander4, I change:
to:
but the format not the syntax color still don't work like I want: Like this, this is when I'm in the file the function is define: However it should separate the The function it self:
Here is the lsp.log. |
Thanks clason for your help. |
This part is a missing feature in clangd (parsing doxygen the way vscode's default c++ language server does it). We have clangd/clangd#529 on file about it. |
Problem
The
vim.lsp.buf.hover
work nicely with Lua language.However, when using it with C file, the feature doesn't have any syntax coloring and look bad.
I try using
lspsaga
plugin and use the command:Lspsaga hover_doc
, also doesn't work. Of course I also downloadmarkdown, markdown_inline
on treesitter, but still nothing change.Steps to reproduce using "nvim -u minimal_init.lua"
I don't really know how to do this step, there seem don't have any guide for me to follow since I am not really good with Lua.
Expected behavior
It should have the syntax highlight and format like the one in Lua file but for C file.
Neovim version (nvim -v)
NVIM v0.8.3 installed via appimage since Unbuntu apt don't have the latest version.
Language server name/version
clangd version 17.0.3 install via zip file since Ubuntu apt don't have the latest version.
Operating system/version
Ubuntu 22.04.4 LTS.
Log file
no log.
The text was updated successfully, but these errors were encountered: