feat(editor): highlighting level of the current file's editor (#7805)

Add Configure Current File Analysis… (editor.highlightingLevel, IDEA's PopupHector, Cmd+Alt+Shift+H / Ctrl+Alt+Shift+H) with the three levels None, Syntax and All Problems:

- All Problems (default): everything as before.
- Syntax: syntax and semantic colouring stay; diagnostics and their scrollbar marks leave the editor (Problems still lists them).
- None: plain text; the lezer highlighter is reconfigured out and semantic tokens are dropped.

The level lives in the editor state next to the other per-editor display overrides (cm/localAppearance.ts) and is not saved.

Co-authored-by: muutot <[email protected]>
Цей коміт міститься в:
Muuтаmuutot authored and GitHub committed 2026-12-04 01:41:21 +08:00
1 джерело 703c33a089
коміт f1876f1260
14 files changed
+218 -1

No files matched your search

+1
Переглянути файл
@@ -3,6 +3,7 @@
* `<Action>()`, and imported IDEA keymaps.
*/
export const IDEA_ACTIONS: Readonly<Record<string, string>> = {
PopupHector: "editor.highlightingLevel",
GotoDeclaration: "navigate.declaration",
GotoImplementation: "navigate.implementation",
GotoTypeDeclaration: "navigate.typeDeclaration",
+2
Переглянути файл
@@ -114,6 +114,8 @@ describe("IDEA keymap parity", () => {
["editor.toggleLocalGutterIcons", [], []],
["editor.toggleLocalIndentGuides", [], []],
["editor.toggleBreadcrumbs", [], []],
// PopupHector: Configure Current File Analysis.
["editor.highlightingLevel", ["Meta+Alt+Shift+H"], ["Ctrl+Alt+Shift+H"]],
// CopyAsPlainText / CopyAsRichText have no shortcut.
["code.copyAsPlainText", [], []],
["code.copyAsRichText", [], []],
+1
Переглянути файл
@@ -350,6 +350,7 @@ export const intellijMacos: Record<string, string[]> = {
"editor.toggleLocalGutterIcons": [],
"editor.toggleLocalIndentGuides": [],
"editor.toggleBreadcrumbs": [],
"editor.highlightingLevel": ["Meta+Alt+Shift+H"],
// Build
"build.buildProject": ["Meta+F9"],
+1
Переглянути файл
@@ -344,6 +344,7 @@ export const intellijWindows: Record<string, string[]> = {
"editor.toggleLocalGutterIcons": [],
"editor.toggleLocalIndentGuides": [],
"editor.toggleBreadcrumbs": [],
"editor.highlightingLevel": ["Ctrl+Alt+Shift+H"],
// Build
"build.buildProject": ["Ctrl+F9"],
+3
Переглянути файл
@@ -1151,6 +1151,9 @@
"Attribute": "Attribute",
"Contents differ only in line separators": "Contents differ only in line separators",
"Line Separator": "Line Separator",
"Highlighting Level": "Highlighting Level",
"All Problems": "All Problems",
"Syntax": "Syntax",
"Windows (\\r\\n)": "Windows (\\r\\n)",
"Unix and macOS (\\n)": "Unix and macOS (\\n)",
"Classic Mac OS (\\r)": "Classic Mac OS (\\r)",
+4
Переглянути файл
@@ -2514,6 +2514,10 @@
"Line Separator": "行分隔符",
"Line and column": "行和列",
"Line height": "行高",
"Highlighting Level": "高亮级别",
"All Problems": "所有问题",
"Configure Current File Analysis…": "配置当前文件分析…",
"Choose what the active editor highlights: None, Syntax (colouring without problems) or All Problems.": "选择当前编辑器高亮的内容:无、语法(着色但不显示问题)或所有问题。",
"Line separator": "行分隔符",
"Line, %": "行,%",
"Line:Column Number": "行:列号",