Inactive Code Highlight

DVT editor marks the inactive code (i.e. code that is not compiled due to ifdef / ifndef) with a colored background, foreground and opacity.

To enable or disable the highlight, go to the Settings Page using the Preferences: Open Settings (UI) command, search for the DVT.textEditor.highlight.enableCodeHighlight preference and modify the Inactive Code entry.

Additionally, code highlighting can be customized by setting the Inactive Code entry for the following preferences:

  • Background:

DVT.textEditor.highlight.lightTheme.backgroundColor

Customize the background color when using Light Themes.

Value:
* a predefined colors: gray, purple, yellow, red, blue, green
* a valid hex color code
* empty string for no foreground color

DVT.textEditor.highlight.darkTheme.backgroundColor

Customize the background color when using Dark Themes.

Value:
* a predefined color: brown, purple, red, blue, green, turquoise
* a valid hex color code
* empty string for no foreground color

  • Foreground :

DVT.textEditor.highlight.lightTheme.foregroundColor

Customize the foreground color when using Light Themes.

Value:
* a predefined colors: gray, purple, yellow, red, blue, green
* a valid hex color code
* empty string for no foreground color

DVT.textEditor.highlight.darkTheme.foregroundColor

Customize the foreground color when using Dark Themes.

Value:
* a predefined color: brown, purple, red, blue, green, turquoise
* a valid hex color code
* empty string for no foreground color

  • Opacity :

DVT.textEditor.highlight.opacity

Controls the opacity of code.
Value: number between 0 and 1

../../_images/vscode_highlight_inactive_code.png