@fresh-editor/fresh-editor 0.2.18 → 0.2.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +100 -0
- package/package.json +1 -1
- package/plugins/config-schema.json +264 -42
- package/plugins/diagnostics_panel.ts +4 -12
- package/plugins/diff_nav.i18n.json +128 -0
- package/plugins/diff_nav.ts +196 -0
- package/plugins/git_explorer.ts +6 -0
- package/plugins/git_gutter.ts +5 -0
- package/plugins/lib/finder.ts +19 -12
- package/plugins/lib/fresh.d.ts +5 -1
- package/plugins/pkg.ts +4 -29
- package/plugins/schemas/package.schema.json +437 -272
- package/plugins/schemas/theme.schema.json +18 -0
- package/plugins/theme_editor.i18n.json +42 -14
- package/plugins/theme_editor.ts +30 -3
- package/plugins/vi_mode.ts +189 -51
- package/themes/high-contrast.json +66 -66
- package/themes/light.json +18 -18
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,105 @@
|
|
|
1
1
|
# Release Notes
|
|
2
2
|
|
|
3
|
+
## 0.2.21
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* **Fast Completions without LSP**: New basic completions providers without language server — buffer-word candidates appear below LSP results in the popup. Also, a new setting (config) controls auto-trigger vs explicit Ctrl+Space (default: explicit). Enter dismisses the popup (Tab accepts). I plan to further improve it (make it more intelligent) in future releases.
|
|
8
|
+
|
|
9
|
+
* **Current Line Highlighting**: Highlights the cursor line. Enabled by default, togglable from the command palette and Settings UI (caveat: wrapped lines are currently highlighted in their entirety, this should probably be changed to visual lines).
|
|
10
|
+
|
|
11
|
+
* **LSP Code Actions**: Code action modal now actually works! Select an action by number or up/down arrows and enter (#1405). Supports resolve, execute command, and server-initiated workspace edits (previously dropped silently). File create/rename/delete operations handled. Actions from multiple servers unified into one popup. Default keybinding changed to Alt+. - because Ctrl+. is filtered by many terminals.
|
|
12
|
+
|
|
13
|
+
* **LSP Completion Resolve and Formatting**: Auto-imports applied on completion accept. Format Buffer falls back to LSP when no external formatter is configured. Also adds range formatting and pre-rename validation.
|
|
14
|
+
|
|
15
|
+
* **LSP Server Selection for Restart/Stop**: Popup to choose which server to restart/stop individually, or all at once.
|
|
16
|
+
|
|
17
|
+
* **Grammar Listing**: `fresh --cmd grammar list` and `editor.listGrammars()` plugin API show all available grammars with source and extensions. When specifying a grammar in a `languages` entry in the config, you must currently use a full name from this list - for example "Bourne Again Shell (bash)" rather than "bash". This will be improved once I add grammar aliases.
|
|
18
|
+
|
|
19
|
+
### Improvements
|
|
20
|
+
|
|
21
|
+
* **Theme Contrast**: Replaced all named ANSI colors with explicit RGB in built-in themes for deterministic rendering. Improved contrast ratios across both high-contrast and light themes. Diagnostic and semantic overlays now re-apply correctly on theme change, including during live preview.
|
|
22
|
+
|
|
23
|
+
* **Git Status Marker Refresh**: File explorer markers update on terminal focus gain and by polling for git index changes (#1431).
|
|
24
|
+
|
|
25
|
+
* **Config-Only Languages**: Custom languages without a built-in grammar (e.g., "fish") appear in the Set Language popup and are detected correctly — no more fallthrough to wrong built-in grammars.
|
|
26
|
+
|
|
27
|
+
* **Theme Inspector**: Records exact theme keys during rendering instead of reverse-mapping via heuristics. Theme editor Save As improved for built-in themes.
|
|
28
|
+
|
|
29
|
+
* **LSP Reliability**: Diagnostics cleared on server stop/crash, buffers re-opened on server start, document version checking for workspace edits, LSP notified after undo/redo of bulk edits, pending requests drained on server death to prevent deadlocks, hover suppressed while popups are visible.
|
|
30
|
+
|
|
31
|
+
### Vim Mode
|
|
32
|
+
|
|
33
|
+
22 bug fixes: C/D/S/cc, e motion, nG, h/l line clamping, ^, $, J with space, f/t special chars, r replace, ~ toggle case, visual mode entry/switching, count display. Key motions moved from async plugin commands to native Rust actions, eliminating race conditions.
|
|
34
|
+
|
|
35
|
+
If you use the Vim plugin please drop a note at https://github.com/sinelaw/fresh/discussions/417 - I need feedback on this feature.
|
|
36
|
+
|
|
37
|
+
### Bug Fixes
|
|
38
|
+
|
|
39
|
+
* Fixed Ctrl+W panic on accented/multi-byte characters (#1332).
|
|
40
|
+
|
|
41
|
+
* Fixed LSP diagnostics from stopped servers reappearing from queued messages.
|
|
42
|
+
|
|
43
|
+
## 0.2.20
|
|
44
|
+
|
|
45
|
+
### Features
|
|
46
|
+
|
|
47
|
+
* **Multi-LSP Server Support**: Configure multiple LSP servers per language (e.g., pylsp + pyright for Python). Servers are routed by feature using `only_features`/`except_features` filters, completions are merged from all eligible servers, and diagnostics are tracked per-server. Per-server status is shown in the status bar (#971).
|
|
48
|
+
|
|
49
|
+
* **Per-Language Editor Settings**: `line_wrap`, `wrap_column`, `page_view`, and `page_width` can now be configured per-language. For example, wrap Markdown at 80 columns while keeping code unwrapped (#1371).
|
|
50
|
+
|
|
51
|
+
* **Diff Chunk Navigation Plugin**: New built-in plugin for navigating between diff chunks, merging git and saved-diff sources.
|
|
52
|
+
|
|
53
|
+
### Improvements
|
|
54
|
+
|
|
55
|
+
* **Faster Startup (~350ms → ~170ms)**: Syntax grammars are pre-compiled at build time, package loading moved from JavaScript to Rust, plugin I/O and transpilation run in parallel, and redundant grammar rebuilds are eliminated. Plugins can now declare dependencies via `import type` from `"fresh:plugin/..."` and are topologically sorted.
|
|
56
|
+
|
|
57
|
+
* **Settings UI Overhaul**: Modernized visual design with wider modal (160 cols), rounded corner borders, Nerd Font category icons, styled `[✓]` toggles, and reverse-video key hints. Keyboard navigation rewritten: Tab cycles sequentially through all fields and buttons, composite controls (Map, ObjectArray, TextList) support internal navigation, entry dialogs have section headers with explicit field ordering, PageDown/PageUp work in the main panel, and TextList edits auto-accept on navigation. Focus indicator now highlights per-row in composite controls.
|
|
58
|
+
|
|
59
|
+
* **Settings Deep Search**: Also in the Settings UI: Search now walks into Map entries, TextList items, and nested JSON values. Searching "python" finds the "python" key in language/LSP maps. Results show hierarchical breadcrumbs (e.g., "Languages > python") and auto-focus the matching entry.
|
|
60
|
+
|
|
61
|
+
* **Per-Language Workspace Root Detection**: New `root_markers` field on LSP server configs. The editor walks upward from the file's directory looking for configured markers (e.g., `Cargo.toml`, `package.json`), replacing the old cwd-based root (#1360).
|
|
62
|
+
|
|
63
|
+
* **Page View Mode**: "Compose" mode renamed to "Page View". Can now auto-activate per language via `page_view: true` in language config. Old keybinding names continue to work.
|
|
64
|
+
|
|
65
|
+
* **256-Color Contrast Enforcement**: When running in a 256-color terminal, foreground colors are automatically adjusted to meet WCAG 3.0:1 minimum contrast ratio against their background. Fixes illegible text in Solarized Dark, Nord, Dracula, and light themes under tmux without truecolor.
|
|
66
|
+
|
|
67
|
+
* **LSP in Library Files**: Files in library paths (site-packages, node_modules, .cargo) now keep LSP enabled for Goto Definition, Hover, and Find References while remaining read-only (#1344).
|
|
68
|
+
|
|
69
|
+
* **Goto Matching Bracket**: Works inside bracket bodies by searching backward for the nearest enclosing bracket, matching VS Code and JetBrains behavior. All bracket searches are bounded to prevent hangs on huge files (#1258).
|
|
70
|
+
|
|
71
|
+
* **LSP Head-of-Line Blocking Fix**: LSP notifications (didClose, didChange, shutdown) are no longer blocked behind pending request responses.
|
|
72
|
+
|
|
73
|
+
* **New Settings**: `show_tilde` to hide EOF tilde markers (#1290), `menu_bar_mnemonics` to disable Alt+key menu shortcuts (#1257).
|
|
74
|
+
|
|
75
|
+
* **`getPluginDir()` Plugin API**: Plugins can now locate their own package directory to find bundled scripts or install local dependencies.
|
|
76
|
+
|
|
77
|
+
### Bug Fixes
|
|
78
|
+
|
|
79
|
+
* Fixed CSI u and xterm modifyOtherKeys key sequences inserted as literal text in terminal session mode (#1113).
|
|
80
|
+
|
|
81
|
+
* Fixed word selection (Ctrl+W) stopping at accented/Unicode characters (#1332).
|
|
82
|
+
|
|
83
|
+
* Fixed double-click backward drag losing the initial word selection (#1334).
|
|
84
|
+
|
|
85
|
+
* Fixed block cursor invisible in zellij due to double cursor-inversion (#1338).
|
|
86
|
+
|
|
87
|
+
* Fixed cursor visibility and command palette rendering in zellij (#1255).
|
|
88
|
+
|
|
89
|
+
* Fixed undo incorrectly clearing the modified flag after hot exit recovery, which could cause data loss.
|
|
90
|
+
|
|
91
|
+
* Fixed bulk edit (e.g., toggle comment) displacing inlay hints on subsequent lines (#1263). Displaced markers are now restored to exact positions on undo.
|
|
92
|
+
|
|
93
|
+
* Fixed large file syntax highlighting lost when revisiting a file, caused by checkpoint offset drift during partial cache updates.
|
|
94
|
+
|
|
95
|
+
* Fixed embedded language highlighting (e.g., CSS in HTML) breaking at large file offsets.
|
|
96
|
+
|
|
97
|
+
* Fixed Enter key leaking into the markdown buffer when the file explorer panel is focused.
|
|
98
|
+
|
|
99
|
+
* Fixed large file recovery saving the entire file as individual chunks instead of using the recovery format.
|
|
100
|
+
|
|
101
|
+
* Fixed read-only detection for files not owned by the current user (now checks effective uid/gid instead of file mode bits).
|
|
102
|
+
|
|
3
103
|
## 0.2.18
|
|
4
104
|
|
|
5
105
|
### Features
|
package/package.json
CHANGED
|
@@ -32,15 +32,20 @@
|
|
|
32
32
|
"default": {
|
|
33
33
|
"line_numbers": true,
|
|
34
34
|
"relative_line_numbers": false,
|
|
35
|
+
"highlight_current_line": true,
|
|
35
36
|
"line_wrap": true,
|
|
36
37
|
"wrap_indent": true,
|
|
38
|
+
"wrap_column": null,
|
|
39
|
+
"page_width": 80,
|
|
37
40
|
"syntax_highlighting": true,
|
|
38
41
|
"show_menu_bar": true,
|
|
42
|
+
"menu_bar_mnemonics": true,
|
|
39
43
|
"show_tab_bar": true,
|
|
40
44
|
"show_status_bar": true,
|
|
41
45
|
"show_prompt_line": true,
|
|
42
46
|
"show_vertical_scrollbar": true,
|
|
43
47
|
"show_horizontal_scrollbar": false,
|
|
48
|
+
"show_tilde": true,
|
|
44
49
|
"use_terminal_bg": false,
|
|
45
50
|
"cursor_style": "default",
|
|
46
51
|
"rulers": [],
|
|
@@ -62,10 +67,10 @@
|
|
|
62
67
|
"ensure_final_newline_on_save": false,
|
|
63
68
|
"highlight_matching_brackets": true,
|
|
64
69
|
"rainbow_brackets": true,
|
|
70
|
+
"completion_popup_auto_show": false,
|
|
65
71
|
"quick_suggestions": true,
|
|
66
72
|
"quick_suggestions_delay_ms": 150,
|
|
67
73
|
"suggest_on_trigger_characters": true,
|
|
68
|
-
"accept_suggestion_on_enter": "on",
|
|
69
74
|
"enable_inlay_hints": true,
|
|
70
75
|
"enable_semantic_tokens_full": false,
|
|
71
76
|
"diagnostics_inline_text": false,
|
|
@@ -166,10 +171,10 @@
|
|
|
166
171
|
"default": null
|
|
167
172
|
},
|
|
168
173
|
"lsp": {
|
|
169
|
-
"description": "LSP server configurations by language",
|
|
174
|
+
"description": "LSP server configurations by language.\nEach language maps to one or more server configs (multi-LSP support).\nAccepts both single-object and array forms for backwards compatibility.",
|
|
170
175
|
"type": "object",
|
|
171
176
|
"additionalProperties": {
|
|
172
|
-
"$ref": "#/$defs/
|
|
177
|
+
"$ref": "#/$defs/LspLanguageConfig"
|
|
173
178
|
},
|
|
174
179
|
"default": {}
|
|
175
180
|
},
|
|
@@ -247,6 +252,12 @@
|
|
|
247
252
|
"default": false,
|
|
248
253
|
"x-section": "Display"
|
|
249
254
|
},
|
|
255
|
+
"highlight_current_line": {
|
|
256
|
+
"description": "Highlight the line containing the cursor",
|
|
257
|
+
"type": "boolean",
|
|
258
|
+
"default": true,
|
|
259
|
+
"x-section": "Display"
|
|
260
|
+
},
|
|
250
261
|
"line_wrap": {
|
|
251
262
|
"description": "Wrap long lines to fit the window width (default for new views)",
|
|
252
263
|
"type": "boolean",
|
|
@@ -259,6 +270,28 @@
|
|
|
259
270
|
"default": true,
|
|
260
271
|
"x-section": "Display"
|
|
261
272
|
},
|
|
273
|
+
"wrap_column": {
|
|
274
|
+
"description": "Column at which to wrap lines when line wrapping is enabled.\nIf not specified (`null`), lines wrap at the viewport edge (default behavior).\nExample: `80` wraps at column 80. The actual wrap column is clamped to the\nviewport width (lines can't wrap beyond the visible area).",
|
|
275
|
+
"type": [
|
|
276
|
+
"integer",
|
|
277
|
+
"null"
|
|
278
|
+
],
|
|
279
|
+
"format": "uint",
|
|
280
|
+
"minimum": 0,
|
|
281
|
+
"default": null,
|
|
282
|
+
"x-section": "Display"
|
|
283
|
+
},
|
|
284
|
+
"page_width": {
|
|
285
|
+
"description": "Width of the page in page view mode (in columns).\nControls the content width when page view is active, with centering margins.\nDefaults to 80. Set to `null` to use the full viewport width.",
|
|
286
|
+
"type": [
|
|
287
|
+
"integer",
|
|
288
|
+
"null"
|
|
289
|
+
],
|
|
290
|
+
"format": "uint",
|
|
291
|
+
"minimum": 0,
|
|
292
|
+
"default": 80,
|
|
293
|
+
"x-section": "Display"
|
|
294
|
+
},
|
|
262
295
|
"syntax_highlighting": {
|
|
263
296
|
"description": "Enable syntax highlighting for code files",
|
|
264
297
|
"type": "boolean",
|
|
@@ -271,6 +304,12 @@
|
|
|
271
304
|
"default": true,
|
|
272
305
|
"x-section": "Display"
|
|
273
306
|
},
|
|
307
|
+
"menu_bar_mnemonics": {
|
|
308
|
+
"description": "Whether menu bar mnemonics (Alt+letter shortcuts) are enabled.\nWhen enabled, pressing Alt+F opens the File menu, Alt+E opens Edit, etc.\nDisabling this frees up Alt+letter keybindings for other actions.\nDefault: true",
|
|
309
|
+
"type": "boolean",
|
|
310
|
+
"default": true,
|
|
311
|
+
"x-section": "Display"
|
|
312
|
+
},
|
|
274
313
|
"show_tab_bar": {
|
|
275
314
|
"description": "Whether the tab bar is visible by default.\nThe tab bar shows open files in each split pane.\nCan be toggled at runtime via command palette or keybinding.\nDefault: true",
|
|
276
315
|
"type": "boolean",
|
|
@@ -301,6 +340,12 @@
|
|
|
301
340
|
"default": false,
|
|
302
341
|
"x-section": "Display"
|
|
303
342
|
},
|
|
343
|
+
"show_tilde": {
|
|
344
|
+
"description": "Show tilde (~) markers on lines after the end of the file.\nThese vim-style markers indicate lines that are not part of the file content.\nDefault: true",
|
|
345
|
+
"type": "boolean",
|
|
346
|
+
"default": true,
|
|
347
|
+
"x-section": "Display"
|
|
348
|
+
},
|
|
304
349
|
"use_terminal_bg": {
|
|
305
350
|
"description": "Use the terminal's default background color instead of the theme's editor background.\nWhen enabled, the editor background inherits from the terminal emulator,\nallowing transparency or custom terminal backgrounds to show through.\nDefault: false",
|
|
306
351
|
"type": "boolean",
|
|
@@ -436,8 +481,14 @@
|
|
|
436
481
|
"default": true,
|
|
437
482
|
"x-section": "Bracket Matching"
|
|
438
483
|
},
|
|
484
|
+
"completion_popup_auto_show": {
|
|
485
|
+
"description": "Automatically show the completion popup while typing.\nWhen false (default), the popup only appears when explicitly invoked\n(e.g. via Ctrl+Space). When true, it appears automatically after a\nshort delay while typing.\nDefault: false",
|
|
486
|
+
"type": "boolean",
|
|
487
|
+
"default": false,
|
|
488
|
+
"x-section": "Completion"
|
|
489
|
+
},
|
|
439
490
|
"quick_suggestions": {
|
|
440
|
-
"description": "Enable quick suggestions (VS Code-like behavior).\nWhen enabled, completion suggestions appear automatically while typing,\nnot just on trigger characters (like `.` or `::`).\nDefault: true",
|
|
491
|
+
"description": "Enable quick suggestions (VS Code-like behavior).\nWhen enabled, completion suggestions appear automatically while typing,\nnot just on trigger characters (like `.` or `::`).\nOnly takes effect when completion_popup_auto_show is true.\nDefault: true",
|
|
441
492
|
"type": "boolean",
|
|
442
493
|
"default": true,
|
|
443
494
|
"x-section": "Completion"
|
|
@@ -456,12 +507,6 @@
|
|
|
456
507
|
"default": true,
|
|
457
508
|
"x-section": "Completion"
|
|
458
509
|
},
|
|
459
|
-
"accept_suggestion_on_enter": {
|
|
460
|
-
"description": "Controls whether pressing Enter accepts the selected completion.\n- \"on\": Enter always accepts the completion\n- \"off\": Enter inserts a newline (use Tab to accept)\n- \"smart\": Enter accepts only if the completion text differs from typed text\nDefault: \"on\"",
|
|
461
|
-
"$ref": "#/$defs/AcceptSuggestionOnEnter",
|
|
462
|
-
"default": "on",
|
|
463
|
-
"x-section": "Completion"
|
|
464
|
-
},
|
|
465
510
|
"enable_inlay_hints": {
|
|
466
511
|
"description": "Whether to enable LSP inlay hints (type hints, parameter hints, etc.)",
|
|
467
512
|
"type": "boolean",
|
|
@@ -649,16 +694,6 @@
|
|
|
649
694
|
],
|
|
650
695
|
"default": "lf"
|
|
651
696
|
},
|
|
652
|
-
"AcceptSuggestionOnEnter": {
|
|
653
|
-
"description": "Controls whether Enter accepts a completion suggestion",
|
|
654
|
-
"type": "string",
|
|
655
|
-
"enum": [
|
|
656
|
-
"on",
|
|
657
|
-
"off",
|
|
658
|
-
"smart"
|
|
659
|
-
],
|
|
660
|
-
"default": "on"
|
|
661
|
-
},
|
|
662
697
|
"FileExplorerConfig": {
|
|
663
698
|
"description": "File explorer configuration",
|
|
664
699
|
"type": "object",
|
|
@@ -904,6 +939,42 @@
|
|
|
904
939
|
"type": "boolean",
|
|
905
940
|
"default": true
|
|
906
941
|
},
|
|
942
|
+
"line_wrap": {
|
|
943
|
+
"description": "Whether to enable line wrapping for this language.\nIf not specified (`null`), falls back to the global `editor.line_wrap` setting.\nUseful for prose-heavy languages like Markdown where wrapping is desirable\neven if globally disabled.",
|
|
944
|
+
"type": [
|
|
945
|
+
"boolean",
|
|
946
|
+
"null"
|
|
947
|
+
],
|
|
948
|
+
"default": null
|
|
949
|
+
},
|
|
950
|
+
"wrap_column": {
|
|
951
|
+
"description": "Column at which to wrap lines for this language.\nIf not specified (`null`), falls back to the global `editor.wrap_column` setting.",
|
|
952
|
+
"type": [
|
|
953
|
+
"integer",
|
|
954
|
+
"null"
|
|
955
|
+
],
|
|
956
|
+
"format": "uint",
|
|
957
|
+
"minimum": 0,
|
|
958
|
+
"default": null
|
|
959
|
+
},
|
|
960
|
+
"page_view": {
|
|
961
|
+
"description": "Whether to automatically enable page view (compose mode) for this language.\nPage view provides a document-style layout with centered content,\nconcealed formatting markers, and intelligent word wrapping.\nIf not specified (`null`), page view is not auto-activated.",
|
|
962
|
+
"type": [
|
|
963
|
+
"boolean",
|
|
964
|
+
"null"
|
|
965
|
+
],
|
|
966
|
+
"default": null
|
|
967
|
+
},
|
|
968
|
+
"page_width": {
|
|
969
|
+
"description": "Width of the page in page view mode (in columns).\nControls the content width when page view is active, with centering margins.\nIf not specified (`null`), falls back to the global `editor.page_width` setting.",
|
|
970
|
+
"type": [
|
|
971
|
+
"integer",
|
|
972
|
+
"null"
|
|
973
|
+
],
|
|
974
|
+
"format": "uint",
|
|
975
|
+
"minimum": 0,
|
|
976
|
+
"default": null
|
|
977
|
+
},
|
|
907
978
|
"use_tabs": {
|
|
908
979
|
"description": "Whether pressing Tab should insert a tab character instead of spaces.\nIf not specified (`null`), falls back to the global `editor.use_tabs` setting.\nSet to true for languages like Go and Makefile that require tabs.",
|
|
909
980
|
"type": [
|
|
@@ -946,6 +1017,14 @@
|
|
|
946
1017
|
"$ref": "#/$defs/OnSaveAction"
|
|
947
1018
|
},
|
|
948
1019
|
"default": []
|
|
1020
|
+
},
|
|
1021
|
+
"word_characters": {
|
|
1022
|
+
"description": "Extra characters (beyond alphanumeric and `_`) considered part of\nidentifiers for this language. Used by dabbrev and buffer-word\ncompletion to correctly tokenise language-specific naming conventions.\n\nExamples:\n- Lisp/Clojure/CSS: `\"-\"` (kebab-case identifiers)\n- PHP/Bash: `\"$\"` (variable sigils)\n- Ruby: `\"?!\"` (predicate/bang methods)\n- Rust (default): `\"\"` (standard alphanumeric + underscore)",
|
|
1023
|
+
"type": [
|
|
1024
|
+
"string",
|
|
1025
|
+
"null"
|
|
1026
|
+
],
|
|
1027
|
+
"default": null
|
|
949
1028
|
}
|
|
950
1029
|
},
|
|
951
1030
|
"x-display-field": "/grammar"
|
|
@@ -1051,6 +1130,13 @@
|
|
|
1051
1130
|
],
|
|
1052
1131
|
"x-display-field": "/command"
|
|
1053
1132
|
},
|
|
1133
|
+
"LspLanguageConfig": {
|
|
1134
|
+
"description": "One or more LSP server configs for this language.\nAccepts both a single object and an array for backwards compatibility.",
|
|
1135
|
+
"type": "array",
|
|
1136
|
+
"items": {
|
|
1137
|
+
"$ref": "#/$defs/LspServerConfig"
|
|
1138
|
+
}
|
|
1139
|
+
},
|
|
1054
1140
|
"LspServerConfig": {
|
|
1055
1141
|
"description": "LSP server configuration",
|
|
1056
1142
|
"type": "object",
|
|
@@ -1058,7 +1144,23 @@
|
|
|
1058
1144
|
"command": {
|
|
1059
1145
|
"description": "Command to spawn the server.\nRequired when enabled=true, ignored when enabled=false.",
|
|
1060
1146
|
"type": "string",
|
|
1061
|
-
"default": ""
|
|
1147
|
+
"default": "",
|
|
1148
|
+
"x-order": 1
|
|
1149
|
+
},
|
|
1150
|
+
"enabled": {
|
|
1151
|
+
"description": "Whether the server is enabled",
|
|
1152
|
+
"type": "boolean",
|
|
1153
|
+
"default": true,
|
|
1154
|
+
"x-order": 2
|
|
1155
|
+
},
|
|
1156
|
+
"name": {
|
|
1157
|
+
"description": "Display name for this server (e.g., \"tsserver\", \"eslint\").\nDefaults to the command basename if not specified.",
|
|
1158
|
+
"type": [
|
|
1159
|
+
"string",
|
|
1160
|
+
"null"
|
|
1161
|
+
],
|
|
1162
|
+
"default": null,
|
|
1163
|
+
"x-order": 3
|
|
1062
1164
|
},
|
|
1063
1165
|
"args": {
|
|
1064
1166
|
"description": "Arguments to pass to the server",
|
|
@@ -1066,30 +1168,23 @@
|
|
|
1066
1168
|
"items": {
|
|
1067
1169
|
"type": "string"
|
|
1068
1170
|
},
|
|
1069
|
-
"default": []
|
|
1070
|
-
|
|
1071
|
-
"enabled": {
|
|
1072
|
-
"description": "Whether the server is enabled",
|
|
1073
|
-
"type": "boolean",
|
|
1074
|
-
"default": true
|
|
1171
|
+
"default": [],
|
|
1172
|
+
"x-order": 4
|
|
1075
1173
|
},
|
|
1076
1174
|
"auto_start": {
|
|
1077
1175
|
"description": "Whether to auto-start this LSP server when opening matching files\nIf false (default), the server must be started manually via command palette",
|
|
1078
1176
|
"type": "boolean",
|
|
1079
|
-
"default": false
|
|
1080
|
-
|
|
1081
|
-
"process_limits": {
|
|
1082
|
-
"description": "Process resource limits (memory and CPU)",
|
|
1083
|
-
"$ref": "#/$defs/ProcessLimits",
|
|
1084
|
-
"default": {
|
|
1085
|
-
"max_memory_percent": 50,
|
|
1086
|
-
"max_cpu_percent": 90,
|
|
1087
|
-
"enabled": true
|
|
1088
|
-
}
|
|
1177
|
+
"default": false,
|
|
1178
|
+
"x-order": 5
|
|
1089
1179
|
},
|
|
1090
|
-
"
|
|
1091
|
-
"description": "
|
|
1092
|
-
"
|
|
1180
|
+
"root_markers": {
|
|
1181
|
+
"description": "File/directory names to search for when detecting the workspace root.\nThe editor walks upward from the opened file's directory looking for\nany of these markers. The first directory containing a match becomes\nthe workspace root sent to the LSP server.\n\nIf empty, falls back to `[\".git\"]` as a universal marker.\nIf the walk reaches a filesystem boundary without a match, uses the\nfile's parent directory (never cwd or $HOME).",
|
|
1182
|
+
"type": "array",
|
|
1183
|
+
"items": {
|
|
1184
|
+
"type": "string"
|
|
1185
|
+
},
|
|
1186
|
+
"default": [],
|
|
1187
|
+
"x-order": 6
|
|
1093
1188
|
},
|
|
1094
1189
|
"env": {
|
|
1095
1190
|
"description": "Environment variables to set for the LSP server process.\nThese are added to (or override) the inherited parent environment.",
|
|
@@ -1097,7 +1192,9 @@
|
|
|
1097
1192
|
"additionalProperties": {
|
|
1098
1193
|
"type": "string"
|
|
1099
1194
|
},
|
|
1100
|
-
"default": {}
|
|
1195
|
+
"default": {},
|
|
1196
|
+
"x-section": "Advanced",
|
|
1197
|
+
"x-order": 10
|
|
1101
1198
|
},
|
|
1102
1199
|
"language_id_overrides": {
|
|
1103
1200
|
"description": "Override the LSP languageId sent in textDocument/didOpen based on file extension.\nMaps file extension (without dot) to LSP language ID string.\nFor example: `{\"tsx\": \"typescriptreact\", \"jsx\": \"javascriptreact\"}`",
|
|
@@ -1105,11 +1202,136 @@
|
|
|
1105
1202
|
"additionalProperties": {
|
|
1106
1203
|
"type": "string"
|
|
1107
1204
|
},
|
|
1108
|
-
"default": {}
|
|
1205
|
+
"default": {},
|
|
1206
|
+
"x-section": "Advanced",
|
|
1207
|
+
"x-order": 11
|
|
1208
|
+
},
|
|
1209
|
+
"initialization_options": {
|
|
1210
|
+
"description": "Custom initialization options to send to the server\nThese are passed in the `initializationOptions` field of the LSP Initialize request",
|
|
1211
|
+
"default": null,
|
|
1212
|
+
"x-section": "Advanced",
|
|
1213
|
+
"x-order": 12
|
|
1214
|
+
},
|
|
1215
|
+
"only_features": {
|
|
1216
|
+
"description": "Restrict this server to only handle the listed features.\nMutually exclusive with `except_features`. If neither is set, all features are handled.",
|
|
1217
|
+
"type": [
|
|
1218
|
+
"array",
|
|
1219
|
+
"null"
|
|
1220
|
+
],
|
|
1221
|
+
"items": {
|
|
1222
|
+
"$ref": "#/$defs/LspFeature"
|
|
1223
|
+
},
|
|
1224
|
+
"default": null,
|
|
1225
|
+
"x-section": "Advanced",
|
|
1226
|
+
"x-order": 13
|
|
1227
|
+
},
|
|
1228
|
+
"except_features": {
|
|
1229
|
+
"description": "Exclude the listed features from this server.\nMutually exclusive with `only_features`. If neither is set, all features are handled.",
|
|
1230
|
+
"type": [
|
|
1231
|
+
"array",
|
|
1232
|
+
"null"
|
|
1233
|
+
],
|
|
1234
|
+
"items": {
|
|
1235
|
+
"$ref": "#/$defs/LspFeature"
|
|
1236
|
+
},
|
|
1237
|
+
"default": null,
|
|
1238
|
+
"x-section": "Advanced",
|
|
1239
|
+
"x-order": 14
|
|
1240
|
+
},
|
|
1241
|
+
"process_limits": {
|
|
1242
|
+
"description": "Process resource limits (memory and CPU)",
|
|
1243
|
+
"$ref": "#/$defs/ProcessLimits",
|
|
1244
|
+
"default": {
|
|
1245
|
+
"max_memory_percent": 50,
|
|
1246
|
+
"max_cpu_percent": 90,
|
|
1247
|
+
"enabled": true
|
|
1248
|
+
},
|
|
1249
|
+
"x-section": "Advanced",
|
|
1250
|
+
"x-order": 15
|
|
1109
1251
|
}
|
|
1110
1252
|
},
|
|
1111
1253
|
"x-display-field": "/command"
|
|
1112
1254
|
},
|
|
1255
|
+
"LspFeature": {
|
|
1256
|
+
"description": "LSP features that can be routed to specific servers in a multi-server setup.\n\nFeatures are classified as either \"merged\" (results from all servers are combined)\nor \"exclusive\" (first eligible server wins). This classification is used by the\ndispatch layer, not by this enum itself.",
|
|
1257
|
+
"oneOf": [
|
|
1258
|
+
{
|
|
1259
|
+
"description": "Diagnostics (merged: combined from all servers)",
|
|
1260
|
+
"type": "string",
|
|
1261
|
+
"const": "diagnostics"
|
|
1262
|
+
},
|
|
1263
|
+
{
|
|
1264
|
+
"description": "Code completion (merged: combined from all servers)",
|
|
1265
|
+
"type": "string",
|
|
1266
|
+
"const": "completion"
|
|
1267
|
+
},
|
|
1268
|
+
{
|
|
1269
|
+
"description": "Code actions / quick fixes (merged: combined from all servers)",
|
|
1270
|
+
"type": "string",
|
|
1271
|
+
"const": "code_action"
|
|
1272
|
+
},
|
|
1273
|
+
{
|
|
1274
|
+
"description": "Document symbols (merged: combined from all servers)",
|
|
1275
|
+
"type": "string",
|
|
1276
|
+
"const": "document_symbols"
|
|
1277
|
+
},
|
|
1278
|
+
{
|
|
1279
|
+
"description": "Workspace symbols (merged: combined from all servers)",
|
|
1280
|
+
"type": "string",
|
|
1281
|
+
"const": "workspace_symbols"
|
|
1282
|
+
},
|
|
1283
|
+
{
|
|
1284
|
+
"description": "Hover information (exclusive: first eligible server wins)",
|
|
1285
|
+
"type": "string",
|
|
1286
|
+
"const": "hover"
|
|
1287
|
+
},
|
|
1288
|
+
{
|
|
1289
|
+
"description": "Go to definition, declaration, type definition, implementation (exclusive)",
|
|
1290
|
+
"type": "string",
|
|
1291
|
+
"const": "definition"
|
|
1292
|
+
},
|
|
1293
|
+
{
|
|
1294
|
+
"description": "Find references (exclusive)",
|
|
1295
|
+
"type": "string",
|
|
1296
|
+
"const": "references"
|
|
1297
|
+
},
|
|
1298
|
+
{
|
|
1299
|
+
"description": "Document formatting and range formatting (exclusive)",
|
|
1300
|
+
"type": "string",
|
|
1301
|
+
"const": "format"
|
|
1302
|
+
},
|
|
1303
|
+
{
|
|
1304
|
+
"description": "Rename and prepare rename (exclusive)",
|
|
1305
|
+
"type": "string",
|
|
1306
|
+
"const": "rename"
|
|
1307
|
+
},
|
|
1308
|
+
{
|
|
1309
|
+
"description": "Signature help (exclusive)",
|
|
1310
|
+
"type": "string",
|
|
1311
|
+
"const": "signature_help"
|
|
1312
|
+
},
|
|
1313
|
+
{
|
|
1314
|
+
"description": "Inlay hints (exclusive)",
|
|
1315
|
+
"type": "string",
|
|
1316
|
+
"const": "inlay_hints"
|
|
1317
|
+
},
|
|
1318
|
+
{
|
|
1319
|
+
"description": "Folding ranges (exclusive)",
|
|
1320
|
+
"type": "string",
|
|
1321
|
+
"const": "folding_range"
|
|
1322
|
+
},
|
|
1323
|
+
{
|
|
1324
|
+
"description": "Semantic tokens (exclusive)",
|
|
1325
|
+
"type": "string",
|
|
1326
|
+
"const": "semantic_tokens"
|
|
1327
|
+
},
|
|
1328
|
+
{
|
|
1329
|
+
"description": "Document highlight (exclusive)",
|
|
1330
|
+
"type": "string",
|
|
1331
|
+
"const": "document_highlight"
|
|
1332
|
+
}
|
|
1333
|
+
]
|
|
1334
|
+
},
|
|
1113
1335
|
"ProcessLimits": {
|
|
1114
1336
|
"description": "Configuration for process resource limits",
|
|
1115
1337
|
"type": "object",
|
|
@@ -126,6 +126,10 @@ const finder = new Finder<DiagnosticItem>(editor, {
|
|
|
126
126
|
groupBy: "file",
|
|
127
127
|
syncWithEditor: true,
|
|
128
128
|
navigateOnCursorMove: true,
|
|
129
|
+
onClose: () => {
|
|
130
|
+
isOpen = false;
|
|
131
|
+
sourceBufferId = null;
|
|
132
|
+
},
|
|
129
133
|
});
|
|
130
134
|
|
|
131
135
|
// Get title based on current filter state
|
|
@@ -244,18 +248,6 @@ registerHandler("on_diagnostics_buffer_activated", on_diagnostics_buffer_activat
|
|
|
244
248
|
editor.on("diagnostics_updated", "on_diagnostics_updated");
|
|
245
249
|
editor.on("buffer_activated", "on_diagnostics_buffer_activated");
|
|
246
250
|
|
|
247
|
-
// Mode Definition (for custom keybindings beyond Enter/Escape)
|
|
248
|
-
editor.defineMode(
|
|
249
|
-
"diagnostics-extra",
|
|
250
|
-
[
|
|
251
|
-
["a", "diagnostics_toggle_all"],
|
|
252
|
-
["r", "diagnostics_refresh"],
|
|
253
|
-
["Return", `_finder_diagnostics_panel_select`],
|
|
254
|
-
["Escape", `_finder_diagnostics_panel_close`],
|
|
255
|
-
],
|
|
256
|
-
true
|
|
257
|
-
);
|
|
258
|
-
|
|
259
251
|
// Command Registration
|
|
260
252
|
editor.registerCommand(
|
|
261
253
|
"%cmd.show_diagnostics_panel",
|