@fresh-editor/fresh-editor 0.2.25 → 0.3.1
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 +216 -0
- package/README.md +6 -0
- package/package.json +1 -1
- package/plugins/astro-lsp.ts +6 -12
- package/plugins/audit_mode.i18n.json +14 -14
- package/plugins/audit_mode.ts +182 -146
- 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 +79 -6
- 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 +1903 -0
- package/plugins/devcontainer.i18n.json +1472 -0
- package/plugins/devcontainer.ts +2793 -0
- package/plugins/diagnostics_panel.ts +10 -17
- 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 +577 -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.i18n.json +14 -42
- package/plugins/git_log.ts +19 -9
- 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 +603 -0
- package/plugins/lua-lsp.ts +15 -22
- package/plugins/markdown_compose.ts +132 -128
- 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 +126 -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 +98 -14
- package/plugins/theme_editor.ts +156 -209
- package/plugins/toml-lsp.ts +15 -22
- package/plugins/tsconfig.json +100 -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/high-contrast.json +2 -2
- package/themes/nord.json +4 -0
- package/themes/solarized-dark.json +4 -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,9 +30,11 @@
|
|
|
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,
|
|
37
|
+
"highlight_current_column": false,
|
|
36
38
|
"line_wrap": true,
|
|
37
39
|
"wrap_indent": true,
|
|
38
40
|
"wrap_column": null,
|
|
@@ -44,6 +46,7 @@
|
|
|
44
46
|
"show_status_bar": true,
|
|
45
47
|
"status_bar": {
|
|
46
48
|
"left": [
|
|
49
|
+
"{remote}",
|
|
47
50
|
"{filename}",
|
|
48
51
|
"{cursor}",
|
|
49
52
|
"{diagnostics}",
|
|
@@ -65,6 +68,7 @@
|
|
|
65
68
|
"show_horizontal_scrollbar": false,
|
|
66
69
|
"show_tilde": true,
|
|
67
70
|
"use_terminal_bg": false,
|
|
71
|
+
"set_window_title": true,
|
|
68
72
|
"cursor_style": "default",
|
|
69
73
|
"rulers": [],
|
|
70
74
|
"whitespace_show": true,
|
|
@@ -98,6 +102,7 @@
|
|
|
98
102
|
"auto_save_enabled": false,
|
|
99
103
|
"auto_save_interval_secs": 30,
|
|
100
104
|
"hot_exit": true,
|
|
105
|
+
"restore_previous_session": true,
|
|
101
106
|
"recovery_enabled": true,
|
|
102
107
|
"auto_recovery_save_interval_secs": 2,
|
|
103
108
|
"auto_revert_poll_interval_ms": 2000,
|
|
@@ -122,7 +127,7 @@
|
|
|
122
127
|
"show_hidden": false,
|
|
123
128
|
"show_gitignored": false,
|
|
124
129
|
"custom_ignore_patterns": [],
|
|
125
|
-
"width":
|
|
130
|
+
"width": "30%",
|
|
126
131
|
"preview_tabs": true
|
|
127
132
|
}
|
|
128
133
|
},
|
|
@@ -145,7 +150,8 @@
|
|
|
145
150
|
"description": "Terminal settings",
|
|
146
151
|
"$ref": "#/$defs/TerminalConfig",
|
|
147
152
|
"default": {
|
|
148
|
-
"jump_to_end_on_output": true
|
|
153
|
+
"jump_to_end_on_output": true,
|
|
154
|
+
"shell": null
|
|
149
155
|
}
|
|
150
156
|
},
|
|
151
157
|
"keybindings": {
|
|
@@ -264,6 +270,12 @@
|
|
|
264
270
|
"description": "Editor behavior configuration",
|
|
265
271
|
"type": "object",
|
|
266
272
|
"properties": {
|
|
273
|
+
"animations": {
|
|
274
|
+
"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.",
|
|
275
|
+
"type": "boolean",
|
|
276
|
+
"default": true,
|
|
277
|
+
"x-section": "Display"
|
|
278
|
+
},
|
|
267
279
|
"line_numbers": {
|
|
268
280
|
"description": "Show line numbers in the gutter (default for new buffers)",
|
|
269
281
|
"type": "boolean",
|
|
@@ -282,6 +294,12 @@
|
|
|
282
294
|
"default": true,
|
|
283
295
|
"x-section": "Display"
|
|
284
296
|
},
|
|
297
|
+
"highlight_current_column": {
|
|
298
|
+
"description": "Highlight the column containing the cursor",
|
|
299
|
+
"type": "boolean",
|
|
300
|
+
"default": false,
|
|
301
|
+
"x-section": "Display"
|
|
302
|
+
},
|
|
285
303
|
"line_wrap": {
|
|
286
304
|
"description": "Wrap long lines to fit the window width (default for new views)",
|
|
287
305
|
"type": "boolean",
|
|
@@ -351,6 +369,7 @@
|
|
|
351
369
|
"$ref": "#/$defs/StatusBarConfig",
|
|
352
370
|
"default": {
|
|
353
371
|
"left": [
|
|
372
|
+
"{remote}",
|
|
354
373
|
"{filename}",
|
|
355
374
|
"{cursor}",
|
|
356
375
|
"{diagnostics}",
|
|
@@ -399,6 +418,12 @@
|
|
|
399
418
|
"default": false,
|
|
400
419
|
"x-section": "Display"
|
|
401
420
|
},
|
|
421
|
+
"set_window_title": {
|
|
422
|
+
"description": "Update the terminal window title (via OSC 2) to reflect the active buffer.\nWhen enabled, Fresh sets the terminal/tab title to \"<file> — Fresh\" as\nyou switch buffers. Harmless on terminals that don't understand the\nescape sequence — they silently ignore it.\nDefault: true",
|
|
423
|
+
"type": "boolean",
|
|
424
|
+
"default": true,
|
|
425
|
+
"x-section": "Display"
|
|
426
|
+
},
|
|
402
427
|
"cursor_style": {
|
|
403
428
|
"description": "Cursor style for the terminal cursor.\nOptions: blinking_block, steady_block, blinking_bar, steady_bar, blinking_underline, steady_underline\nDefault: blinking_block",
|
|
404
429
|
"$ref": "#/$defs/CursorStyle",
|
|
@@ -614,6 +639,12 @@
|
|
|
614
639
|
"default": true,
|
|
615
640
|
"x-section": "Recovery"
|
|
616
641
|
},
|
|
642
|
+
"restore_previous_session": {
|
|
643
|
+
"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",
|
|
644
|
+
"type": "boolean",
|
|
645
|
+
"default": true,
|
|
646
|
+
"x-section": "Recovery"
|
|
647
|
+
},
|
|
617
648
|
"recovery_enabled": {
|
|
618
649
|
"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.",
|
|
619
650
|
"type": "boolean",
|
|
@@ -729,6 +760,7 @@
|
|
|
729
760
|
"$ref": "#/$defs/StatusBarElement"
|
|
730
761
|
},
|
|
731
762
|
"default": [
|
|
763
|
+
"{remote}",
|
|
732
764
|
"{filename}",
|
|
733
765
|
"{cursor}",
|
|
734
766
|
"{diagnostics}",
|
|
@@ -820,6 +852,10 @@
|
|
|
820
852
|
{
|
|
821
853
|
"value": "{clock}",
|
|
822
854
|
"name": "Clock"
|
|
855
|
+
},
|
|
856
|
+
{
|
|
857
|
+
"value": "{remote}",
|
|
858
|
+
"name": "Remote Indicator"
|
|
823
859
|
}
|
|
824
860
|
]
|
|
825
861
|
},
|
|
@@ -874,10 +910,9 @@
|
|
|
874
910
|
"default": []
|
|
875
911
|
},
|
|
876
912
|
"width": {
|
|
877
|
-
"description": "
|
|
878
|
-
"
|
|
879
|
-
"
|
|
880
|
-
"default": 0.30000001192092896
|
|
913
|
+
"description": "File explorer width. Either a percent (`\"30%\"`, 0–100) or an\nabsolute column count (`\"24\"`). Legacy numeric forms are still\naccepted on read: a bare integer is treated as percent, and a\nfractional number in `[0, 1]` is treated as a legacy percent\nfraction (e.g. `0.3` → 30%).",
|
|
914
|
+
"$ref": "#/$defs/ExplorerWidth",
|
|
915
|
+
"default": "30%"
|
|
881
916
|
},
|
|
882
917
|
"preview_tabs": {
|
|
883
918
|
"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",
|
|
@@ -886,6 +921,11 @@
|
|
|
886
921
|
}
|
|
887
922
|
}
|
|
888
923
|
},
|
|
924
|
+
"ExplorerWidth": {
|
|
925
|
+
"description": "Either a percent like \"30%\" (0–100) or an absolute column count like \"24\".",
|
|
926
|
+
"type": "string",
|
|
927
|
+
"pattern": "^(100%|[1-9]?[0-9]%|\\d+)$"
|
|
928
|
+
},
|
|
889
929
|
"FileBrowserConfig": {
|
|
890
930
|
"description": "File browser configuration (for Open File dialog)",
|
|
891
931
|
"type": "object",
|
|
@@ -921,9 +961,42 @@
|
|
|
921
961
|
"description": "When viewing terminal scrollback and new output arrives,\nautomatically jump back to terminal mode (default: true)",
|
|
922
962
|
"type": "boolean",
|
|
923
963
|
"default": true
|
|
964
|
+
},
|
|
965
|
+
"shell": {
|
|
966
|
+
"description": "Override the shell used by the integrated terminal.\n\nWhen unset (the default), Fresh launches the shell named by the\n`$SHELL` environment variable (or the platform default if `$SHELL`\nis empty). Set this to run a different program — for example a\nwrapper script that forces an interactive shell — without having\nto change `$SHELL` for the whole process, which other features\nsuch as `format_on_save` also depend on.\n\nOnly affects local authorities; plugin-provided authorities\n(e.g. `docker exec`) keep their own wrapper.",
|
|
967
|
+
"anyOf": [
|
|
968
|
+
{
|
|
969
|
+
"$ref": "#/$defs/TerminalShellConfig"
|
|
970
|
+
},
|
|
971
|
+
{
|
|
972
|
+
"type": "null"
|
|
973
|
+
}
|
|
974
|
+
],
|
|
975
|
+
"default": null
|
|
924
976
|
}
|
|
925
977
|
}
|
|
926
978
|
},
|
|
979
|
+
"TerminalShellConfig": {
|
|
980
|
+
"description": "Explicit shell command + args for the integrated terminal.",
|
|
981
|
+
"type": "object",
|
|
982
|
+
"properties": {
|
|
983
|
+
"command": {
|
|
984
|
+
"description": "Executable to launch (e.g. `/usr/bin/fish`, `bash`, or a wrapper\nscript). Resolved via `$PATH` when not absolute.",
|
|
985
|
+
"type": "string"
|
|
986
|
+
},
|
|
987
|
+
"args": {
|
|
988
|
+
"description": "Arguments passed before any user input.",
|
|
989
|
+
"type": "array",
|
|
990
|
+
"items": {
|
|
991
|
+
"type": "string"
|
|
992
|
+
},
|
|
993
|
+
"default": []
|
|
994
|
+
}
|
|
995
|
+
},
|
|
996
|
+
"required": [
|
|
997
|
+
"command"
|
|
998
|
+
]
|
|
999
|
+
},
|
|
927
1000
|
"Keybinding": {
|
|
928
1001
|
"description": "Keybinding definition",
|
|
929
1002
|
"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");
|