This patch adds new styles in lexer_cpp.xml for inactive comments (i.e., those disabled by the preprocessor). Attached are screenshots showing a custom theme making use of these styles, and the patch itself.
Newly added styles:
By default they use the same values as the active styles.
Can you show the same images without these changes?
I'm not sure it is a good idea to add them, because the C++ lexer setup is already confusing and there is no way to see visually what these change...
So to properly implement these you have to modify the sample to use these styles, so people could see the results of their changes. I suppose you need to enable the preprocessor styling for this to work.
I've attached them.
We already support inactive variants for other styles (see the attached styleslist.png), so I think it'd be nice to have inactive comment styles for completeness.
We could add a
#if 0 ... #endifblock to the sample text to help preview these styles. It seems preprocessor styling is always enabled for the sample text window, even if the option is disabled in Editor settings. This should make things easier.Another option is to have a checkbox that turns the entire sample text into "inactive" state, but not sure about it yet.
Last edit: Gokul Krishnan 2018-09-24
Here's a patch updating lexer_cpp.sample with some inactive code block.
I know that we have inactive styles, but I never knew what they affected.
I don't think a check box is a good idea.
Also, I'm not 100% sure, but I think it would be better if we have all inactive styles brouped togather. But this is a separate issue...