| Summary: | Code inside #if directive in c/c++ gets highlighted as commented when LSP Client's Semantic Highlighting Option is enabled | ||
|---|---|---|---|
| Product: | [Applications] kate | Reporter: | sussybakalol328 |
| Component: | general | Assignee: | KWrite Developers <kwrite-bugs-null> |
| Status: | RESOLVED NOT A BUG | ||
| Severity: | normal | CC: | waqar.17a |
| Priority: | NOR | ||
| Version First Reported In: | 22.12.2 | ||
| Target Milestone: | --- | ||
| Platform: | Microsoft Windows | ||
| OS: | Microsoft Windows | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: |
Code with #if directive
Code without #if directive |
||
Created attachment 156077 [details]
Code without #if directive
This is a feature, not a bug :) When the macro directive is not defined/disabled etc. The code has no effect, and thus is treated as disabled / commented. This helps in easily telling if the macro has any affect or not. Of course it can be a bit annoying at times e.g with header only stb style libraries. But Kate can't do anything about this as it is not Kate that decides this, but clangd. So if you want to argue about the behavior best take it up with clangd devs |
Created attachment 156076 [details] Code with #if directive SUMMARY Code inside #if directive gets highlighted as commented when LSP Client's Semantic Highlighting Option is enabled The LSP Server is clangd On removing the #if directives and reopening the file from within Kate, Code Highlighting works normally STEPS TO REPRODUCE 1. Enable the Semantic Highlighting option from LSP Client Settings 2. Write some C/C++ code inside #if directives