@fresh-editor/fresh-editor 0.1.87 → 0.1.88

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.
@@ -5,7 +5,7 @@
5
5
  "fg": [248, 248, 242],
6
6
  "cursor": [255, 121, 198],
7
7
  "selection_bg": [68, 71, 90],
8
- "current_line_bg": [68, 71, 90],
8
+ "current_line_bg": [50, 52, 66],
9
9
  "line_number_fg": [98, 114, 164],
10
10
  "line_number_bg": [40, 42, 54]
11
11
  },
@@ -15,25 +15,46 @@
15
15
  "tab_inactive_fg": [248, 248, 242],
16
16
  "tab_inactive_bg": [68, 71, 90],
17
17
  "tab_separator_bg": [40, 42, 54],
18
+ "tab_hover_bg": [80, 83, 100],
18
19
  "status_bar_fg": [40, 42, 54],
19
20
  "status_bar_bg": [189, 147, 249],
20
21
  "prompt_fg": [40, 42, 54],
21
22
  "prompt_bg": [80, 250, 123],
22
23
  "prompt_selection_fg": [248, 248, 242],
23
24
  "prompt_selection_bg": [189, 147, 249],
24
- "popup_border_fg": [98, 114, 164],
25
- "popup_bg": [68, 71, 90],
25
+ "popup_border_fg": [189, 147, 249],
26
+ "popup_bg": [40, 42, 54],
26
27
  "popup_selection_bg": [189, 147, 249],
27
28
  "popup_text_fg": [248, 248, 242],
28
- "suggestion_bg": [68, 71, 90],
29
+ "suggestion_bg": [40, 42, 54],
29
30
  "suggestion_selected_bg": [189, 147, 249],
31
+ "menu_bg": [40, 42, 54],
32
+ "menu_fg": [248, 248, 242],
33
+ "menu_active_bg": [68, 71, 90],
34
+ "menu_active_fg": [139, 233, 253],
35
+ "menu_dropdown_bg": [40, 42, 54],
36
+ "menu_dropdown_fg": [248, 248, 242],
37
+ "menu_highlight_bg": [189, 147, 249],
38
+ "menu_highlight_fg": [40, 42, 54],
39
+ "menu_border_fg": [98, 114, 164],
40
+ "menu_separator_fg": [98, 114, 164],
41
+ "menu_hover_bg": [68, 71, 90],
42
+ "menu_hover_fg": [248, 248, 242],
43
+ "menu_disabled_fg": [98, 114, 164],
44
+ "menu_disabled_bg": [40, 42, 54],
30
45
  "help_bg": [40, 42, 54],
31
46
  "help_fg": [248, 248, 242],
32
47
  "help_key_fg": [139, 233, 253],
33
48
  "help_separator_fg": [98, 114, 164],
34
49
  "help_indicator_fg": [255, 85, 85],
35
50
  "help_indicator_bg": [40, 42, 54],
36
- "split_separator_fg": [98, 114, 164]
51
+ "split_separator_fg": [98, 114, 164],
52
+ "scrollbar_track_fg": [68, 71, 90],
53
+ "scrollbar_thumb_fg": [98, 114, 164],
54
+ "scrollbar_track_hover_fg": [80, 83, 100],
55
+ "scrollbar_thumb_hover_fg": [139, 233, 253],
56
+ "settings_selected_bg": [68, 71, 90],
57
+ "settings_selected_fg": [248, 248, 242]
37
58
  },
