Skip to content

Commit e5b38d4

Browse files
committed
Update doc
1 parent 590d21b commit e5b38d4

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

README.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
# plugin-template
1+
# Json for DevKt
22

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.
94

5+
Mention: this plugin supports json with comments.

src/com/intellij/devkt/json/Json.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import org.jetbrains.annotations.NotNull;
77
import org.jetbrains.annotations.Nullable;
88
import org.jetbrains.kotlin.com.intellij.psi.PsiElement;
9+
import org.jetbrains.kotlin.com.intellij.psi.PsiErrorElement;
910
import org.jetbrains.kotlin.com.intellij.psi.tree.IElementType;
1011

1112
public class Json<T> extends ExtendedDevKtLanguage<T> {
@@ -26,6 +27,7 @@ public boolean satisfies(String fileName) {
2627

2728
@Override
2829
public void annotate(PsiElement psiElement, AnnotationHolder<? super T> annotationHolder, ColorScheme<? extends T> colorScheme) {
30+
if (psiElement instanceof PsiErrorElement) annotationHolder.highlight(psiElement, colorScheme.getUnknown());
2931
}
3032

3133
@Nullable

0 commit comments

Comments
 (0)