@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.
Files changed (82) hide show
  1. package/CHANGELOG.md +216 -0
  2. package/README.md +6 -0
  3. package/package.json +1 -1
  4. package/plugins/astro-lsp.ts +6 -12
  5. package/plugins/audit_mode.i18n.json +14 -14
  6. package/plugins/audit_mode.ts +182 -146
  7. package/plugins/bash-lsp.ts +15 -22
  8. package/plugins/clangd-lsp.ts +15 -24
  9. package/plugins/clojure-lsp.ts +9 -12
  10. package/plugins/cmake-lsp.ts +9 -12
  11. package/plugins/code-tour.ts +15 -16
  12. package/plugins/config-schema.json +79 -6
  13. package/plugins/csharp_support.ts +25 -30
  14. package/plugins/css-lsp.ts +15 -22
  15. package/plugins/dart-lsp.ts +9 -12
  16. package/plugins/dashboard.ts +1903 -0
  17. package/plugins/devcontainer.i18n.json +1472 -0
  18. package/plugins/devcontainer.ts +2793 -0
  19. package/plugins/diagnostics_panel.ts +10 -17
  20. package/plugins/elixir-lsp.ts +9 -12
  21. package/plugins/erlang-lsp.ts +9 -12
  22. package/plugins/examples/bookmarks.ts +10 -16
  23. package/plugins/find_references.ts +5 -9
  24. package/plugins/flash.ts +577 -0
  25. package/plugins/fsharp-lsp.ts +9 -12
  26. package/plugins/git_explorer.ts +16 -20
  27. package/plugins/git_gutter.ts +65 -79
  28. package/plugins/git_log.i18n.json +14 -42
  29. package/plugins/git_log.ts +19 -9
  30. package/plugins/gleam-lsp.ts +9 -12
  31. package/plugins/go-lsp.ts +15 -22
  32. package/plugins/graphql-lsp.ts +9 -12
  33. package/plugins/haskell-lsp.ts +9 -12
  34. package/plugins/html-lsp.ts +15 -24
  35. package/plugins/java-lsp.ts +9 -12
  36. package/plugins/json-lsp.ts +15 -24
  37. package/plugins/julia-lsp.ts +9 -12
  38. package/plugins/kotlin-lsp.ts +15 -22
  39. package/plugins/latex-lsp.ts +9 -12
  40. package/plugins/lib/fresh.d.ts +603 -0
  41. package/plugins/lua-lsp.ts +15 -22
  42. package/plugins/markdown_compose.ts +132 -128
  43. package/plugins/markdown_source.ts +8 -10
  44. package/plugins/marksman-lsp.ts +9 -12
  45. package/plugins/merge_conflict.ts +15 -17
  46. package/plugins/nim-lsp.ts +9 -12
  47. package/plugins/nix-lsp.ts +9 -12
  48. package/plugins/nushell-lsp.ts +9 -12
  49. package/plugins/ocaml-lsp.ts +9 -12
  50. package/plugins/odin-lsp.ts +15 -22
  51. package/plugins/path_complete.ts +5 -6
  52. package/plugins/perl-lsp.ts +9 -12
  53. package/plugins/php-lsp.ts +15 -22
  54. package/plugins/pkg.ts +10 -21
  55. package/plugins/protobuf-lsp.ts +9 -12
  56. package/plugins/python-lsp.ts +15 -24
  57. package/plugins/r-lsp.ts +9 -12
  58. package/plugins/ruby-lsp.ts +15 -22
  59. package/plugins/rust-lsp.ts +18 -28
  60. package/plugins/scala-lsp.ts +9 -12
  61. package/plugins/schemas/theme.schema.json +126 -0
  62. package/plugins/search_replace.ts +10 -13
  63. package/plugins/solidity-lsp.ts +9 -12
  64. package/plugins/sql-lsp.ts +9 -12
  65. package/plugins/svelte-lsp.ts +9 -12
  66. package/plugins/swift-lsp.ts +9 -12
  67. package/plugins/tailwindcss-lsp.ts +9 -12
  68. package/plugins/templ-lsp.ts +9 -12
  69. package/plugins/terraform-lsp.ts +9 -12
  70. package/plugins/theme_editor.i18n.json +98 -14
  71. package/plugins/theme_editor.ts +156 -209
  72. package/plugins/toml-lsp.ts +15 -22
  73. package/plugins/tsconfig.json +100 -0
  74. package/plugins/typescript-lsp.ts +15 -24
  75. package/plugins/typst-lsp.ts +15 -22
  76. package/plugins/vi_mode.ts +77 -290
  77. package/plugins/vue-lsp.ts +9 -12
  78. package/plugins/yaml-lsp.ts +15 -22
  79. package/plugins/zig-lsp.ts +9 -12
  80. package/themes/high-contrast.json +2 -2
  81. package/themes/nord.json +4 -0
  82. package/themes/solarized-dark.json +4 -0
