дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-11-09 11:15:40 +02:00
feat(editor): Rainbow brackets and semantic highlighting (rainbow variables) (#59)
Two editor toggles under Settings › Editor › Color Scheme › Language Defaults (off by default, also actions `editor.toggleRainbowBrackets` / `editor.toggleSemanticHighlighting`):
- Semantic highlighting (IDEA's rainbow variables): locals and parameters coloured by a name hash from LSP semantic tokens; fields, statics, constants, library symbols untouched.
- Rainbow brackets (VS Code's bracket pair colorization): (), [], {} by depth, unmatched in the error colour, strings/comments skipped, visible ranges only with 4 KB checkpoints.
Palettes are theme tokens (`--syn-rainbow-1..5`, `--syn-bracket-1..3`, light/dark/high-contrast), editable in the Color Scheme tree, and mapped from IntelliJ `.icls` RAINBOW_COLOR1..5.
App verification on macOS found the colours were overridden by the syntax highlighter's span nested inside the marks; the rules now cover descendants. Verified both toggles on/off live in a TS file.
Fixes #56
https://claude.ai/code/session_01VUYsdXA2nkF5v6zsC93dpn
Цей коміт міститься в:
1 джерело
2e0c74e31d
коміт
beab7992f9
17 files changed
+679
-9
No files matched your search
@@ -354,9 +354,27 @@ export const COLOR_SCHEME_PAGE = editorPage({
|
||||
"background",
|
||||
"bold",
|
||||
"italic",
|
||||
"rainbow",
|
||||
...SCHEMES.map((s) => s.name),
|
||||
],
|
||||
sections: [
|
||||
{ items: [{ t: "custom", label: "Scheme", keywords: ATTRIBUTES.map((a) => a.name), component: ColorSchemePage }] },
|
||||
{
|
||||
title: "Language Defaults",
|
||||
items: [
|
||||
{
|
||||
t: "check",
|
||||
key: "editor.semanticHighlighting",
|
||||
label: "Semantic highlighting",
|
||||
hint: "Local variables and parameters get a colour derived from their name (needs a language server).",
|
||||
},
|
||||
{
|
||||
t: "check",
|
||||
key: "editor.rainbowBrackets",
|
||||
label: "Rainbow brackets",
|
||||
hint: "Color (), [] and {} by nesting depth; unmatched brackets use the error color.",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
});
|
||||
Reference in new issue
Заблокувати користувача