PY-71757 Semantic highlighting broken in 2024.1

Use severity SYMBOL_TYPE_SEVERITY by default for Python annotations, so that Python rainbow highlighting is preferred.

GitOrigin-RevId: cdfea51b4e891d952ce763a6e58b5e95a0c2125e
This commit is contained in:
Andrey Vokin
2024-05-13 14:49:58 +02:00
committed by intellij-monorepo-bot
parent 6a3051d423
commit 2db8b72fcb

View File

@@ -11,6 +11,8 @@ import com.jetbrains.python.ast.PyAstFile;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
import static com.intellij.codeInsight.daemon.impl.HighlightInfoType.SYMBOL_TYPE_SEVERITY;
@ApiStatus.Experimental
public interface PyAnnotatorBase {
@ApiStatus.Internal
@@ -36,7 +38,7 @@ public interface PyAnnotatorBase {
@ApiStatus.Internal
default void addHighlightingAnnotation(@NotNull PsiElement target, @NotNull TextAttributesKey key) {
addHighlightingAnnotation(target, key, HighlightSeverity.INFORMATION);
addHighlightingAnnotation(target, key, SYMBOL_TYPE_SEVERITY);
}
@ApiStatus.Internal