@@ -51,7 +51,10 @@ let yamlLspError: { serverCommand: string; message: string } | null = null;
51
51
  /**
52
52
  * Handle LSP server errors for YAML
53
53
  */
54
- function on_yaml_lsp_server_error(data: LspServerErrorData): void {
54
+
55
+
56
+ // Register hook for LSP server errors
57
+ editor.on("lsp_server_error", (data) => {
55
58
  // Only handle YAML language errors
56
59
  if (data.language !== "yaml") {
57
60
  return;
@@ -73,18 +76,15 @@ function on_yaml_lsp_server_error(data: LspServerErrorData): void {
73
76
  } else {
74
77
  editor.setStatus(`YAML LSP error: ${data.message}`);
75
78
  }
76
- }
77
- registerHandler("on_yaml_lsp_server_error", on_yaml_lsp_server_error);
78
-
79
- // Register hook for LSP server errors
80
- editor.on("lsp_server_error", "on_yaml_lsp_server_error");
79
+ });
81
80
 
82
81
  /**
83
82
  * Handle status bar click when there's a YAML LSP error
84
83
  */
85
- function on_yaml_lsp_status_clicked(
86
- data: LspStatusClickedData
87
- ): void {
84
+
85
+
86
+ // Register hook for status bar clicks
87
+ editor.on("lsp_status_clicked", (data) => {
88
88
  // Only handle YAML language clicks when there's an error
89
89
  if (data.language !== "yaml" || !yamlLspError) {
90
90
  return;
@@ -105,18 +105,15 @@ function on_yaml_lsp_status_clicked(
105
105
  { id: "dismiss", label: "Dismiss (ESC)" },
106
106
  ],
107
107
  });
108
- }
109
- registerHandler("on_yaml_lsp_status_clicked", on_yaml_lsp_status_clicked);
110
-
111
- // Register hook for status bar clicks
112
- editor.on("lsp_status_clicked", "on_yaml_lsp_status_clicked");
108
+ });
113
109
 
114
110
  /**
115
111
  * Handle action popup results for YAML LSP help
116
112
  */
