Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Dim inactive regions (C/C++) #10046

Closed
nuid64 opened this issue Mar 30, 2024 · 3 comments
Closed

Dim inactive regions (C/C++) #10046

nuid64 opened this issue Mar 30, 2024 · 3 comments
Labels
C-enhancement Category: Improvements

Comments

@nuid64
Copy link
Contributor

nuid64 commented Mar 30, 2024

It would be nice to have highlighted only code which will be compiled. Seen this feature in VSCode cland extension

@nuid64 nuid64 added the C-enhancement Category: Improvements label Mar 30, 2024
@nuid64 nuid64 changed the title Dim inactive conditional compiled code (C/C++) Dim inactive regions (C/C++) Mar 30, 2024
@the-mikedavis
Copy link
Member

I assume that clang implements this using diagnostic tags like rust-analyzer does. So this should have been implemented in #9780. You can try using the latest master branch along with a theme that defines diagnostic.unnecessary, for example the default theme after that PR was merged:

helix/theme.toml

Lines 83 to 84 in 64c1de1

"diagnostic.unnecessary" = { modifiers = ["dim"] }
"diagnostic.deprecated" = { modifiers = ["crossed_out"] }

@nuid64
Copy link
Contributor Author

nuid64 commented Mar 31, 2024

Oh, that's cool. For some reason this doesn't work with clangd. I can't see it sends any diagnostic tags in helix log

@pascalkuthe
Copy link
Member

I think clangd does this using semantic highlighting which we don't support (duplicate of #5589).

Could be nice to add support for diagnostic tags upstream instead. For example RA supports semantic highlights yet uses diagnostic tags aswell.

@helix-editor helix-editor locked and limited conversation to collaborators Mar 31, 2024
@pascalkuthe pascalkuthe converted this issue into discussion #10068 Mar 31, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
C-enhancement Category: Improvements
Projects
None yet
Development

No branches or pull requests

3 participants