diff --git a/src/main/kotlin/valkyrie/ide/highlight/NodeHighlighter.kt b/src/main/kotlin/valkyrie/ide/highlight/NodeHighlighter.kt index c8696a458..bbe907c38 100644 --- a/src/main/kotlin/valkyrie/ide/highlight/NodeHighlighter.kt +++ b/src/main/kotlin/valkyrie/ide/highlight/NodeHighlighter.kt @@ -52,6 +52,11 @@ class NodeHighlighter : ValkyrieVisitor(), HighlightVisitor { highlight(o.nameIdentifier, HighlightColor.SYM_FUNCTION_FREE) } + override fun visitDeclareDomain(o: ValkyrieDeclareDomain) { + o as ValkyrieDeclareDomainNode + highlight(o.nameIdentifier, HighlightColor.SYM_MACRO) + } + override fun visitDeclareUnion(o: ValkyrieDeclareUnion) { o as ValkyrieDeclareUnionNode highlight(o.nameIdentifier, HighlightColor.SYM_MACRO) @@ -98,6 +103,11 @@ class NodeHighlighter : ValkyrieVisitor(), HighlightVisitor { highlight(o.nameIdentifier, HighlightColor.SYM_MACRO) } + override fun visitMacroCall(o: ValkyrieMacroCall) { + highlight(o.firstChild, HighlightColor.SYM_MACRO) + highlight(o.namepath, HighlightColor.SYM_MACRO) + } + override fun visitDeclareVariable(o: ValkyrieDeclareVariable) { super.visitDeclareVariable(o) @@ -156,6 +166,10 @@ class NodeHighlighter : ValkyrieVisitor(), HighlightVisitor { } } + override fun visitSlot(o: ValkyrieSlot) { + highlight(o, HighlightColor.KEYWORD) + } + fun highlight(element: PsiElement?, color: HighlightColor) { element ?: return val builder = HighlightInfo.newHighlightInfo(HighlightInfoType.INFORMATION) diff --git a/src/main/kotlin/valkyrie/ide/highlight/TokenHighlighter.kt b/src/main/kotlin/valkyrie/ide/highlight/TokenHighlighter.kt index 693d5423c..89d4de6db 100644 --- a/src/main/kotlin/valkyrie/ide/highlight/TokenHighlighter.kt +++ b/src/main/kotlin/valkyrie/ide/highlight/TokenHighlighter.kt @@ -11,7 +11,7 @@ import valkyrie.psi.ValkyrieTypes.* class TokenHighlighter : SyntaxHighlighter { override fun getHighlightingLexer(): Lexer { - return ParserDefinition.createLexer() + return ParserDefinition.Instance.lexer() } override fun getTokenHighlights(tokenType: IElementType): Array { diff --git a/src/main/kotlin/valkyrie/ide/hint/VisionInheritors.kt b/src/main/kotlin/valkyrie/ide/hint/VisionInheritors.kt index 66352de55..e6f132347 100644 --- a/src/main/kotlin/valkyrie/ide/hint/VisionInheritors.kt +++ b/src/main/kotlin/valkyrie/ide/hint/VisionInheritors.kt @@ -3,7 +3,7 @@ package valkyrie.ide.hint import com.intellij.codeInsight.CodeInsightBundle import com.intellij.codeInsight.codeVision.CodeVisionEntry import com.intellij.codeInsight.codeVision.settings.PlatformCodeVisionIds -import com.intellij.codeInsight.completion.CompletionData + import com.intellij.psi.PsiElement import valkyrie.psi.node.ValkyrieDeclareClass import valkyrie.psi.node.ValkyrieDeclareTrait