@@ -98,12 +98,16 @@ public void visitTypeNameDefinition(@NotNull GraphQLTypeNameDefinition definitio
98
98
99
99
@ Override
100
100
public void visitField (@ NotNull GraphQLField field ) {
101
- applyTextAttributes (field .getNameIdentifier (), FIELD_NAME );
101
+ GraphQLIdentifier nameIdentifier = field .getNameIdentifier ();
102
+ resetKeywordAttributes (nameIdentifier );
103
+ applyTextAttributes (nameIdentifier , FIELD_NAME );
102
104
}
103
105
104
106
@ Override
105
107
public void visitFieldDefinition (@ NotNull GraphQLFieldDefinition fieldDefinition ) {
106
- applyTextAttributes (fieldDefinition .getNameIdentifier (), FIELD_NAME );
108
+ GraphQLIdentifier nameIdentifier = fieldDefinition .getNameIdentifier ();
109
+ resetKeywordAttributes (nameIdentifier );
110
+ applyTextAttributes (nameIdentifier , FIELD_NAME );
107
111
}
108
112
109
113
@ Override
@@ -193,11 +197,12 @@ private void highlightDirectiveName(@NotNull GraphQLElement element, @Nullable G
193
197
194
198
@ Override
195
199
public void visitObjectField (@ NotNull GraphQLObjectField objectField ) {
196
- // first reset the bold font display from keywords such as input/type being used as object field name
197
- resetKeywordAttributes (objectField .getNameIdentifier ());
200
+ GraphQLIdentifier nameIdentifier = objectField .getNameIdentifier ();
198
201
202
+ // first reset the bold font display from keywords such as input/type being used as object field name
203
+ resetKeywordAttributes (nameIdentifier );
199
204
// then apply argument font style
200
- applyTextAttributes (objectField . getNameIdentifier () , OBJECT_FIELD );
205
+ applyTextAttributes (nameIdentifier , OBJECT_FIELD );
201
206
}
202
207
203
208
private void applyTextAttributes (@ Nullable PsiElement element , @ NotNull TextAttributesKey attributes ) {
0 commit comments