From 301ecb6d85cd36ed4b9260f74c99b35b1cdec29f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yann=20C=C3=A9bron?= Date: Wed, 27 Apr 2022 18:13:51 +0200 Subject: [PATCH] syntax_highlighting_and_error_highlighting.md: semantic highlighting --- .../syntax_highlighting_and_error_highlighting.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/topics/reference_guide/custom_language_support/syntax_highlighting_and_error_highlighting.md b/topics/reference_guide/custom_language_support/syntax_highlighting_and_error_highlighting.md index d331cdd21..e2b75c897 100644 --- a/topics/reference_guide/custom_language_support/syntax_highlighting_and_error_highlighting.md +++ b/topics/reference_guide/custom_language_support/syntax_highlighting_and_error_highlighting.md @@ -45,6 +45,13 @@ For highlighting lexer errors, the standard `TextAttributesKey` for bad characte > {type="tip"} +### Semantic ("Rainbow") Highlighting + +[Semantic highlighting](https://www.jetbrains.com/help/idea/configuring-colors-and-fonts.html#semantic-highlighting) provides an additional coloring layer to improve the visual distinction of several related items (e.g., method parameters). + +Register [`RainbowVisitor`](upsource:///platform/analysis-impl/src/com/intellij/codeInsight/daemon/RainbowVisitor.java) in `com.intellij.highlightVisitor` extension point. +[](#color-settings) must implement [`RainbowColorSettingsPage`](upsource:///platform/platform-api/src/com/intellij/openapi/options/colors/RainbowColorSettingsPage.java) in addition. + ## Parser The second level of error highlighting happens during parsing.