Closed jbbudzon closed 5 years ago
Hi jbbudzon, glad to hear this plugin is working well for you!
I tried :set list
and changing listchars
to different settings and didn't see any obviously broken behavior. Could you provide a screenshot of the problem?
It may be that this is an LSP parsing issue and completely unrelated to your plugin.
If I run :highlight SpecialKey guifg=white guibg=black
, then I get the following:
So you can see, it is not that SpecialKey
isn't handled correctly but that somehow certain listchars aren't showing up as SpecialKey
any longer. This leads me to believe the issue may not be related to your plugin.
Edit: And thank you very much for your help and for investigating the issue!!
Ah okay, so you are saying that the tabs before the case
should have a black background with white highlighting?
I tried it a random case statement in some code but am not seeing the issue:
I don't think ccls sends keywords highlighting so case
shouldn't be any different from what the vim syntax files define it as. Try putting your cursor over those tabs and running the command :LspCxxHlCursorSym
.
I would expect the output to be the following (No symbol found):
Debug Find Cursor Symbol
Found:
End of Debug Find Cursor Symbol
If you are seeing a output like this then there potentially is a symbol at that location which may be a ccls bug or something:
Debug Find Cursor Symbol
Found:
Symbol: parentKind = Namespace, kind = EnumMember, storage = None, resolved hl group = LspCxxHlSymEnumMember
End of Debug Find Cursor Symbol
I think you've hit the nail on the head. I ran those commands but wasn't sure how to parse the output. You've confirmed for me my suspicions.
When the cursor is on the tab before the case statement, I get
Debug Find Cursor Symbol
Found:
Symbol: parentKind = Unknown, kind = EnumMember, storage = None, resolved hl group = LspCxxHlSymEnumMember
End of Debug Find Cursor Symbol
Seems like a ccls bug to me 😉
Are you using the sample configuration I provided/have the initialization option "highlight": { "lsRanges" : true }
?
If not try enabling it in your coc-settings.json, I know that differing line endings can cause misalignment of highlight symbols.
Feel like such an idiot! I misread your documentation and thought that was only required if byte_offset was missing. This totally fixed my issue. Thank you so very much!!
I recently got ccls and coc.nvim working for my c++ projects. I ❤️ this plugin! Makes syntax highlighting SOO much better!! One issue I have ran into though is with
listchars
andset list
. Thelistchars
are getting highlighted in a way that they shouldn't be.I tried digging around in the code to see if I could come up with a fix but to no avail. I've never really done syntax highlighting in vim so I'm not the most familiar.
From what I've read though,
NonText
andSpecialText
are what control highlighting of the variety of flags available inlistchars
.Any idea how hard this would be to fix/implement??