117
- function on_yaml_lsp_action_result(
118
- data: ActionPopupResultData
119
- ): void {
113
+
114
+
115
+ // Register hook for action popup results
116
+ editor.on("action_popup_result", (data) => {
120
117
  // Only handle our popup
121
118
  if (data.popup_id !== "yaml-lsp-help") {
122
119
  return;
@@ -154,10 +151,6 @@ function on_yaml_lsp_action_result(
154
151
  default:
155
152
  editor.debug(`yaml-lsp: Unknown action: ${data.action_id}`);
156
153
  }
157
- }
158
- registerHandler("on_yaml_lsp_action_result", on_yaml_lsp_action_result);
159
-
160
- // Register hook for action popup results
161
- editor.on("action_popup_result", "on_yaml_lsp_action_result");
154
+ });
162
155
 
163
156
  editor.debug("yaml-lsp: Plugin loaded");
@@ -22,7 +22,8 @@ interface ActionPopupResultData {
22
22
  const INSTALL_URL = "https://github.com/zigtools/zls#installation";
23
23
  let zigLspError: { serverCommand: string; message: string } | null = null;
24
24
 
25
- function on_zig_lsp_server_error(data: LspServerErrorData) : void {
25
+
26
+ editor.on("lsp_server_error", (data) => {
26
27
  if (data.language !== "zig") return;
27
28
  zigLspError = { serverCommand: data.server_command, message: data.message };
28
29
  if (data.error_type === "not_found") {
@@ -30,11 +31,10 @@ function on_zig_lsp_server_error(data: LspServerErrorData) : void {
30
31
  } else {
31
32
  editor.setStatus(`Zig LSP error: ${data.message}`);
32
33
  }
33
- }
34
- registerHandler("on_zig_lsp_server_error", on_zig_lsp_server_error);
35
- editor.on("lsp_server_error", "on_zig_lsp_server_error");
34
+ });
35
+
36
36
 
37
- function on_zig_lsp_status_clicked(data: LspStatusClickedData) : void {
37
+ editor.on("lsp_status_clicked", (data) => {
38
38
  if (data.language !== "zig" || !zigLspError) return;
39
39
  editor.showActionPopup({
40
40
  id: "zig-lsp-help",
@@ -46,11 +46,10 @@ function on_zig_lsp_status_clicked(data: LspStatusClickedData) : void {
46
46
  { id: "dismiss", label: "Dismiss (ESC)" },
47
47
  ],
48
48
  });
49
- }
50
- registerHandler("on_zig_lsp_status_clicked", on_zig_lsp_status_clicked);
51
- editor.on("lsp_status_clicked", "on_zig_lsp_status_clicked");
49
+ });
50
+
52
51
 
53
- function on_zig_lsp_action_result(data: ActionPopupResultData) : void {
52
+ editor.on("action_popup_result", (data) => {
54
53
  if (data.popup_id !== "zig-lsp-help") return;
55
54
  switch (data.action_id) {
56
55
  case "copy_url":
@@ -63,6 +62,4 @@ function on_zig_lsp_action_result(data: ActionPopupResultData) : void {
63
62
  zigLspError = null;
64
63
  break;
65
64
  }
66
- }
67
- registerHandler("on_zig_lsp_action_result", on_zig_lsp_action_result);
68
- editor.on("action_popup_result", "on_zig_lsp_action_result");
65
+ });
@@ -59,9 +59,9 @@
59
59
  "inline_code_bg": [40, 40, 40],
60
60
  "split_separator_fg": [140, 140, 140],
61
61
  "split_separator_hover_fg": [255, 255, 0],
62
- "scrollbar_track_fg": [255, 255, 255],
62
+ "scrollbar_track_fg": [80, 80, 80],
63
63
  "scrollbar_thumb_fg": [255, 255, 0],
64
- "scrollbar_track_hover_fg": [255, 255, 0],
64
+ "scrollbar_track_hover_fg": [140, 140, 140],
65
65
  "scrollbar_thumb_hover_fg": [0, 255, 255],
66
66
  "compose_margin_bg": [10, 10, 10],
67
67
  "semantic_highlight_bg": [0, 25, 55],
package/themes/nord.json CHANGED
@@ -36,6 +36,10 @@
36
36
  "help_indicator_fg": [191, 97, 106],
37
37
  "help_indicator_bg": [46, 52, 64],
38
38
  "split_separator_fg": [107, 118, 140],
39
+ "scrollbar_track_fg": [59, 66, 82],
40
+ "scrollbar_thumb_fg": [94, 129, 172],
41
+ "scrollbar_track_hover_fg": [67, 76, 94],
42
+ "scrollbar_thumb_hover_fg": [136, 192, 208],
39
43
  "settings_selected_bg": [94, 129, 172],
40
44
  "settings_selected_fg": [236, 239, 244]
41
45
  },
@@ -36,6 +36,10 @@
36
36
  "help_indicator_fg": [220, 50, 47],
37
37
  "help_indicator_bg": [0, 43, 54],
38
38
  "split_separator_fg": [101, 123, 131],
39
+ "scrollbar_track_fg": [7, 54, 66],
40
+ "scrollbar_thumb_fg": [88, 110, 117],
41
+ "scrollbar_track_hover_fg": [88, 110, 117],
42
+ "scrollbar_thumb_hover_fg": [131, 148, 150],
39
43
  "settings_selected_bg": [38, 139, 210],
40
44
  "settings_selected_fg": [253, 246, 227]
41
45
  },