Inherit default color in highlighter

Answered
Is there any way to extend existing highlighting colors? I developed plugin for custom language which has 2 kinds of variables I want to distinguish:
- block variables
- global variables
 
I would like to color them with the same color as DefaultLanguageHighlighterColors.INSTANCE_FIELD has, but make global variables bold. I created MyLangHighlighterColors object:
object MyLangHighlighterColors {
    val BLOCK_VARIABLE = TextAttributesKey.createTextAttributesKey("BLOCK_VARIABLE", DefaultLanguageHighlighterColors.INSTANCE_FIELD)
    val GLOBAL_VARIABLE = TextAttributesKey.createTextAttributesKey("GLOBAL_VARIABLE", DefaultLanguageHighlighterColors.INSTANCE_FIELD)
}
 
and colorSchemes/MyLangDefault.xml:
<?xml version='1.0'?>
<list>
<option name="GLOBAL_VARIABLE">
<value>
<option name="FONT_TYPE" value="1"/>
</value>
</option>
</list>
 
I registered it in plugin.xml:
<additionalTextAttributes scheme="Default" file="colorSchemes/MyLangDefault.xml"/>
 
Unfortunately global variables doesn't have INSTANCE_FIELD's color. Is there any way to inherit color from INSTANCE_FIELD and overwrite only font type (or other) option?
1 comment
Comment actions Permalink

Unfortuantely that's not possible at the moment. There are similar requests like this one: https://youtrack.jetbrains.com/issue/IDEA-160168 and I think we'll implement it at some point. 

1

Please sign in to leave a comment.