@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/java-lsp.ts
CHANGED
|
@@ -22,7 +22,8 @@ interface ActionPopupResultData {
|
|
|
22
22
|
const INSTALL_URL = "https://github.com/eclipse-jdtls/eclipse.jdt.ls#installation";
|
|
23
23
|
let javaLspError: { serverCommand: string; message: string } | null = null;
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
|
|
26
|
+
editor.on("lsp_server_error", (data) => {
|
|
26
27
|
if (data.language !== "java") return;
|
|
27
28
|
javaLspError = { serverCommand: data.server_command, message: data.message };
|
|
28
29
|
if (data.error_type === "not_found") {
|
|
@@ -30,11 +31,10 @@ function on_java_lsp_server_error(data: LspServerErrorData) : void {
|
|
|
30
31
|
} else {
|
|
31
32
|
editor.setStatus(`Java LSP error: ${data.message}`);
|
|
32
33
|
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
editor.on("lsp_server_error", "on_java_lsp_server_error");
|
|
34
|
+
});
|
|
35
|
+
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
editor.on("lsp_status_clicked", (data) => {
|
|
38
38
|
if (data.language !== "java" || !javaLspError) return;
|
|
39
39
|
editor.showActionPopup({
|
|
40
40
|
id: "java-lsp-help",
|
|
@@ -46,11 +46,10 @@ function on_java_lsp_status_clicked(data: LspStatusClickedData) : void {
|
|
|
46
46
|
{ id: "dismiss", label: "Dismiss (ESC)" },
|
|
47
47
|
],
|
|
48
48
|
});
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
editor.on("lsp_status_clicked", "on_java_lsp_status_clicked");
|
|
49
|
+
});
|
|
50
|
+
|
|
52
51
|
|
|
53
|
-
|
|
52
|
+
editor.on("action_popup_result", (data) => {
|
|
54
53
|
if (data.popup_id !== "java-lsp-help") return;
|
|
55
54
|
switch (data.action_id) {
|
|
56
55
|
case "copy_url":
|
|
@@ -63,6 +62,4 @@ function on_java_lsp_action_result(data: ActionPopupResultData) : void {
|
|
|
63
62
|
javaLspError = null;
|
|
64
63
|
break;
|
|
65
64
|
}
|
|
66
|
-
}
|
|
67
|
-
registerHandler("on_java_lsp_action_result", on_java_lsp_action_result);
|
|
68
|
-
editor.on("action_popup_result", "on_java_lsp_action_result");
|
|
65
|
+
});
|
package/plugins/json-lsp.ts
CHANGED
|
@@ -46,9 +46,10 @@ let jsonLspError: { serverCommand: string; message: string } | null = null;
|
|
|
46
46
|
/**
|
|
47
47
|
* Handle LSP server errors for JSON
|
|
48
48
|
*/
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
// Register hook for LSP server errors
|
|
52
|
+
editor.on("lsp_server_error", (data) => {
|
|
52
53
|
// Only handle JSON language errors
|
|
53
54
|
if (data.language !== "json") {
|
|
54
55
|
return;
|
|
@@ -70,18 +71,15 @@ function on_json_lsp_server_error(
|
|
|
70
71
|
} else {
|
|
71
72
|
editor.setStatus(`JSON LSP error: ${data.message}`);
|
|
72
73
|
}
|
|
73
|
-
}
|
|
74
|
-
registerHandler("on_json_lsp_server_error", on_json_lsp_server_error);
|
|
75
|
-
|
|
76
|
-
// Register hook for LSP server errors
|
|
77
|
-
editor.on("lsp_server_error", "on_json_lsp_server_error");
|
|
74
|
+
});
|
|
78
75
|
|
|
79
76
|
/**
|
|
80
77
|
* Handle status bar click when there's a JSON LSP error
|
|
81
78
|
*/
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
// Register hook for status bar clicks
|
|
82
|
+
editor.on("lsp_status_clicked", (data) => {
|
|
85
83
|
// Only handle JSON language clicks when there's an error
|
|
86
84
|
if (data.language !== "json" || !jsonLspError) {
|
|
87
85
|
return;
|
|
@@ -100,18 +98,15 @@ function on_json_lsp_status_clicked(
|
|
|
100
98
|
{ id: "dismiss", label: "Dismiss (ESC)" },
|
|
101
99
|
],
|
|
102
100
|
});
|
|
103
|
-
}
|
|
104
|
-
registerHandler("on_json_lsp_status_clicked", on_json_lsp_status_clicked);
|
|
105
|
-
|
|
106
|
-
// Register hook for status bar clicks
|
|
107
|
-
editor.on("lsp_status_clicked", "on_json_lsp_status_clicked");
|
|
101
|
+
});
|
|
108
102
|
|
|
109
103
|
/**
|
|
110
104
|
* Handle action popup results for JSON LSP help
|
|
111
105
|
*/
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
// Register hook for action popup results
|
|
109
|
+
editor.on("action_popup_result", (data) => {
|
|
115
110
|
// Only handle our popup
|
|
116
111
|
if (data.popup_id !== "json-lsp-help") {
|
|
117
112
|
return;
|
|
@@ -139,10 +134,6 @@ function on_json_lsp_action_result(
|
|
|
139
134
|
default:
|
|
140
135
|
editor.debug(`json-lsp: Unknown action: ${data.action_id}`);
|
|
141
136
|
}
|
|
142
|
-
}
|
|
143
|
-
registerHandler("on_json_lsp_action_result", on_json_lsp_action_result);
|
|
144
|
-
|
|
145
|
-
// Register hook for action popup results
|
|
146
|
-
editor.on("action_popup_result", "on_json_lsp_action_result");
|
|
137
|
+
});
|
|
147
138
|
|
|
148
139
|
editor.debug("json-lsp: Plugin loaded");
|
package/plugins/julia-lsp.ts
CHANGED
|
@@ -34,7 +34,8 @@ const INSTALL_COMMANDS = {
|
|
|
34
34
|
|
|
35
35
|
let juliaLspError: { serverCommand: string; message: string } | null = null;
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
|
|
38
|
+
editor.on("lsp_server_error", (data) => {
|
|
38
39
|
if (data.language !== "julia") {
|
|
39
40
|
return;
|
|
40
41
|
}
|
|
@@ -53,11 +54,10 @@ function on_julia_lsp_server_error(data: LspServerErrorData): void {
|
|
|
53
54
|
} else {
|
|
54
55
|
editor.setStatus(`Julia LSP error: ${data.message}`);
|
|
55
56
|
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
editor.on("lsp_server_error", "on_julia_lsp_server_error");
|
|
57
|
+
});
|
|
58
|
+
|
|
59
59
|
|
|
60
|
-
|
|
60
|
+
editor.on("lsp_status_clicked", (data) => {
|
|
61
61
|
if (data.language !== "julia" || !juliaLspError) {
|
|
62
62
|
return;
|
|
63
63
|
}
|
|
@@ -74,11 +74,10 @@ function on_julia_lsp_status_clicked(data: LspStatusClickedData): void {
|
|
|
74
74
|
{ id: "dismiss", label: "Dismiss (ESC)" },
|
|
75
75
|
],
|
|
76
76
|
});
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
editor.on("lsp_status_clicked", "on_julia_lsp_status_clicked");
|
|
77
|
+
});
|
|
78
|
+
|
|
80
79
|
|
|
81
|
-
|
|
80
|
+
editor.on("action_popup_result", (data) => {
|
|
82
81
|
if (data.popup_id !== "julia-lsp-help") {
|
|
83
82
|
return;
|
|
84
83
|
}
|
|
@@ -104,8 +103,6 @@ function on_julia_lsp_action_result(data: ActionPopupResultData): void {
|
|
|
104
103
|
default:
|
|
105
104
|
editor.debug(`julia-lsp: Unknown action: ${data.action_id}`);
|
|
106
105
|
}
|
|
107
|
-
}
|
|
108
|
-
registerHandler("on_julia_lsp_action_result", on_julia_lsp_action_result);
|
|
109
|
-
editor.on("action_popup_result", "on_julia_lsp_action_result");
|
|
106
|
+
});
|
|
110
107
|
|
|
111
108
|
editor.debug("julia-lsp: Plugin loaded");
|
package/plugins/kotlin-lsp.ts
CHANGED
|
@@ -50,7 +50,10 @@ let kotlinLspError: { serverCommand: string; message: string } | null = null;
|
|
|
50
50
|
/**
|
|
51
51
|
* Handle LSP server errors for Kotlin
|
|
52
52
|
*/
|
|
53
|
-
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
// Register hook for LSP server errors
|
|
56
|
+
editor.on("lsp_server_error", (data) => {
|
|
54
57
|
// Only handle Kotlin language errors
|
|
55
58
|
if (data.language !== "kotlin") {
|
|
56
59
|
return;
|
|
@@ -72,18 +75,15 @@ function on_kotlin_lsp_server_error(data: LspServerErrorData): void {
|
|
|
72
75
|
} else {
|
|
73
76
|
editor.setStatus(`Kotlin LSP error: ${data.message}`);
|
|
74
77
|
}
|
|
75
|
-
}
|
|
76
|
-
registerHandler("on_kotlin_lsp_server_error", on_kotlin_lsp_server_error);
|
|
77
|
-
|
|
78
|
-
// Register hook for LSP server errors
|
|
79
|
-
editor.on("lsp_server_error", "on_kotlin_lsp_server_error");
|
|
78
|
+
});
|
|
80
79
|
|
|
81
80
|
/**
|
|
82
81
|
* Handle status bar click when there's a Kotlin LSP error
|
|
83
82
|
*/
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
// Register hook for status bar clicks
|
|
86
|
+
editor.on("lsp_status_clicked", (data) => {
|
|
87
87
|
// Only handle Kotlin language clicks when there's an error
|
|
88
88
|
if (data.language !== "kotlin" || !kotlinLspError) {
|
|
89
89
|
return;
|
|
@@ -104,18 +104,15 @@ function on_kotlin_lsp_status_clicked(
|
|
|
104
104
|
{ id: "dismiss", label: "Dismiss (ESC)" },
|
|
105
105
|
],
|
|
106
106
|
});
|
|
107
|
-
}
|
|
108
|
-
registerHandler("on_kotlin_lsp_status_clicked", on_kotlin_lsp_status_clicked);
|
|
109
|
-
|
|
110
|
-
// Register hook for status bar clicks
|
|
111
|
-
editor.on("lsp_status_clicked", "on_kotlin_lsp_status_clicked");
|
|
107
|
+
});
|
|
112
108
|
|
|
113
109
|
/**
|
|
114
110
|
* Handle action popup results for Kotlin LSP help
|
|
115
111
|
*/
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
// Register hook for action popup results
|
|
115
|
+
editor.on("action_popup_result", (data) => {
|
|
119
116
|
// Only handle our popup
|
|
120
117
|
if (data.popup_id !== "kotlin-lsp-help") {
|
|
121
118
|
return;
|
|
@@ -153,10 +150,6 @@ function on_kotlin_lsp_action_result(
|
|
|
153
150
|
default:
|
|
154
151
|
editor.debug(`kotlin-lsp: Unknown action: ${data.action_id}`);
|
|
155
152
|
}
|
|
156
|
-
}
|
|
157
|
-
registerHandler("on_kotlin_lsp_action_result", on_kotlin_lsp_action_result);
|
|
158
|
-
|
|
159
|
-
// Register hook for action popup results
|
|
160
|
-
editor.on("action_popup_result", "on_kotlin_lsp_action_result");
|
|
153
|
+
});
|
|
161
154
|
|
|
162
155
|
editor.debug("kotlin-lsp: Plugin loaded");
|
package/plugins/latex-lsp.ts
CHANGED
|
@@ -22,7 +22,8 @@ interface ActionPopupResultData {
|
|
|
22
22
|
const INSTALL_URL = "https://github.com/latex-lsp/texlab#installation";
|
|
23
23
|
let latexLspError: { serverCommand: string; message: string } | null = null;
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
|
|
26
|
+
editor.on("lsp_server_error", (data) => {
|
|
26
27
|
if (data.language !== "latex") return;
|
|
27
28
|
latexLspError = { serverCommand: data.server_command, message: data.message };
|
|
28
29
|
if (data.error_type === "not_found") {
|
|
@@ -30,11 +31,10 @@ function on_latex_lsp_server_error(data: LspServerErrorData) : void {
|
|
|
30
31
|
} else {
|
|
31
32
|
editor.setStatus(`LaTeX LSP error: ${data.message}`);
|
|
32
33
|
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
editor.on("lsp_server_error", "on_latex_lsp_server_error");
|
|
34
|
+
});
|
|
35
|
+
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
editor.on("lsp_status_clicked", (data) => {
|
|
38
38
|
if (data.language !== "latex" || !latexLspError) return;
|
|
39
39
|
editor.showActionPopup({
|
|
40
40
|
id: "latex-lsp-help",
|
|
@@ -46,11 +46,10 @@ function on_latex_lsp_status_clicked(data: LspStatusClickedData) : void {
|
|
|
46
46
|
{ id: "dismiss", label: "Dismiss (ESC)" },
|
|
47
47
|
],
|
|
48
48
|
});
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
editor.on("lsp_status_clicked", "on_latex_lsp_status_clicked");
|
|
49
|
+
});
|
|
50
|
+
|
|
52
51
|
|
|
53
|
-
|
|
52
|
+
editor.on("action_popup_result", (data) => {
|
|
54
53
|
if (data.popup_id !== "latex-lsp-help") return;
|
|
55
54
|
switch (data.action_id) {
|
|
56
55
|
case "copy_url":
|
|
@@ -63,6 +62,4 @@ function on_latex_lsp_action_result(data: ActionPopupResultData) : void {
|
|
|
63
62
|
latexLspError = null;
|
|
64
63
|
break;
|
|
65
64
|
}
|
|
66
|
-
}
|
|
67
|
-
registerHandler("on_latex_lsp_action_result", on_latex_lsp_action_result);
|
|
68
|
-
editor.on("action_popup_result", "on_latex_lsp_action_result");
|
|
65
|
+
});
|