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

C++ StructField not Highlighting with neovim LSP + suggested fix #24

Open
DalenPlanestrider opened this issue Dec 6, 2021 · 1 comment

Comments

@DalenPlanestrider
Copy link

DalenPlanestrider commented Dec 6, 2021

I'm using neovim v0.5.0-dev+1421-ga72dfec85 and using the built in language server protocol client with the vim-lsp-cxx-highlight plugin, and noticed that struct fields are not being properly highlighted in the theme. Example below

off

Inspecting the symbol, I noticed its type was LspCxxHlSymField
type

So all I had to do was add that type to the theme, though I'm not sure if this is the best place for it, it was just by the other struct definition. There's also a separate section for LSP features, so perhaps there?
definition

Either way, adding that line fixed the issue for me
on

@DalenPlanestrider DalenPlanestrider changed the title C++ StructField not Higlighting with neovim LSP + suggested fix C++ StructField not Highlighting with neovim LSP + suggested fix Dec 6, 2021
@DalenPlanestrider
Copy link
Author

Continuing to poke around, I noticed a similar issue with namespaces showing up as macro-yellow, which was fixed by adding

call s:Hi('LspCxxHlSymNamespace', s:p.cDataStructure)

and lastly, there's some weird stuff going on with stuff like strings inside some of my macros being highlighted as enum members or variables, but that seems to be the language server misidentifying after expanding the macro, so no changes required here

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

1 participant