Skip to content

Commit

Permalink
fix other language error report
Browse files Browse the repository at this point in the history
  • Loading branch information
CppCXY committed Mar 13, 2024
1 parent 4e6a6ca commit 90cce5e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
12 changes: 4 additions & 8 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ package com.tang.intellij.lua.highlighting
import com.intellij.codeInsight.highlighting.HighlightErrorFilter
import com.intellij.psi.PsiErrorElement
import com.tang.intellij.lua.comment.psi.LuaDocPsiElement
import com.tang.intellij.lua.psi.LuaPsiElement

//import com.tang.intellij.lua.project.LuaSettings

/**
Expand All @@ -27,6 +29,6 @@ import com.tang.intellij.lua.comment.psi.LuaDocPsiElement
*/
class LuaHighlightErrorFilter : HighlightErrorFilter() {
override fun shouldHighlightErrorElement(psiErrorElement: PsiErrorElement): Boolean {
return false
return psiErrorElement !is LuaPsiElement;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ object LuaHighlightingData {
val OPERATORS = TextAttributesKey.createTextAttributesKey("LUA_OPERATORS", DefaultLanguageHighlighterColors.OPERATION_SIGN)
val SEMICOLON = TextAttributesKey.createTextAttributesKey("LUA_SEMICOLON", DefaultLanguageHighlighterColors.SEMICOLON)
val COMMA = TextAttributesKey.createTextAttributesKey("LUA_COMMA", DefaultLanguageHighlighterColors.COMMA)
val PRIMITIVE_TYPE = TextAttributesKey.createTextAttributesKey("LUA_PRIMITIVE_TYPE", ConsoleHighlighter.CYAN_BRIGHT)
val PRIMITIVE_TYPE = TextAttributesKey.createTextAttributesKey("LUA_PRIMITIVE_TYPE", DefaultLanguageHighlighterColors.KEYWORD)
val UP_VALUE = TextAttributesKey.createTextAttributesKey("LUA_UP_VALUE")
val STD_API = TextAttributesKey.createTextAttributesKey("LUA_STD_API")
val TYPE_ALIAS = TextAttributesKey.createTextAttributesKey("LUA_TYPE_ALIAS", DefaultLanguageHighlighterColors.CLASS_NAME)
Expand Down

0 comments on commit 90cce5e

Please sign in to comment.