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

Feature request: De-emphasize dead code with #ifdef #944

Open
MarcelRobitaille opened this issue Jul 8, 2023 · 1 comment
Open

Feature request: De-emphasize dead code with #ifdef #944

MarcelRobitaille opened this issue Jul 8, 2023 · 1 comment

Comments

@MarcelRobitaille
Copy link

VScode has a feature where dead code becomes grayed out if it's inside of an #ifdef of #ifndef that never gets entered.

// This is colored normally
#ifdef NOT_DEFINED
// This is gray
#endif

Since ccls should know the states of all macros, I thought it might be possible to add this feature as well. I am not an expert with LSPs, so maybe this would not currently be possible, but I just wanted to ask :). My client is neovim, if that matters.

BTW I really love ccls and I use it all the time <3. Thank you

@koll1009
Copy link

AFAIK, ccls supported this functionality. It depends on the -D flag in compile_commands.json file

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

2 participants