@fresh-editor/fresh-editor 0.2.17 → 0.2.20
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 +144 -0
- package/package.json +1 -1
- package/plugins/astro-lsp.ts +118 -0
- package/plugins/bash-lsp.ts +161 -0
- package/plugins/clojure-lsp.ts +125 -0
- package/plugins/cmake-lsp.ts +138 -0
- package/plugins/config-schema.json +275 -29
- package/plugins/dart-lsp.ts +144 -0
- package/plugins/diagnostics_panel.ts +4 -12
- package/plugins/diff_nav.i18n.json +128 -0
- package/plugins/diff_nav.ts +196 -0
- package/plugins/elixir-lsp.ts +120 -0
- package/plugins/erlang-lsp.ts +121 -0
- package/plugins/fsharp-lsp.ts +125 -0
- package/plugins/git_gutter.ts +5 -0
- package/plugins/gleam-lsp.ts +124 -0
- package/plugins/graphql-lsp.ts +139 -0
- package/plugins/haskell-lsp.ts +125 -0
- package/plugins/julia-lsp.ts +111 -0
- package/plugins/kotlin-lsp.ts +162 -0
- package/plugins/lib/finder.ts +19 -12
- package/plugins/lib/fresh.d.ts +30 -1
- package/plugins/lua-lsp.ts +161 -0
- package/plugins/nim-lsp.ts +118 -0
- package/plugins/nix-lsp.ts +125 -0
- package/plugins/nushell-lsp.ts +144 -0
- package/plugins/ocaml-lsp.ts +119 -0
- package/plugins/perl-lsp.ts +118 -0
- package/plugins/php-lsp.ts +165 -0
- package/plugins/pkg.ts +37 -76
- package/plugins/protobuf-lsp.ts +144 -0
- package/plugins/r-lsp.ts +118 -0
- package/plugins/ruby-lsp.ts +165 -0
- package/plugins/scala-lsp.ts +119 -0
- package/plugins/schemas/package.schema.json +437 -272
- package/plugins/schemas/theme.schema.json +18 -0
- package/plugins/solidity-lsp.ts +130 -0
- package/plugins/sql-lsp.ts +129 -0
- package/plugins/svelte-lsp.ts +119 -0
- package/plugins/swift-lsp.ts +120 -0
- package/plugins/tailwindcss-lsp.ts +119 -0
- package/plugins/terraform-lsp.ts +144 -0
- package/plugins/theme_editor.i18n.json +70 -14
- package/plugins/theme_editor.ts +71 -39
- package/plugins/toml-lsp.ts +162 -0
- package/plugins/typst-lsp.ts +165 -0
- package/plugins/vue-lsp.ts +118 -0
- package/plugins/yaml-lsp.ts +163 -0
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/// <reference path="./lib/fresh.d.ts" />
|
|
2
|
+
const editor = getEditor();
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* CMake LSP Helper Plugin
|
|
6
|
+
*
|
|
7
|
+
* Provides user-friendly error handling for CMake LSP server issues.
|
|
8
|
+
* When cmake-language-server fails to start, this plugin shows an actionable
|
|
9
|
+
* popup with installation instructions.
|
|
10
|
+
*
|
|
11
|
+
* Features:
|
|
12
|
+
* - Detects CMake LSP server errors (cmake-language-server)
|
|
13
|
+
* - Shows popup with install commands (pip, pipx)
|
|
14
|
+
* - Provides option to disable CMake LSP
|
|
15
|
+
*
|
|
16
|
+
* VS Code: CMake Tools extension (v1.20+ has basic built-in language services)
|
|
17
|
+
* Neovim: nvim-lspconfig cmake
|
|
18
|
+
* Alternative: neocmakelsp (more actively maintained, has linting/formatting)
|
|
19
|
+
* See: https://github.com/neocmakelsp/neocmakelsp
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
interface LspServerErrorData {
|
|
23
|
+
language: string;
|
|
24
|
+
server_command: string;
|
|
25
|
+
error_type: string;
|
|
26
|
+
message: string;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
interface LspStatusClickedData {
|
|
30
|
+
language: string;
|
|
31
|
+
has_error: boolean;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
interface ActionPopupResultData {
|
|
35
|
+
popup_id: string;
|
|
36
|
+
action_id: string;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// Install commands for CMake LSP server
|
|
40
|
+
// See: https://github.com/regen100/cmake-language-server
|
|
41
|
+
const INSTALL_COMMANDS = {
|
|
42
|
+
pip: "pip install cmake-language-server",
|
|
43
|
+
pipx: "pipx install cmake-language-server",
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
// Track error state for CMake LSP
|
|
47
|
+
let cmakeLspError: { serverCommand: string; message: string } | null = null;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Handle LSP server errors for CMake
|
|
51
|
+
*/
|
|
52
|
+
function on_cmake_lsp_server_error(data: LspServerErrorData): void {
|
|
53
|
+
if (data.language !== "cmake") {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
editor.debug(`cmake-lsp: Server error - ${data.error_type}: ${data.message}`);
|
|
58
|
+
|
|
59
|
+
cmakeLspError = {
|
|
60
|
+
serverCommand: data.server_command,
|
|
61
|
+
message: data.message,
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
if (data.error_type === "not_found") {
|
|
65
|
+
editor.setStatus(
|
|
66
|
+
`CMake LSP server '${data.server_command}' not found. Click status bar for help.`
|
|
67
|
+
);
|
|
68
|
+
} else {
|
|
69
|
+
editor.setStatus(`CMake LSP error: ${data.message}`);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
registerHandler("on_cmake_lsp_server_error", on_cmake_lsp_server_error);
|
|
73
|
+
editor.on("lsp_server_error", "on_cmake_lsp_server_error");
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Handle status bar click when there's a CMake LSP error
|
|
77
|
+
*/
|
|
78
|
+
function on_cmake_lsp_status_clicked(data: LspStatusClickedData): void {
|
|
79
|
+
if (data.language !== "cmake" || !cmakeLspError) {
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
editor.debug("cmake-lsp: Status clicked, showing help popup");
|
|
84
|
+
|
|
85
|
+
editor.showActionPopup({
|
|
86
|
+
id: "cmake-lsp-help",
|
|
87
|
+
title: "CMake Language Server Not Found",
|
|
88
|
+
message: `"${cmakeLspError.serverCommand}" provides code completion, diagnostics, and navigation for CMakeLists.txt files. Requires Python. Copy a command below to install it, or visit https://github.com/regen100/cmake-language-server for details. Alternative: neocmakelsp (https://github.com/Decodetalkers/neocmakelsp).`,
|
|
89
|
+
actions: [
|
|
90
|
+
{ id: "copy_pip", label: `Copy: ${INSTALL_COMMANDS.pip}` },
|
|
91
|
+
{ id: "copy_pipx", label: `Copy: ${INSTALL_COMMANDS.pipx}` },
|
|
92
|
+
{ id: "disable", label: "Disable CMake LSP" },
|
|
93
|
+
{ id: "dismiss", label: "Dismiss (ESC)" },
|
|
94
|
+
],
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
registerHandler("on_cmake_lsp_status_clicked", on_cmake_lsp_status_clicked);
|
|
98
|
+
editor.on("lsp_status_clicked", "on_cmake_lsp_status_clicked");
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Handle action popup results for CMake LSP help
|
|
102
|
+
*/
|
|
103
|
+
function on_cmake_lsp_action_result(data: ActionPopupResultData): void {
|
|
104
|
+
if (data.popup_id !== "cmake-lsp-help") {
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
editor.debug(`cmake-lsp: Action selected - ${data.action_id}`);
|
|
109
|
+
|
|
110
|
+
switch (data.action_id) {
|
|
111
|
+
case "copy_pip":
|
|
112
|
+
editor.setClipboard(INSTALL_COMMANDS.pip);
|
|
113
|
+
editor.setStatus("Copied: " + INSTALL_COMMANDS.pip);
|
|
114
|
+
break;
|
|
115
|
+
|
|
116
|
+
case "copy_pipx":
|
|
117
|
+
editor.setClipboard(INSTALL_COMMANDS.pipx);
|
|
118
|
+
editor.setStatus("Copied: " + INSTALL_COMMANDS.pipx);
|
|
119
|
+
break;
|
|
120
|
+
|
|
121
|
+
case "disable":
|
|
122
|
+
editor.disableLspForLanguage("cmake");
|
|
123
|
+
editor.setStatus("CMake LSP disabled");
|
|
124
|
+
cmakeLspError = null;
|
|
125
|
+
break;
|
|
126
|
+
|
|
127
|
+
case "dismiss":
|
|
128
|
+
case "dismissed":
|
|
129
|
+
break;
|
|
130
|
+
|
|
131
|
+
default:
|
|
132
|
+
editor.debug(`cmake-lsp: Unknown action: ${data.action_id}`);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
registerHandler("on_cmake_lsp_action_result", on_cmake_lsp_action_result);
|
|
136
|
+
editor.on("action_popup_result", "on_cmake_lsp_action_result");
|
|
137
|
+
|
|
138
|
+
editor.debug("cmake-lsp: Plugin loaded");
|
|
@@ -34,12 +34,17 @@
|
|
|
34
34
|
"relative_line_numbers": false,
|
|
35
35
|
"line_wrap": true,
|
|
36
36
|
"wrap_indent": true,
|
|
37
|
+
"wrap_column": null,
|
|
38
|
+
"page_width": 80,
|
|
37
39
|
"syntax_highlighting": true,
|
|
38
40
|
"show_menu_bar": true,
|
|
41
|
+
"menu_bar_mnemonics": true,
|
|
39
42
|
"show_tab_bar": true,
|
|
40
43
|
"show_status_bar": true,
|
|
44
|
+
"show_prompt_line": true,
|
|
41
45
|
"show_vertical_scrollbar": true,
|
|
42
46
|
"show_horizontal_scrollbar": false,
|
|
47
|
+
"show_tilde": true,
|
|
43
48
|
"use_terminal_bg": false,
|
|
44
49
|
"cursor_style": "default",
|
|
45
50
|
"rulers": [],
|
|
@@ -50,6 +55,7 @@
|
|
|
50
55
|
"whitespace_tabs_leading": true,
|
|
51
56
|
"whitespace_tabs_inner": true,
|
|
52
57
|
"whitespace_tabs_trailing": true,
|
|
58
|
+
"use_tabs": false,
|
|
53
59
|
"tab_size": 4,
|
|
54
60
|
"auto_indent": true,
|
|
55
61
|
"auto_close": true,
|
|
@@ -151,11 +157,23 @@
|
|
|
151
157
|
},
|
|
152
158
|
"default": {}
|
|
153
159
|
},
|
|
160
|
+
"fallback": {
|
|
161
|
+
"description": "Fallback configuration for files whose type cannot be detected.\nApplied when no extension, filename, glob, or built-in detection matches.\nUseful for setting a default grammar (e.g., \"bash\") and comment_prefix\nfor unrecognized .conf, .rc, .rules, etc. files.",
|
|
162
|
+
"anyOf": [
|
|
163
|
+
{
|
|
164
|
+
"$ref": "#/$defs/LanguageConfig"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"type": "null"
|
|
168
|
+
}
|
|
169
|
+
],
|
|
170
|
+
"default": null
|
|
171
|
+
},
|
|
154
172
|
"lsp": {
|
|
155
|
-
"description": "LSP server configurations by language",
|
|
173
|
+
"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.",
|
|
156
174
|
"type": "object",
|
|
157
175
|
"additionalProperties": {
|
|
158
|
-
"$ref": "#/$defs/
|
|
176
|
+
"$ref": "#/$defs/LspLanguageConfig"
|
|
159
177
|
},
|
|
160
178
|
"default": {}
|
|
161
179
|
},
|
|
@@ -245,6 +263,28 @@
|
|
|
245
263
|
"default": true,
|
|
246
264
|
"x-section": "Display"
|
|
247
265
|
},
|
|
266
|
+
"wrap_column": {
|
|
267
|
+
"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).",
|
|
268
|
+
"type": [
|
|
269
|
+
"integer",
|
|
270
|
+
"null"
|
|
271
|
+
],
|
|
272
|
+
"format": "uint",
|
|
273
|
+
"minimum": 0,
|
|
274
|
+
"default": null,
|
|
275
|
+
"x-section": "Display"
|
|
276
|
+
},
|
|
277
|
+
"page_width": {
|
|
278
|
+
"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.",
|
|
279
|
+
"type": [
|
|
280
|
+
"integer",
|
|
281
|
+
"null"
|
|
282
|
+
],
|
|
283
|
+
"format": "uint",
|
|
284
|
+
"minimum": 0,
|
|
285
|
+
"default": 80,
|
|
286
|
+
"x-section": "Display"
|
|
287
|
+
},
|
|
248
288
|
"syntax_highlighting": {
|
|
249
289
|
"description": "Enable syntax highlighting for code files",
|
|
250
290
|
"type": "boolean",
|
|
@@ -257,6 +297,12 @@
|
|
|
257
297
|
"default": true,
|
|
258
298
|
"x-section": "Display"
|
|
259
299
|
},
|
|
300
|
+
"menu_bar_mnemonics": {
|
|
301
|
+
"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",
|
|
302
|
+
"type": "boolean",
|
|
303
|
+
"default": true,
|
|
304
|
+
"x-section": "Display"
|
|
305
|
+
},
|
|
260
306
|
"show_tab_bar": {
|
|
261
307
|
"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",
|
|
262
308
|
"type": "boolean",
|
|
@@ -269,6 +315,12 @@
|
|
|
269
315
|
"default": true,
|
|
270
316
|
"x-section": "Display"
|
|
271
317
|
},
|
|
318
|
+
"show_prompt_line": {
|
|
319
|
+
"description": "Whether the prompt line is visible by default.\nThe prompt line is the bottom-most line used for command input, search, file open, etc.\nWhen hidden, the prompt line only appears when a prompt is active.\nCan be toggled at runtime via command palette or keybinding.\nDefault: true",
|
|
320
|
+
"type": "boolean",
|
|
321
|
+
"default": true,
|
|
322
|
+
"x-section": "Display"
|
|
323
|
+
},
|
|
272
324
|
"show_vertical_scrollbar": {
|
|
273
325
|
"description": "Whether the vertical scrollbar is visible in each split pane.\nCan be toggled at runtime via command palette or keybinding.\nDefault: true",
|
|
274
326
|
"type": "boolean",
|
|
@@ -281,6 +333,12 @@
|
|
|
281
333
|
"default": false,
|
|
282
334
|
"x-section": "Display"
|
|
283
335
|
},
|
|
336
|
+
"show_tilde": {
|
|
337
|
+
"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",
|
|
338
|
+
"type": "boolean",
|
|
339
|
+
"default": true,
|
|
340
|
+
"x-section": "Display"
|
|
341
|
+
},
|
|
284
342
|
"use_terminal_bg": {
|
|
285
343
|
"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",
|
|
286
344
|
"type": "boolean",
|
|
@@ -346,6 +404,12 @@
|
|
|
346
404
|
"default": true,
|
|
347
405
|
"x-section": "Whitespace"
|
|
348
406
|
},
|
|
407
|
+
"use_tabs": {
|
|
408
|
+
"description": "Whether pressing Tab inserts a tab character instead of spaces.\nThis is the global default; individual languages can override it\nvia their own `use_tabs` setting.\nDefault: false (insert spaces)",
|
|
409
|
+
"type": "boolean",
|
|
410
|
+
"default": false,
|
|
411
|
+
"x-section": "Editing"
|
|
412
|
+
},
|
|
349
413
|
"tab_size": {
|
|
350
414
|
"description": "Number of spaces per tab character",
|
|
351
415
|
"type": "integer",
|
|
@@ -431,7 +495,7 @@
|
|
|
431
495
|
"x-section": "Completion"
|
|
432
496
|
},
|
|
433
497
|
"accept_suggestion_on_enter": {
|
|
434
|
-
"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\"",
|
|
498
|
+
"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\n\nDefault: \"on\"",
|
|
435
499
|
"$ref": "#/$defs/AcceptSuggestionOnEnter",
|
|
436
500
|
"default": "on",
|
|
437
501
|
"x-section": "Completion"
|
|
@@ -455,7 +519,7 @@
|
|
|
455
519
|
"x-section": "Diagnostics"
|
|
456
520
|
},
|
|
457
521
|
"mouse_hover_enabled": {
|
|
458
|
-
"description": "Whether mouse hover triggers LSP hover requests.\nWhen enabled, hovering over code with the mouse will show documentation.\nDefault: true",
|
|
522
|
+
"description": "Whether mouse hover triggers LSP hover requests.\nWhen enabled, hovering over code with the mouse will show documentation.\nOn Windows, this also controls the mouse tracking mode: when disabled,\nthe editor uses xterm mode 1002 (cell motion — click, drag, release only);\nwhen enabled, it uses mode 1003 (all motion — full mouse movement tracking).\nMode 1003 generates high event volume on Windows and may cause input\ncorruption on some systems. On macOS and Linux this setting only controls\nLSP hover; the mouse tracking mode is always full motion.\nDefault: true (macOS/Linux), false (Windows)",
|
|
459
523
|
"type": "boolean",
|
|
460
524
|
"default": true,
|
|
461
525
|
"x-section": "Mouse"
|
|
@@ -878,10 +942,49 @@
|
|
|
878
942
|
"type": "boolean",
|
|
879
943
|
"default": true
|
|
880
944
|
},
|
|
945
|
+
"line_wrap": {
|
|
946
|
+
"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.",
|
|
947
|
+
"type": [
|
|
948
|
+
"boolean",
|
|
949
|
+
"null"
|
|
950
|
+
],
|
|
951
|
+
"default": null
|
|
952
|
+
},
|
|
953
|
+
"wrap_column": {
|
|
954
|
+
"description": "Column at which to wrap lines for this language.\nIf not specified (`null`), falls back to the global `editor.wrap_column` setting.",
|
|
955
|
+
"type": [
|
|
956
|
+
"integer",
|
|
957
|
+
"null"
|
|
958
|
+
],
|
|
959
|
+
"format": "uint",
|
|
960
|
+
"minimum": 0,
|
|
961
|
+
"default": null
|
|
962
|
+
},
|
|
963
|
+
"page_view": {
|
|
964
|
+
"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.",
|
|
965
|
+
"type": [
|
|
966
|
+
"boolean",
|
|
967
|
+
"null"
|
|
968
|
+
],
|
|
969
|
+
"default": null
|
|
970
|
+
},
|
|
971
|
+
"page_width": {
|
|
972
|
+
"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.",
|
|
973
|
+
"type": [
|
|
974
|
+
"integer",
|
|
975
|
+
"null"
|
|
976
|
+
],
|
|
977
|
+
"format": "uint",
|
|
978
|
+
"minimum": 0,
|
|
979
|
+
"default": null
|
|
980
|
+
},
|
|
881
981
|
"use_tabs": {
|
|
882
|
-
"description": "Whether pressing Tab should insert a tab character instead of spaces.\
|
|
883
|
-
"type":
|
|
884
|
-
|
|
982
|
+
"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.",
|
|
983
|
+
"type": [
|
|
984
|
+
"boolean",
|
|
985
|
+
"null"
|
|
986
|
+
],
|
|
987
|
+
"default": null
|
|
885
988
|
},
|
|
886
989
|
"tab_size": {
|
|
887
990
|
"description": "Tab size (number of spaces per tab) for this language.\nIf not specified, falls back to the global editor.tab_size setting.",
|
|
@@ -1022,6 +1125,13 @@
|
|
|
1022
1125
|
],
|
|
1023
1126
|
"x-display-field": "/command"
|
|
1024
1127
|
},
|
|
1128
|
+
"LspLanguageConfig": {
|
|
1129
|
+
"description": "One or more LSP server configs for this language.\nAccepts both a single object and an array for backwards compatibility.",
|
|
1130
|
+
"type": "array",
|
|
1131
|
+
"items": {
|
|
1132
|
+
"$ref": "#/$defs/LspServerConfig"
|
|
1133
|
+
}
|
|
1134
|
+
},
|
|
1025
1135
|
"LspServerConfig": {
|
|
1026
1136
|
"description": "LSP server configuration",
|
|
1027
1137
|
"type": "object",
|
|
@@ -1029,7 +1139,23 @@
|
|
|
1029
1139
|
"command": {
|
|
1030
1140
|
"description": "Command to spawn the server.\nRequired when enabled=true, ignored when enabled=false.",
|
|
1031
1141
|
"type": "string",
|
|
1032
|
-
"default": ""
|
|
1142
|
+
"default": "",
|
|
1143
|
+
"x-order": 1
|
|
1144
|
+
},
|
|
1145
|
+
"enabled": {
|
|
1146
|
+
"description": "Whether the server is enabled",
|
|
1147
|
+
"type": "boolean",
|
|
1148
|
+
"default": true,
|
|
1149
|
+
"x-order": 2
|
|
1150
|
+
},
|
|
1151
|
+
"name": {
|
|
1152
|
+
"description": "Display name for this server (e.g., \"tsserver\", \"eslint\").\nDefaults to the command basename if not specified.",
|
|
1153
|
+
"type": [
|
|
1154
|
+
"string",
|
|
1155
|
+
"null"
|
|
1156
|
+
],
|
|
1157
|
+
"default": null,
|
|
1158
|
+
"x-order": 3
|
|
1033
1159
|
},
|
|
1034
1160
|
"args": {
|
|
1035
1161
|
"description": "Arguments to pass to the server",
|
|
@@ -1037,30 +1163,23 @@
|
|
|
1037
1163
|
"items": {
|
|
1038
1164
|
"type": "string"
|
|
1039
1165
|
},
|
|
1040
|
-
"default": []
|
|
1041
|
-
|
|
1042
|
-
"enabled": {
|
|
1043
|
-
"description": "Whether the server is enabled",
|
|
1044
|
-
"type": "boolean",
|
|
1045
|
-
"default": true
|
|
1166
|
+
"default": [],
|
|
1167
|
+
"x-order": 4
|
|
1046
1168
|
},
|
|
1047
1169
|
"auto_start": {
|
|
1048
1170
|
"description": "Whether to auto-start this LSP server when opening matching files\nIf false (default), the server must be started manually via command palette",
|
|
1049
1171
|
"type": "boolean",
|
|
1050
|
-
"default": false
|
|
1051
|
-
|
|
1052
|
-
"process_limits": {
|
|
1053
|
-
"description": "Process resource limits (memory and CPU)",
|
|
1054
|
-
"$ref": "#/$defs/ProcessLimits",
|
|
1055
|
-
"default": {
|
|
1056
|
-
"max_memory_percent": 50,
|
|
1057
|
-
"max_cpu_percent": 90,
|
|
1058
|
-
"enabled": true
|
|
1059
|
-
}
|
|
1172
|
+
"default": false,
|
|
1173
|
+
"x-order": 5
|
|
1060
1174
|
},
|
|
1061
|
-
"
|
|
1062
|
-
"description": "
|
|
1063
|
-
"
|
|
1175
|
+
"root_markers": {
|
|
1176
|
+
"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).",
|
|
1177
|
+
"type": "array",
|
|
1178
|
+
"items": {
|
|
1179
|
+
"type": "string"
|
|
1180
|
+
},
|
|
1181
|
+
"default": [],
|
|
1182
|
+
"x-order": 6
|
|
1064
1183
|
},
|
|
1065
1184
|
"env": {
|
|
1066
1185
|
"description": "Environment variables to set for the LSP server process.\nThese are added to (or override) the inherited parent environment.",
|
|
@@ -1068,7 +1187,9 @@
|
|
|
1068
1187
|
"additionalProperties": {
|
|
1069
1188
|
"type": "string"
|
|
1070
1189
|
},
|
|
1071
|
-
"default": {}
|
|
1190
|
+
"default": {},
|
|
1191
|
+
"x-section": "Advanced",
|
|
1192
|
+
"x-order": 10
|
|
1072
1193
|
},
|
|
1073
1194
|
"language_id_overrides": {
|
|
1074
1195
|
"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\"}`",
|
|
@@ -1076,11 +1197,136 @@
|
|
|
1076
1197
|
"additionalProperties": {
|
|
1077
1198
|
"type": "string"
|
|
1078
1199
|
},
|
|
1079
|
-
"default": {}
|
|
1200
|
+
"default": {},
|
|
1201
|
+
"x-section": "Advanced",
|
|
1202
|
+
"x-order": 11
|
|
1203
|
+
},
|
|
1204
|
+
"initialization_options": {
|
|
1205
|
+
"description": "Custom initialization options to send to the server\nThese are passed in the `initializationOptions` field of the LSP Initialize request",
|
|
1206
|
+
"default": null,
|
|
1207
|
+
"x-section": "Advanced",
|
|
1208
|
+
"x-order": 12
|
|
1209
|
+
},
|
|
1210
|
+
"only_features": {
|
|
1211
|
+
"description": "Restrict this server to only handle the listed features.\nMutually exclusive with `except_features`. If neither is set, all features are handled.",
|
|
1212
|
+
"type": [
|
|
1213
|
+
"array",
|
|
1214
|
+
"null"
|
|
1215
|
+
],
|
|
1216
|
+
"items": {
|
|
1217
|
+
"$ref": "#/$defs/LspFeature"
|
|
1218
|
+
},
|
|
1219
|
+
"default": null,
|
|
1220
|
+
"x-section": "Advanced",
|
|
1221
|
+
"x-order": 13
|
|
1222
|
+
},
|
|
1223
|
+
"except_features": {
|
|
1224
|
+
"description": "Exclude the listed features from this server.\nMutually exclusive with `only_features`. If neither is set, all features are handled.",
|
|
1225
|
+
"type": [
|
|
1226
|
+
"array",
|
|
1227
|
+
"null"
|
|
1228
|
+
],
|
|
1229
|
+
"items": {
|
|
1230
|
+
"$ref": "#/$defs/LspFeature"
|
|
1231
|
+
},
|
|
1232
|
+
"default": null,
|
|
1233
|
+
"x-section": "Advanced",
|
|
1234
|
+
"x-order": 14
|
|
1235
|
+
},
|
|
1236
|
+
"process_limits": {
|
|
1237
|
+
"description": "Process resource limits (memory and CPU)",
|
|
1238
|
+
"$ref": "#/$defs/ProcessLimits",
|
|
1239
|
+
"default": {
|
|
1240
|
+
"max_memory_percent": 50,
|
|
1241
|
+
"max_cpu_percent": 90,
|
|
1242
|
+
"enabled": true
|
|
1243
|
+
},
|
|
1244
|
+
"x-section": "Advanced",
|
|
1245
|
+
"x-order": 15
|
|
1080
1246
|
}
|
|
1081
1247
|
},
|
|
1082
1248
|
"x-display-field": "/command"
|
|
1083
1249
|
},
|
|
1250
|
+
"LspFeature": {
|
|
1251
|
+
"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.",
|
|
1252
|
+
"oneOf": [
|
|
1253
|
+
{
|
|
1254
|
+
"description": "Diagnostics (merged: combined from all servers)",
|
|
1255
|
+
"type": "string",
|
|
1256
|
+
"const": "diagnostics"
|
|
1257
|
+
},
|
|
1258
|
+
{
|
|
1259
|
+
"description": "Code completion (merged: combined from all servers)",
|
|
1260
|
+
"type": "string",
|
|
1261
|
+
"const": "completion"
|
|
1262
|
+
},
|
|
1263
|
+
{
|
|
1264
|
+
"description": "Code actions / quick fixes (merged: combined from all servers)",
|
|
1265
|
+
"type": "string",
|
|
1266
|
+
"const": "code_action"
|
|
1267
|
+
},
|
|
1268
|
+
{
|
|
1269
|
+
"description": "Document symbols (merged: combined from all servers)",
|
|
1270
|
+
"type": "string",
|
|
1271
|
+
"const": "document_symbols"
|
|
1272
|
+
},
|
|
1273
|
+
{
|
|
1274
|
+
"description": "Workspace symbols (merged: combined from all servers)",
|
|
1275
|
+
"type": "string",
|
|
1276
|
+
"const": "workspace_symbols"
|
|
1277
|
+
},
|
|
1278
|
+
{
|
|
1279
|
+
"description": "Hover information (exclusive: first eligible server wins)",
|
|
1280
|
+
"type": "string",
|
|
1281
|
+
"const": "hover"
|
|
1282
|
+
},
|
|
1283
|
+
{
|
|
1284
|
+
"description": "Go to definition, declaration, type definition, implementation (exclusive)",
|
|
1285
|
+
"type": "string",
|
|
1286
|
+
"const": "definition"
|
|
1287
|
+
},
|
|
1288
|
+
{
|
|
1289
|
+
"description": "Find references (exclusive)",
|
|
1290
|
+
"type": "string",
|
|
1291
|
+
"const": "references"
|
|
1292
|
+
},
|
|
1293
|
+
{
|
|
1294
|
+
"description": "Document formatting and range formatting (exclusive)",
|
|
1295
|
+
"type": "string",
|
|
1296
|
+
"const": "format"
|
|
1297
|
+
},
|
|
1298
|
+
{
|
|
1299
|
+
"description": "Rename and prepare rename (exclusive)",
|
|
1300
|
+
"type": "string",
|
|
1301
|
+
"const": "rename"
|
|
1302
|
+
},
|
|
1303
|
+
{
|
|
1304
|
+
"description": "Signature help (exclusive)",
|
|
1305
|
+
"type": "string",
|
|
1306
|
+
"const": "signature_help"
|
|
1307
|
+
},
|
|
1308
|
+
{
|
|
1309
|
+
"description": "Inlay hints (exclusive)",
|
|
1310
|
+
"type": "string",
|
|
1311
|
+
"const": "inlay_hints"
|
|
1312
|
+
},
|
|
1313
|
+
{
|
|
1314
|
+
"description": "Folding ranges (exclusive)",
|
|
1315
|
+
"type": "string",
|
|
1316
|
+
"const": "folding_range"
|
|
1317
|
+
},
|
|
1318
|
+
{
|
|
1319
|
+
"description": "Semantic tokens (exclusive)",
|
|
1320
|
+
"type": "string",
|
|
1321
|
+
"const": "semantic_tokens"
|
|
1322
|
+
},
|
|
1323
|
+
{
|
|
1324
|
+
"description": "Document highlight (exclusive)",
|
|
1325
|
+
"type": "string",
|
|
1326
|
+
"const": "document_highlight"
|
|
1327
|
+
}
|
|
1328
|
+
]
|
|
1329
|
+
},
|
|
1084
1330
|
"ProcessLimits": {
|
|
1085
1331
|
"description": "Configuration for process resource limits",
|
|
1086
1332
|
"type": "object",
|