C macro question


I’m checking Atom out for C ESP8266 project.
I’ve a question, is it possible to gray out Inactive Preprocessor Code?
As example

#define DEBUG1_ENABLED 0
#define DEBUG2_ENABLED 1

//code below is gray out
int x = 1;

//code below is highlighted
int x = 1;

Thank you for your help!

Sure… You can pass build_flags to the compiler as defined in the platformio.INI file. It will accomplish what you are asking.

Hello, thank you for your reply. Aren’t the build_flags just for compiler? I need something that does not interact with the compiler, but only with the highlighter engine of the editor.

I am sorry. I thought you were asking about conditional compilation.

If it is syntax highlighting, then no. It is actually not possible. Atleadt I am not aware of any atom plugin that can read the code and automatically grey out the inactive sections.

Hope this helps.

Thank you, that helps, at least I will not searching for something that does not exists.