@fresh-editor/fresh-editor 0.2.11 → 0.2.13

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 (51) hide show
  1. package/CHANGELOG.md +89 -0
  2. package/README.md +10 -0
  3. package/package.json +1 -1
  4. package/plugins/audit_mode.ts +79 -58
  5. package/plugins/check-types.sh +1 -0
  6. package/plugins/clangd-lsp.ts +9 -6
  7. package/plugins/clangd_support.ts +12 -8
  8. package/plugins/code-tour.ts +15 -10
  9. package/plugins/config-schema.json +70 -3
  10. package/plugins/csharp_support.ts +15 -10
  11. package/plugins/css-lsp.ts +9 -6
  12. package/plugins/diagnostics_panel.ts +25 -18
  13. package/plugins/examples/README.md +1 -2
  14. package/plugins/examples/async_demo.ts +28 -28
  15. package/plugins/examples/bookmarks.ts +34 -32
  16. package/plugins/examples/buffer_query_demo.ts +20 -20
  17. package/plugins/examples/hello_world.ts +46 -10
  18. package/plugins/examples/virtual_buffer_demo.ts +16 -12
  19. package/plugins/find_references.ts +7 -5
  20. package/plugins/git_blame.ts +13 -9
  21. package/plugins/git_explorer.ts +9 -6
  22. package/plugins/git_find_file.ts +7 -5
  23. package/plugins/git_grep.ts +3 -2
  24. package/plugins/git_gutter.ts +15 -10
  25. package/plugins/git_log.ts +27 -18
  26. package/plugins/go-lsp.ts +9 -6
  27. package/plugins/html-lsp.ts +9 -6
  28. package/plugins/java-lsp.ts +9 -6
  29. package/plugins/json-lsp.ts +9 -6
  30. package/plugins/latex-lsp.ts +9 -6
  31. package/plugins/lib/finder.ts +1 -0
  32. package/plugins/lib/fresh.d.ts +141 -16
  33. package/plugins/live_grep.ts +3 -2
  34. package/plugins/markdown_compose.ts +33 -23
  35. package/plugins/markdown_source.ts +24 -10
  36. package/plugins/marksman-lsp.ts +9 -6
  37. package/plugins/merge_conflict.ts +33 -22
  38. package/plugins/odin-lsp.ts +9 -6
  39. package/plugins/path_complete.ts +3 -2
  40. package/plugins/pkg.ts +70 -48
  41. package/plugins/python-lsp.ts +9 -6
  42. package/plugins/rust-lsp.ts +102 -6
  43. package/plugins/search_replace.ts +32 -21
  44. package/plugins/templ-lsp.ts +9 -6
  45. package/plugins/test_i18n.ts +3 -2
  46. package/plugins/theme_editor.i18n.json +28 -14
  47. package/plugins/theme_editor.ts +1230 -495
  48. package/plugins/typescript-lsp.ts +9 -6
  49. package/plugins/vi_mode.ts +487 -297
  50. package/plugins/welcome.ts +9 -6
  51. package/plugins/zig-lsp.ts +9 -6
@@ -51,7 +51,7 @@ let tsLspError: { serverCommand: string; message: string; language: string } | n
51
51
  /**
52
52
  * Handle LSP server errors for TypeScript/JavaScript
53
53
  */
54
- globalThis.on_typescript_lsp_server_error = function (
54
+ function on_typescript_lsp_server_error(
55
55
  data: LspServerErrorData
56
56
  ): void {
57
57
  // Only handle TypeScript/JavaScript language errors
@@ -78,7 +78,8 @@ globalThis.on_typescript_lsp_server_error = function (
78
78
  } else {
79
79
  editor.setStatus(`TypeScript LSP error: ${data.message}`);
80
80
  }
81
- };
81
+ }
82
+ registerHandler("on_typescript_lsp_server_error", on_typescript_lsp_server_error);
82
83
 
83
84
  // Register hook for LSP server errors
84
85
  editor.on("lsp_server_error", "on_typescript_lsp_server_error");
@@ -86,7 +87,7 @@ editor.on("lsp_server_error", "on_typescript_lsp_server_error");
86
87
  /**
87
88
  * Handle status bar click when there's a TypeScript LSP error
88
89
  */
89
- globalThis.on_typescript_lsp_status_clicked = function (
90
+ function on_typescript_lsp_status_clicked(
90
91
  data: LspStatusClickedData
91
92
  ): void {
92
93
  // Only handle TypeScript/JavaScript language clicks when there's an error
@@ -109,7 +110,8 @@ globalThis.on_typescript_lsp_status_clicked = function (
109
110
  { id: "dismiss", label: "Dismiss (ESC)" },
110
111
  ],
111
112
  });
112
- };
113
+ }
114
+ registerHandler("on_typescript_lsp_status_clicked", on_typescript_lsp_status_clicked);
113
115
 
114
116
  // Register hook for status bar clicks
115
117
  editor.on("lsp_status_clicked", "on_typescript_lsp_status_clicked");
@@ -117,7 +119,7 @@ editor.on("lsp_status_clicked", "on_typescript_lsp_status_clicked");
117
119
  /**
118
120
  * Handle action popup results for TypeScript LSP help
119
121
  */
120
- globalThis.on_typescript_lsp_action_result = function (
122
+ function on_typescript_lsp_action_result(
121
123
  data: ActionPopupResultData
122
124
  ): void {
123
125
  // Only handle our popup
@@ -159,7 +161,8 @@ globalThis.on_typescript_lsp_action_result = function (
159
161
  default:
160
162
  editor.debug(`typescript-lsp: Unknown action: ${data.action_id}`);
161
163
  }
162
- };
164
+ }
165
+ registerHandler("on_typescript_lsp_action_result", on_typescript_lsp_action_result);
163
166
 
164
167
  // Register hook for action popup results
165
168
  editor.on("action_popup_result", "on_typescript_lsp_action_result");