File tree Expand file tree Collapse file tree
src/main/kotlin/com/github/xepozz/php_opcodes_language/language Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,7 +10,9 @@ import com.github.xepozz.php_opcodes_language.language.psi.PHPOpParameter
1010import com.github.xepozz.php_opcodes_language.language.psi.PHPOpParenParameter
1111import com.github.xepozz.php_opcodes_language.language.psi.PHPOpPropertyHookName
1212import com.github.xepozz.php_opcodes_language.language.psi.PHPOpPropertyName
13+ import com.github.xepozz.php_opcodes_language.language.psi.PHPOpStatement
1314import com.github.xepozz.php_opcodes_language.language.psi.PHPOpVarName
15+ import com.intellij.codeInspection.ProblemHighlightType
1416import com.intellij.lang.annotation.AnnotationHolder
1517import com.intellij.lang.annotation.Annotator
1618import com.intellij.lang.annotation.HighlightSeverity
@@ -28,10 +30,17 @@ class PHPOpAnnotator : Annotator {
2830 }
2931
3032 is PHPOpLineNumber -> {
31- holder.newSilentAnnotation(HighlightSeverity .INFORMATION )
32- .range(element)
33- .textAttributes(PhpHighlightingData .NUMBER )
34- .create()
33+ if (element.parent is PHPOpStatement ) {
34+ holder.newSilentAnnotation(HighlightSeverity .INFORMATION )
35+ .range(element)
36+ .highlightType(ProblemHighlightType .LIKE_UNUSED_SYMBOL )
37+ .create()
38+ } else {
39+ holder.newSilentAnnotation(HighlightSeverity .INFORMATION )
40+ .range(element)
41+ .textAttributes(PhpHighlightingData .NUMBER )
42+ .create()
43+ }
3544 }
3645
3746 is PHPOpParameter -> {
You can’t perform that action at this time.
0 commit comments