How can I disable syntax error highlighting generated by parser for a custom language implementation?

Answered

We are developing a custom language plugin for ballerina language(https://ballerina.io/) and currently using the IntelliJ grammar toolkit. Since we have integrated our plugin with ballerina language server, we are using language server diagnostics via an external annotator implementation. So we have a requirement to hide/disable the error annotations generated by the plugin parser. Is there any API available for this?

 

Plugin Implementation - https://github.com/ballerina-platform/ballerina-lang/tree/master/tool-plugins/intellij

Plugin Parser definition - https://github.com/ballerina-platform/ballerina-lang/blob/master/tool-plugins/intellij/src/main/java/io/ballerina/plugins/idea/BallerinaParserDefinition.java

2 comments
Comment actions Permalink

com.intellij.codeInsight.highlighting.HighlightErrorFilter should work here

1
Comment actions Permalink

This is exactly what I was looking for! :) Thank you!

0

Please sign in to leave a comment.