`ExternalAnnotator` addding a `HighlightSeverity.INFORMATION` doesn't appear in editor
Answered
holder.newAnnotation(HighlightSeverity.ERROR, "ERROR").range(TextRange.from(0, 1)).create()
holder.newAnnotation(HighlightSeverity.INFORMATION, "INFORMATION").range(TextRange.from(1, 1)).create()
When I look in the editor, there is the error, but that's it, the information is nowhere to be found. Or am I completely misunderstanding what "INFORMATION" means...
Please sign in to leave a comment.
Hi,
What do you expect to see in the editor? INFORMATION severity has no text attributes, so it won't be visible as a different color, underline, etc. When you move the cursor over the second character in the file, you will see the "INFORMATION" message.
Thanks! I am looking for an 'info' style annotation that is blue, exactly like this screenshot from vscode:
Is that possible in Idea?
Would something like this be the suggested approach?
Is it possible to set a custom icon? I don't want the triangle, I want a circle.
Hi, see https://plugins.jetbrains.com/docs/intellij/syntax-highlighting-and-error-highlighting.html
Regarding the icon, I don't see a possibility of customizing it. See: https://github.com/JetBrains/intellij-community/blob/master/platform/lang-impl/src/com/intellij/analysis/problemsView/toolWindow/HighlightingProblem.kt#L58