38
59
  "search": {
39
60
  "match_bg": [241, 250, 140],
@@ -1,147 +0,0 @@
1
- /// <reference path="./lib/fresh.d.ts" />
2
- const editor = getEditor();
3
-
4
-
5
- /**
6
- * C# LSP Helper Plugin
7
- *
8
- * Provides user-friendly error handling for C# LSP server issues.
9
- * When csharp-ls fails to start, this plugin shows an actionable
10
- * popup with installation instructions.
11
- *
12
- * Features:
13
- * - Detects C# LSP server errors (csharp-ls)
14
- * - Shows popup with install commands (dotnet tool)
15
- * - Allows copying install commands to clipboard
16
- * - Provides option to disable C# LSP
17
- */
18
-
19
- interface LspServerErrorData {
20
- language: string;
21
- server_command: string;
22
- error_type: string;
23
- message: string;
24
- }
25
-
26
- interface LspStatusClickedData {
27
- language: string;
28
- has_error: boolean;
29
- }
30
-
31
- interface ActionPopupResultData {
32
- popup_id: string;
33
- action_id: string;
34
- }
35
-
36
- // Install commands for C# LSP server (csharp-ls)
37
- // Requires .NET SDK to be installed
38
- // See: https://github.com/razzmatazz/csharp-language-server
39
- const INSTALL_COMMANDS = {
40
- dotnet: "dotnet tool install --global csharp-ls",
41
- };
42
-
43
- // Track error state for C# LSP
44
- let csharpLspError: { serverCommand: string; message: string } | null = null;
45
-
46
- /**
47
- * Handle LSP server errors for C#
48
- */
49
- globalThis.on_csharp_lsp_server_error = function (
50
- data: LspServerErrorData
51
- ): void {
52
- // Only handle C# language errors
53
- if (data.language !== "csharp") {
54
- return;
55
- }
56
-
57
- editor.debug(
58
- `csharp-lsp: Server error - ${data.error_type}: ${data.message}`
59
- );
60
-
61
- // Store error state for later reference
62
- csharpLspError = {
63
- serverCommand: data.server_command,
64
- message: data.message,
65
- };
66
-
67
- // Show a status message for immediate feedback
68
- if (data.error_type === "not_found") {
69
- editor.setStatus(
70
- `C# LSP server '${data.server_command}' not found. Click status bar for help.`
71
- );
72
- } else {
73
- editor.setStatus(`C# LSP error: ${data.message}`);
74
- }
75
- };
76
-
77
- // Register hook for LSP server errors
78
- editor.on("lsp_server_error", "on_csharp_lsp_server_error");
79
-
80
- /**
81
- * Handle status bar click when there's a C# LSP error
82
- */
83
- globalThis.on_csharp_lsp_status_clicked = function (
84
- data: LspStatusClickedData
85
- ): void {
86
- // Only handle C# language clicks when there's an error
87
- if (data.language !== "csharp" || !csharpLspError) {
88
- return;
89
- }
90
-
91
- editor.debug("csharp-lsp: Status clicked, showing help popup");
92
-
93
- // Show action popup with install options
94
- editor.showActionPopup({
95
- id: "csharp-lsp-help",
96
- title: "C# Language Server Not Found",
97
- message: `"${csharpLspError.serverCommand}" provides code completion, diagnostics, and navigation for C# files. Requires .NET SDK. Copy the command below to install it.`,
98
- actions: [
99
- { id: "copy_dotnet", label: `Copy: ${INSTALL_COMMANDS.dotnet}` },
100
- { id: "disable", label: "Disable C# LSP" },
101
- { id: "dismiss", label: "Dismiss (ESC)" },
102
- ],
103
- });
104
- };
105
-
106
- // Register hook for status bar clicks
107
- editor.on("lsp_status_clicked", "on_csharp_lsp_status_clicked");
108
-
109
- /**
110
- * Handle action popup results for C# LSP help
111
- */
112
- globalThis.on_csharp_lsp_action_result = function (
113
- data: ActionPopupResultData
114
- ): void {
115
- // Only handle our popup
116
- if (data.popup_id !== "csharp-lsp-help") {
117
- return;
118
- }
119
-
120
- editor.debug(`csharp-lsp: Action selected - ${data.action_id}`);
121
-
122
- switch (data.action_id) {
123
- case "copy_dotnet":
124
- editor.setClipboard(INSTALL_COMMANDS.dotnet);
125
- editor.setStatus("Copied: " + INSTALL_COMMANDS.dotnet);
126
- break;
127
-
128
- case "disable":
129
- editor.disableLspForLanguage("csharp");
130
- editor.setStatus("C# LSP disabled");
131
- csharpLspError = null;
132
- break;
133
-
134
- case "dismiss":
135
- case "dismissed":
136
- // Just close the popup without action
137
- break;
138
-
139
- default:
140
- editor.debug(`csharp-lsp: Unknown action: ${data.action_id}`);
141
- }
142
- };
143
-
144
- // Register hook for action popup results
145
- editor.on("action_popup_result", "on_csharp_lsp_action_result");
146
-
147
- editor.debug("csharp-lsp: Plugin loaded");