@fresh-editor/fresh-editor 0.3.0 → 0.3.2
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 +120 -2
- package/package.json +1 -1
- package/plugins/astro-lsp.ts +6 -12
- package/plugins/audit_mode.ts +106 -113
- package/plugins/bash-lsp.ts +15 -22
- package/plugins/clangd-lsp.ts +15 -24
- package/plugins/clojure-lsp.ts +9 -12
- package/plugins/cmake-lsp.ts +9 -12
- package/plugins/code-tour.ts +15 -16
- package/plugins/config-schema.json +49 -5
- package/plugins/csharp_support.ts +25 -30
- package/plugins/css-lsp.ts +15 -22
- package/plugins/dart-lsp.ts +9 -12
- package/plugins/dashboard.ts +118 -0
- package/plugins/devcontainer.i18n.json +84 -28
- package/plugins/devcontainer.ts +897 -170
- package/plugins/diagnostics_panel.ts +10 -17
- package/plugins/diff_nav.ts +20 -1
- package/plugins/elixir-lsp.ts +9 -12
- package/plugins/erlang-lsp.ts +9 -12
- package/plugins/examples/bookmarks.ts +10 -16
- package/plugins/find_references.ts +5 -9
- package/plugins/flash.ts +585 -0
- package/plugins/fsharp-lsp.ts +9 -12
- package/plugins/git_explorer.ts +16 -20
- package/plugins/git_gutter.ts +65 -79
- package/plugins/git_log.ts +8 -8
- package/plugins/gleam-lsp.ts +9 -12
- package/plugins/go-lsp.ts +15 -22
- package/plugins/graphql-lsp.ts +9 -12
- package/plugins/haskell-lsp.ts +9 -12
- package/plugins/html-lsp.ts +15 -24
- package/plugins/java-lsp.ts +9 -12
- package/plugins/json-lsp.ts +15 -24
- package/plugins/julia-lsp.ts +9 -12
- package/plugins/kotlin-lsp.ts +15 -22
- package/plugins/latex-lsp.ts +9 -12
- package/plugins/lib/fresh.d.ts +378 -0
- package/plugins/live_diff.i18n.json +450 -0
- package/plugins/live_diff.ts +946 -0
- package/plugins/lua-lsp.ts +15 -22
- package/plugins/markdown_compose.ts +78 -122
- package/plugins/markdown_source.ts +8 -10
- package/plugins/marksman-lsp.ts +9 -12
- package/plugins/merge_conflict.ts +15 -17
- package/plugins/nim-lsp.ts +9 -12
- package/plugins/nix-lsp.ts +9 -12
- package/plugins/nushell-lsp.ts +9 -12
- package/plugins/ocaml-lsp.ts +9 -12
- package/plugins/odin-lsp.ts +15 -22
- package/plugins/path_complete.ts +5 -6
- package/plugins/perl-lsp.ts +9 -12
- package/plugins/php-lsp.ts +15 -22
- package/plugins/pkg.ts +10 -21
- package/plugins/protobuf-lsp.ts +9 -12
- package/plugins/python-lsp.ts +15 -24
- package/plugins/r-lsp.ts +9 -12
- package/plugins/ruby-lsp.ts +15 -22
- package/plugins/rust-lsp.ts +18 -28
- package/plugins/scala-lsp.ts +9 -12
- package/plugins/schemas/theme.schema.json +66 -0
- package/plugins/search_replace.ts +10 -13
- package/plugins/solidity-lsp.ts +9 -12
- package/plugins/sql-lsp.ts +9 -12
- package/plugins/svelte-lsp.ts +9 -12
- package/plugins/swift-lsp.ts +9 -12
- package/plugins/tailwindcss-lsp.ts +9 -12
- package/plugins/templ-lsp.ts +9 -12
- package/plugins/terraform-lsp.ts +9 -12
- package/plugins/theme_editor.i18n.json +182 -14
- package/plugins/theme_editor.ts +152 -208
- package/plugins/toml-lsp.ts +15 -22
- package/plugins/tsconfig.json +101 -0
- package/plugins/typescript-lsp.ts +15 -24
- package/plugins/typst-lsp.ts +15 -22
- package/plugins/vi_mode.ts +77 -290
- package/plugins/vue-lsp.ts +9 -12
- package/plugins/yaml-lsp.ts +15 -22
- package/plugins/zig-lsp.ts +9 -12
- package/themes/dark.json +2 -0
- package/themes/dracula.json +2 -0
- package/themes/high-contrast.json +2 -0
- package/themes/light.json +2 -0
- package/themes/nord.json +2 -0
- package/themes/nostalgia.json +2 -0
- package/themes/solarized-dark.json +2 -0
package/plugins/clojure-lsp.ts
CHANGED
|
@@ -36,7 +36,8 @@ const INSTALL_COMMANDS = {
|
|
|
36
36
|
|
|
37
37
|
let clojureLspError: { serverCommand: string; message: string } | null = null;
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
|
|
40
|
+
editor.on("lsp_server_error", (data) => {
|
|
40
41
|
if (data.language !== "clojure") {
|
|
41
42
|
return;
|
|
42
43
|
}
|
|
@@ -55,11 +56,10 @@ function on_clojure_lsp_server_error(data: LspServerErrorData): void {
|
|
|
55
56
|
} else {
|
|
56
57
|
editor.setStatus(`Clojure LSP error: ${data.message}`);
|
|
57
58
|
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
editor.on("lsp_server_error", "on_clojure_lsp_server_error");
|
|
59
|
+
});
|
|
60
|
+
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
editor.on("lsp_status_clicked", (data) => {
|
|
63
63
|
if (data.language !== "clojure" || !clojureLspError) {
|
|
64
64
|
return;
|
|
65
65
|
}
|
|
@@ -78,11 +78,10 @@ function on_clojure_lsp_status_clicked(data: LspStatusClickedData): void {
|
|
|
78
78
|
{ id: "dismiss", label: "Dismiss (ESC)" },
|
|
79
79
|
],
|
|
80
80
|
});
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
editor.on("lsp_status_clicked", "on_clojure_lsp_status_clicked");
|
|
81
|
+
});
|
|
82
|
+
|
|
84
83
|
|
|
85
|
-
|
|
84
|
+
editor.on("action_popup_result", (data) => {
|
|
86
85
|
if (data.popup_id !== "clojure-lsp-help") {
|
|
87
86
|
return;
|
|
88
87
|
}
|
|
@@ -118,8 +117,6 @@ function on_clojure_lsp_action_result(data: ActionPopupResultData): void {
|
|
|
118
117
|
default:
|
|
119
118
|
editor.debug(`clojure-lsp: Unknown action: ${data.action_id}`);
|
|
120
119
|
}
|
|
121
|
-
}
|
|
122
|
-
registerHandler("on_clojure_lsp_action_result", on_clojure_lsp_action_result);
|
|
123
|
-
editor.on("action_popup_result", "on_clojure_lsp_action_result");
|
|
120
|
+
});
|
|
124
121
|
|
|
125
122
|
editor.debug("clojure-lsp: Plugin loaded");
|
package/plugins/cmake-lsp.ts
CHANGED
|
@@ -49,7 +49,8 @@ let cmakeLspError: { serverCommand: string; message: string } | null = null;
|
|
|
49
49
|
/**
|
|
50
50
|
* Handle LSP server errors for CMake
|
|
51
51
|
*/
|
|
52
|
-
|
|
52
|
+
|
|
53
|
+
editor.on("lsp_server_error", (data) => {
|
|
53
54
|
if (data.language !== "cmake") {
|
|
54
55
|
return;
|
|
55
56
|
}
|
|
@@ -68,14 +69,13 @@ function on_cmake_lsp_server_error(data: LspServerErrorData): void {
|
|
|
68
69
|
} else {
|
|
69
70
|
editor.setStatus(`CMake LSP error: ${data.message}`);
|
|
70
71
|
}
|
|
71
|
-
}
|
|
72
|
-
registerHandler("on_cmake_lsp_server_error", on_cmake_lsp_server_error);
|
|
73
|
-
editor.on("lsp_server_error", "on_cmake_lsp_server_error");
|
|
72
|
+
});
|
|
74
73
|
|
|
75
74
|
/**
|
|
76
75
|
* Handle status bar click when there's a CMake LSP error
|
|
77
76
|
*/
|
|
78
|
-
|
|
77
|
+
|
|
78
|
+
editor.on("lsp_status_clicked", (data) => {
|
|
79
79
|
if (data.language !== "cmake" || !cmakeLspError) {
|
|
80
80
|
return;
|
|
81
81
|
}
|
|
@@ -93,14 +93,13 @@ function on_cmake_lsp_status_clicked(data: LspStatusClickedData): void {
|
|
|
93
93
|
{ id: "dismiss", label: "Dismiss (ESC)" },
|
|
94
94
|
],
|
|
95
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");
|
|
96
|
+
});
|
|
99
97
|
|
|
100
98
|
/**
|
|
101
99
|
* Handle action popup results for CMake LSP help
|
|
102
100
|
*/
|
|
103
|
-
|
|
101
|
+
|
|
102
|
+
editor.on("action_popup_result", (data) => {
|
|
104
103
|
if (data.popup_id !== "cmake-lsp-help") {
|
|
105
104
|
return;
|
|
106
105
|
}
|
|
@@ -131,8 +130,6 @@ function on_cmake_lsp_action_result(data: ActionPopupResultData): void {
|
|
|
131
130
|
default:
|
|
132
131
|
editor.debug(`cmake-lsp: Unknown action: ${data.action_id}`);
|
|
133
132
|
}
|
|
134
|
-
}
|
|
135
|
-
registerHandler("on_cmake_lsp_action_result", on_cmake_lsp_action_result);
|
|
136
|
-
editor.on("action_popup_result", "on_cmake_lsp_action_result");
|
|
133
|
+
});
|
|
137
134
|
|
|
138
135
|
editor.debug("cmake-lsp: Plugin loaded");
|
package/plugins/code-tour.ts
CHANGED
|
@@ -123,22 +123,7 @@ interface ActionPopupResultData {
|
|
|
123
123
|
action_id: string;
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
-
function tour_on_action_popup_result(data: ActionPopupResultData) : void {
|
|
127
|
-
if (data.popup_id !== TOUR_POPUP_ID) return;
|
|
128
126
|
|
|
129
|
-
switch (data.action_id) {
|
|
130
|
-
case "next":
|
|
131
|
-
nextStep();
|
|
132
|
-
break;
|
|
133
|
-
case "prev":
|
|
134
|
-
prevStep();
|
|
135
|
-
break;
|
|
136
|
-
case "exit":
|
|
137
|
-
exitTour();
|
|
138
|
-
break;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
registerHandler("tour_on_action_popup_result", tour_on_action_popup_result);
|
|
142
127
|
|
|
143
128
|
// ============================================================================
|
|
144
129
|
// Overlay Rendering
|
|
@@ -397,6 +382,20 @@ editor.registerCommand(
|
|
|
397
382
|
);
|
|
398
383
|
|
|
399
384
|
// Subscribe to action popup results for navigation buttons
|
|
400
|
-
editor.on("action_popup_result",
|
|
385
|
+
editor.on("action_popup_result", (data) => {
|
|
386
|
+
if (data.popup_id !== TOUR_POPUP_ID) return;
|
|
387
|
+
|
|
388
|
+
switch (data.action_id) {
|
|
389
|
+
case "next":
|
|
390
|
+
nextStep();
|
|
391
|
+
break;
|
|
392
|
+
case "prev":
|
|
393
|
+
prevStep();
|
|
394
|
+
break;
|
|
395
|
+
case "exit":
|
|
396
|
+
exitTour();
|
|
397
|
+
break;
|
|
398
|
+
}
|
|
399
|
+
});
|
|
401
400
|
|
|
402
401
|
editor.debug("Code Tour plugin loaded");
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"description": "Editor behavior settings (indentation, line numbers, wrapping, etc.)",
|
|
31
31
|
"$ref": "#/$defs/EditorConfig",
|
|
32
32
|
"default": {
|
|
33
|
+
"animations": true,
|
|
33
34
|
"line_numbers": true,
|
|
34
35
|
"relative_line_numbers": false,
|
|
35
36
|
"highlight_current_line": true,
|
|
@@ -45,6 +46,7 @@
|
|
|
45
46
|
"show_status_bar": true,
|
|
46
47
|
"status_bar": {
|
|
47
48
|
"left": [
|
|
49
|
+
"{remote}",
|
|
48
50
|
"{filename}",
|
|
49
51
|
"{cursor}",
|
|
50
52
|
"{diagnostics}",
|
|
@@ -61,7 +63,7 @@
|
|
|
61
63
|
"{palette}"
|
|
62
64
|
]
|
|
63
65
|
},
|
|
64
|
-
"show_prompt_line":
|
|
66
|
+
"show_prompt_line": false,
|
|
65
67
|
"show_vertical_scrollbar": true,
|
|
66
68
|
"show_horizontal_scrollbar": false,
|
|
67
69
|
"show_tilde": true,
|
|
@@ -101,6 +103,8 @@
|
|
|
101
103
|
"auto_save_interval_secs": 30,
|
|
102
104
|
"hot_exit": true,
|
|
103
105
|
"restore_previous_session": true,
|
|
106
|
+
"skip_session_restore_when_files_passed": true,
|
|
107
|
+
"auto_create_empty_buffer_on_last_buffer_close": true,
|
|
104
108
|
"recovery_enabled": true,
|
|
105
109
|
"auto_recovery_save_interval_secs": 2,
|
|
106
110
|
"auto_revert_poll_interval_ms": 2000,
|
|
@@ -126,7 +130,9 @@
|
|
|
126
130
|
"show_gitignored": false,
|
|
127
131
|
"custom_ignore_patterns": [],
|
|
128
132
|
"width": "30%",
|
|
129
|
-
"preview_tabs": true
|
|
133
|
+
"preview_tabs": true,
|
|
134
|
+
"side": "left",
|
|
135
|
+
"auto_open_on_last_buffer_close": true
|
|
130
136
|
}
|
|
131
137
|
},
|
|
132
138
|
"file_browser": {
|
|
@@ -268,6 +274,12 @@
|
|
|
268
274
|
"description": "Editor behavior configuration",
|
|
269
275
|
"type": "object",
|
|
270
276
|
"properties": {
|
|
277
|
+
"animations": {
|
|
278
|
+
"description": "Enable frame-buffer animations (tab-switch slides, dashboard\nbringup, plugin-driven effects). When `false`, every animation\ncall is a no-op: the UI is fully static and each render lands\nthe final frame immediately. Useful on slow terminals, over\nSSH, or for users who prefer no motion.",
|
|
279
|
+
"type": "boolean",
|
|
280
|
+
"default": true,
|
|
281
|
+
"x-section": "Display"
|
|
282
|
+
},
|
|
271
283
|
"line_numbers": {
|
|
272
284
|
"description": "Show line numbers in the gutter (default for new buffers)",
|
|
273
285
|
"type": "boolean",
|
|
@@ -361,6 +373,7 @@
|
|
|
361
373
|
"$ref": "#/$defs/StatusBarConfig",
|
|
362
374
|
"default": {
|
|
363
375
|
"left": [
|
|
376
|
+
"{remote}",
|
|
364
377
|
"{filename}",
|
|
365
378
|
"{cursor}",
|
|
366
379
|
"{diagnostics}",
|
|
@@ -380,9 +393,9 @@
|
|
|
380
393
|
"x-section": "Status Bar"
|
|
381
394
|
},
|
|
382
395
|
"show_prompt_line": {
|
|
383
|
-
"description": "Whether the prompt line is visible
|
|
396
|
+
"description": "Whether the prompt line is always visible.\nThe prompt line is the bottom-most line used for search, file open, and other prompts.\nWhen `false` (the default), the prompt line auto-hides — it only appears\nwhile a prompt is active and disappears again once the prompt closes.\nWhen `true`, the prompt line is always reserved at the bottom of the screen.\nDefault: false",
|
|
384
397
|
"type": "boolean",
|
|
385
|
-
"default":
|
|
398
|
+
"default": false,
|
|
386
399
|
"x-section": "Display"
|
|
387
400
|
},
|
|
388
401
|
"show_vertical_scrollbar": {
|
|
@@ -634,7 +647,19 @@
|
|
|
634
647
|
"description": "Whether to auto-open previously opened files (session restore) when\nstarting Fresh in a directory. When enabled (the default), tabs,\nsplits, cursor positions and the file explorer state are restored\nfrom the last clean exit in the same working directory. When\ndisabled, Fresh starts with a clean workspace. The workspace file\non disk is still written on exit, so re-enabling this setting picks\nup whatever state was saved at the most recent clean exit. The\n`--no-restore` CLI flag is a stronger override: it skips both\nrestoring and saving the workspace.\nDefault: true",
|
|
635
648
|
"type": "boolean",
|
|
636
649
|
"default": true,
|
|
637
|
-
"x-section": "
|
|
650
|
+
"x-section": "Startup"
|
|
651
|
+
},
|
|
652
|
+
"skip_session_restore_when_files_passed": {
|
|
653
|
+
"description": "When Fresh is launched with one or more file arguments (e.g.\n`fresh src/main.rs README.md`), skip the workspace session restore\nand open only the files passed on the command line. Hot-exit\ncontent (unsaved modified files and unnamed `[No Name]` buffers\nwith content) is still restored so in-progress work is never lost.\nPure-directory invocations (`fresh some/dir`) and bare invocations\n(`fresh` with no args) still restore the previous session normally.\nDisable this option to keep the legacy behavior of always\nrestoring the previous session even when files are passed.\nDefault: true",
|
|
654
|
+
"type": "boolean",
|
|
655
|
+
"default": true,
|
|
656
|
+
"x-section": "Startup"
|
|
657
|
+
},
|
|
658
|
+
"auto_create_empty_buffer_on_last_buffer_close": {
|
|
659
|
+
"description": "Whether to auto-create a fresh empty `[No Name]` buffer when the\nlast open buffer is closed. When `false`, the editor still creates\nan internal placeholder buffer (it always needs at least one) but\nhides it from the tab bar so the workspace looks blank. Combined\nwith `file_explorer.auto_open_on_last_buffer_close = false`, this\ngives a fully blank workspace where nothing opens automatically.\nDefault: true",
|
|
660
|
+
"type": "boolean",
|
|
661
|
+
"default": true,
|
|
662
|
+
"x-section": "Startup"
|
|
638
663
|
},
|
|
639
664
|
"recovery_enabled": {
|
|
640
665
|
"description": "Whether to enable file recovery (Emacs-style auto-save)\nWhen enabled, buffers are periodically saved to recovery files\nso they can be recovered if the editor crashes.",
|
|
@@ -751,6 +776,7 @@
|
|
|
751
776
|
"$ref": "#/$defs/StatusBarElement"
|
|
752
777
|
},
|
|
753
778
|
"default": [
|
|
779
|
+
"{remote}",
|
|
754
780
|
"{filename}",
|
|
755
781
|
"{cursor}",
|
|
756
782
|
"{diagnostics}",
|
|
@@ -908,6 +934,16 @@
|
|
|
908
934
|
"description": "Open files in a \"preview\" (ephemeral) tab on single-click in the\nfile explorer. The preview tab is replaced by the next single-click\ninstead of accumulating tabs. Editing the file, double-clicking\n(or pressing Enter) on it in the explorer, or dragging its tab\npromotes the tab to a permanent tab.\nDefault: true",
|
|
909
935
|
"type": "boolean",
|
|
910
936
|
"default": true
|
|
937
|
+
},
|
|
938
|
+
"side": {
|
|
939
|
+
"description": "Which side of the screen to show the file explorer on.\nDefault: left",
|
|
940
|
+
"$ref": "#/$defs/FileExplorerSide",
|
|
941
|
+
"default": "left"
|
|
942
|
+
},
|
|
943
|
+
"auto_open_on_last_buffer_close": {
|
|
944
|
+
"description": "Automatically focus the file explorer when the last buffer is\nclosed. Set to `false` for a \"blank workspace\" workflow where\nnothing opens automatically and the user explicitly invokes the\nfile explorer (e.g. via keybinding or command palette).\nDefault: true",
|
|
945
|
+
"type": "boolean",
|
|
946
|
+
"default": true
|
|
911
947
|
}
|
|
912
948
|
}
|
|
913
949
|
},
|
|
@@ -916,6 +952,14 @@
|
|
|
916
952
|
"type": "string",
|
|
917
953
|
"pattern": "^(100%|[1-9]?[0-9]%|\\d+)$"
|
|
918
954
|
},
|
|
955
|
+
"FileExplorerSide": {
|
|
956
|
+
"description": "Side placement for the file explorer panel.",
|
|
957
|
+
"type": "string",
|
|
958
|
+
"enum": [
|
|
959
|
+
"left",
|
|
960
|
+
"right"
|
|
961
|
+
]
|
|
962
|
+
},
|
|
919
963
|
"FileBrowserConfig": {
|
|
920
964
|
"description": "File browser configuration (for Open File dialog)",
|
|
921
965
|
"type": "object",
|
|
@@ -169,7 +169,10 @@ async function restoreProject(projectPath: string): Promise<void> {
|
|
|
169
169
|
/**
|
|
170
170
|
* Handle file open - set project root and restore packages
|
|
171
171
|
*/
|
|
172
|
-
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
// Register hook for file open
|
|
175
|
+
editor.on("after_file_open", async (data) => {
|
|
173
176
|
// Only handle .cs files
|
|
174
177
|
if (!data.path.endsWith(".cs")) {
|
|
175
178
|
return;
|
|
@@ -206,16 +209,15 @@ async function on_csharp_file_open(data: AfterFileOpenData) : Promise<void> {
|
|
|
206
209
|
await restoreProject(dir);
|
|
207
210
|
}
|
|
208
211
|
}
|
|
209
|
-
}
|
|
210
|
-
registerHandler("on_csharp_file_open", on_csharp_file_open);
|
|
211
|
-
|
|
212
|
-
// Register hook for file open
|
|
213
|
-
editor.on("after_file_open", "on_csharp_file_open");
|
|
212
|
+
});
|
|
214
213
|
|
|
215
214
|
/**
|
|
216
215
|
* Handle LSP server requests from C# language servers (Roslyn-based)
|
|
217
216
|
*/
|
|
218
|
-
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
// Register hook for LSP server requests
|
|
220
|
+
editor.on("lsp_server_request", (data) => {
|
|
219
221
|
// Only handle requests from C# language servers
|
|
220
222
|
if (data.server_command !== "csharp-ls" && data.server_command !== "csharp-language-server") {
|
|
221
223
|
return;
|
|
@@ -243,16 +245,15 @@ function on_csharp_lsp_server_request(data: LspServerRequestData) : void {
|
|
|
243
245
|
// Log unhandled requests for debugging
|
|
244
246
|
editor.debug(`csharp_support: Unhandled LSP request: ${data.method}`);
|
|
245
247
|
}
|
|
246
|
-
}
|
|
247
|
-
registerHandler("on_csharp_lsp_server_request", on_csharp_lsp_server_request);
|
|
248
|
-
|
|
249
|
-
// Register hook for LSP server requests
|
|
250
|
-
editor.on("lsp_server_request", "on_csharp_lsp_server_request");
|
|
248
|
+
});
|
|
251
249
|
|
|
252
250
|
/**
|
|
253
251
|
* Handle LSP server errors for C#
|
|
254
252
|
*/
|
|
255
|
-
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
// Register hook for LSP server errors
|
|
256
|
+
editor.on("lsp_server_error", (data) => {
|
|
256
257
|
// Only handle C# language errors
|
|
257
258
|
if (data.language !== "csharp") {
|
|
258
259
|
return;
|
|
@@ -274,16 +275,15 @@ function on_csharp_lsp_server_error(data: LspServerErrorData) : void {
|
|
|
274
275
|
} else {
|
|
275
276
|
editor.setStatus(`C# LSP error: ${data.message}`);
|
|
276
277
|
}
|
|
277
|
-
}
|
|
278
|
-
registerHandler("on_csharp_lsp_server_error", on_csharp_lsp_server_error);
|
|
279
|
-
|
|
280
|
-
// Register hook for LSP server errors
|
|
281
|
-
editor.on("lsp_server_error", "on_csharp_lsp_server_error");
|
|
278
|
+
});
|
|
282
279
|
|
|
283
280
|
/**
|
|
284
281
|
* Handle status bar click when there's a C# LSP error
|
|
285
282
|
*/
|
|
286
|
-
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
// Register hook for status bar clicks
|
|
286
|
+
editor.on("lsp_status_clicked", (data) => {
|
|
287
287
|
// Only handle C# language clicks when there's an error
|
|
288
288
|
if (data.language !== "csharp" || !csharpLspError) {
|
|
289
289
|
return;
|
|
@@ -302,16 +302,15 @@ function on_csharp_lsp_status_clicked(data: LspStatusClickedData) : void {
|
|
|
302
302
|
{ id: "dismiss", label: "Dismiss (ESC)" },
|
|
303
303
|
],
|
|
304
304
|
});
|
|
305
|
-
}
|
|
306
|
-
registerHandler("on_csharp_lsp_status_clicked", on_csharp_lsp_status_clicked);
|
|
307
|
-
|
|
308
|
-
// Register hook for status bar clicks
|
|
309
|
-
editor.on("lsp_status_clicked", "on_csharp_lsp_status_clicked");
|
|
305
|
+
});
|
|
310
306
|
|
|
311
307
|
/**
|
|
312
308
|
* Handle action popup results for C# LSP help
|
|
313
309
|
*/
|
|
314
|
-
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
// Register hook for action popup results
|
|
313
|
+
editor.on("action_popup_result", (data) => {
|
|
315
314
|
// Only handle our popup
|
|
316
315
|
if (data.popup_id !== "csharp-lsp-help") {
|
|
317
316
|
return;
|
|
@@ -339,10 +338,6 @@ function on_csharp_lsp_action_result(data: ActionPopupResultData) : void {
|
|
|
339
338
|
default:
|
|
340
339
|
editor.debug(`csharp_support: Unknown action: ${data.action_id}`);
|
|
341
340
|
}
|
|
342
|
-
}
|
|
343
|
-
registerHandler("on_csharp_lsp_action_result", on_csharp_lsp_action_result);
|
|
344
|
-
|
|
345
|
-
// Register hook for action popup results
|
|
346
|
-
editor.on("action_popup_result", "on_csharp_lsp_action_result");
|
|
341
|
+
});
|
|
347
342
|
|
|
348
343
|
editor.debug("csharp_support: Plugin loaded");
|
package/plugins/css-lsp.ts
CHANGED
|
@@ -46,7 +46,10 @@ let cssLspError: { serverCommand: string; message: string } | null = null;
|
|
|
46
46
|
/**
|
|
47
47
|
* Handle LSP server errors for CSS
|
|
48
48
|
*/
|
|
49
|
-
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
// Register hook for LSP server errors
|
|
52
|
+
editor.on("lsp_server_error", (data) => {
|
|
50
53
|
// Only handle CSS language errors
|
|
51
54
|
if (data.language !== "css") {
|
|
52
55
|
return;
|
|
@@ -68,18 +71,15 @@ function on_css_lsp_server_error(data: LspServerErrorData) : void {
|
|
|
68
71
|
} else {
|
|
69
72
|
editor.setStatus(`CSS LSP error: ${data.message}`);
|
|
70
73
|
}
|
|
71
|
-
}
|
|
72
|
-
registerHandler("on_css_lsp_server_error", on_css_lsp_server_error);
|
|
73
|
-
|
|
74
|
-
// Register hook for LSP server errors
|
|
75
|
-
editor.on("lsp_server_error", "on_css_lsp_server_error");
|
|
74
|
+
});
|
|
76
75
|
|
|
77
76
|
/**
|
|
78
77
|
* Handle status bar click when there's a CSS LSP error
|
|
79
78
|
*/
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
// Register hook for status bar clicks
|
|
82
|
+
editor.on("lsp_status_clicked", (data) => {
|
|
83
83
|
// Only handle CSS language clicks when there's an error
|
|
84
84
|
if (data.language !== "css" || !cssLspError) {
|
|
85
85
|
return;
|
|
@@ -98,18 +98,15 @@ function on_css_lsp_status_clicked(
|
|
|
98
98
|
{ id: "dismiss", label: "Dismiss (ESC)" },
|
|
99
99
|
],
|
|
100
100
|
});
|
|
101
|
-
}
|
|
102
|
-
registerHandler("on_css_lsp_status_clicked", on_css_lsp_status_clicked);
|
|
103
|
-
|
|
104
|
-
// Register hook for status bar clicks
|
|
105
|
-
editor.on("lsp_status_clicked", "on_css_lsp_status_clicked");
|
|
101
|
+
});
|
|
106
102
|
|
|
107
103
|
/**
|
|
108
104
|
* Handle action popup results for CSS LSP help
|
|
109
105
|
*/
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
// Register hook for action popup results
|
|
109
|
+
editor.on("action_popup_result", (data) => {
|
|
113
110
|
// Only handle our popup
|
|
114
111
|
if (data.popup_id !== "css-lsp-help") {
|
|
115
112
|
return;
|
|
@@ -137,10 +134,6 @@ function on_css_lsp_action_result(
|
|
|
137
134
|
default:
|
|
138
135
|
editor.debug(`css-lsp: Unknown action: ${data.action_id}`);
|
|
139
136
|
}
|
|
140
|
-
}
|
|
141
|
-
registerHandler("on_css_lsp_action_result", on_css_lsp_action_result);
|
|
142
|
-
|
|
143
|
-
// Register hook for action popup results
|
|
144
|
-
editor.on("action_popup_result", "on_css_lsp_action_result");
|
|
137
|
+
});
|
|
145
138
|
|
|
146
139
|
editor.debug("css-lsp: Plugin loaded");
|
package/plugins/dart-lsp.ts
CHANGED
|
@@ -49,7 +49,8 @@ let dartLspError: { serverCommand: string; message: string } | null = null;
|
|
|
49
49
|
/**
|
|
50
50
|
* Handle LSP server errors for Dart
|
|
51
51
|
*/
|
|
52
|
-
|
|
52
|
+
|
|
53
|
+
editor.on("lsp_server_error", (data) => {
|
|
53
54
|
if (data.language !== "dart") {
|
|
54
55
|
return;
|
|
55
56
|
}
|
|
@@ -68,14 +69,13 @@ function on_dart_lsp_server_error(data: LspServerErrorData): void {
|
|
|
68
69
|
} else {
|
|
69
70
|
editor.setStatus(`Dart LSP error: ${data.message}`);
|
|
70
71
|
}
|
|
71
|
-
}
|
|
72
|
-
registerHandler("on_dart_lsp_server_error", on_dart_lsp_server_error);
|
|
73
|
-
editor.on("lsp_server_error", "on_dart_lsp_server_error");
|
|
72
|
+
});
|
|
74
73
|
|
|
75
74
|
/**
|
|
76
75
|
* Handle status bar click when there's a Dart LSP error
|
|
77
76
|
*/
|
|
78
|
-
|
|
77
|
+
|
|
78
|
+
editor.on("lsp_status_clicked", (data) => {
|
|
79
79
|
if (data.language !== "dart" || !dartLspError) {
|
|
80
80
|
return;
|
|
81
81
|
}
|
|
@@ -94,14 +94,13 @@ function on_dart_lsp_status_clicked(data: LspStatusClickedData): void {
|
|
|
94
94
|
{ id: "dismiss", label: "Dismiss (ESC)" },
|
|
95
95
|
],
|
|
96
96
|
});
|
|
97
|
-
}
|
|
98
|
-
registerHandler("on_dart_lsp_status_clicked", on_dart_lsp_status_clicked);
|
|
99
|
-
editor.on("lsp_status_clicked", "on_dart_lsp_status_clicked");
|
|
97
|
+
});
|
|
100
98
|
|
|
101
99
|
/**
|
|
102
100
|
* Handle action popup results for Dart LSP help
|
|
103
101
|
*/
|
|
104
|
-
|
|
102
|
+
|
|
103
|
+
editor.on("action_popup_result", (data) => {
|
|
105
104
|
if (data.popup_id !== "dart-lsp-help") {
|
|
106
105
|
return;
|
|
107
106
|
}
|
|
@@ -137,8 +136,6 @@ function on_dart_lsp_action_result(data: ActionPopupResultData): void {
|
|
|
137
136
|
default:
|
|
138
137
|
editor.debug(`dart-lsp: Unknown action: ${data.action_id}`);
|
|
139
138
|
}
|
|
140
|
-
}
|
|
141
|
-
registerHandler("on_dart_lsp_action_result", on_dart_lsp_action_result);
|
|
142
|
-
editor.on("action_popup_result", "on_dart_lsp_action_result");
|
|
139
|
+
});
|
|
143
140
|
|
|
144
141
|
editor.debug("dart-lsp: Plugin loaded");
|