File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed
src/com/intellij/devkt/json Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change 1
- # plugin-template
1
+ # Json for DevKt
2
2
3
- This is the template of the plugin project.
4
-
5
- Things to change before coding:
6
-
7
- + ` your-language-devkt ` in [ settings.gradle.kts] ( settings.gradle.kts )
8
- + ` your.package.name ` in [ build.gradle.kts] ( build.gradle.kts )
3
+ Json support for devkt.
9
4
5
+ Mention: this plugin supports json with comments.
Original file line number Diff line number Diff line change 6
6
import org .jetbrains .annotations .NotNull ;
7
7
import org .jetbrains .annotations .Nullable ;
8
8
import org .jetbrains .kotlin .com .intellij .psi .PsiElement ;
9
+ import org .jetbrains .kotlin .com .intellij .psi .PsiErrorElement ;
9
10
import org .jetbrains .kotlin .com .intellij .psi .tree .IElementType ;
10
11
11
12
public class Json <T > extends ExtendedDevKtLanguage <T > {
@@ -26,6 +27,7 @@ public boolean satisfies(String fileName) {
26
27
27
28
@ Override
28
29
public void annotate (PsiElement psiElement , AnnotationHolder <? super T > annotationHolder , ColorScheme <? extends T > colorScheme ) {
30
+ if (psiElement instanceof PsiErrorElement ) annotationHolder .highlight (psiElement , colorScheme .getUnknown ());
29
31
}
30
32
31
33
@ Nullable
You can’t perform that action at this time.
0 commit comments