@fresh-editor/fresh-editor 0.1.67 → 0.1.69

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 (64) hide show
  1. package/CHANGELOG.md +58 -0
  2. package/README.md +2 -0
  3. package/package.json +1 -1
  4. package/plugins/audit_mode.i18n.json +380 -0
  5. package/plugins/audit_mode.ts +836 -68
  6. package/plugins/buffer_modified.i18n.json +32 -0
  7. package/plugins/buffer_modified.ts +5 -3
  8. package/plugins/calculator.i18n.json +44 -0
  9. package/plugins/calculator.ts +6 -4
  10. package/plugins/clangd-lsp.ts +2 -0
  11. package/plugins/clangd_support.i18n.json +104 -0
  12. package/plugins/clangd_support.ts +18 -16
  13. package/plugins/color_highlighter.i18n.json +68 -0
  14. package/plugins/color_highlighter.ts +12 -10
  15. package/plugins/config-schema.json +25 -140
  16. package/plugins/csharp-lsp.ts +2 -0
  17. package/plugins/csharp_support.i18n.json +38 -0
  18. package/plugins/csharp_support.ts +6 -4
  19. package/plugins/css-lsp.ts +2 -0
  20. package/plugins/diagnostics_panel.i18n.json +110 -0
  21. package/plugins/diagnostics_panel.ts +19 -17
  22. package/plugins/find_references.i18n.json +128 -0
  23. package/plugins/find_references.ts +22 -20
  24. package/plugins/git_blame.i18n.json +230 -0
  25. package/plugins/git_blame.ts +39 -37
  26. package/plugins/git_find_file.i18n.json +146 -0
  27. package/plugins/git_find_file.ts +24 -22
  28. package/plugins/git_grep.i18n.json +80 -0
  29. package/plugins/git_grep.ts +15 -13
  30. package/plugins/git_gutter.i18n.json +44 -0
  31. package/plugins/git_gutter.ts +7 -5
  32. package/plugins/git_log.i18n.json +224 -0
  33. package/plugins/git_log.ts +41 -39
  34. package/plugins/go-lsp.ts +2 -0
  35. package/plugins/html-lsp.ts +2 -0
  36. package/plugins/json-lsp.ts +2 -0
  37. package/plugins/lib/fresh.d.ts +53 -13
  38. package/plugins/lib/index.ts +1 -1
  39. package/plugins/lib/navigation-controller.ts +3 -3
  40. package/plugins/lib/panel-manager.ts +15 -13
  41. package/plugins/lib/virtual-buffer-factory.ts +84 -112
  42. package/plugins/live_grep.i18n.json +80 -0
  43. package/plugins/live_grep.ts +15 -13
  44. package/plugins/markdown_compose.i18n.json +104 -0
  45. package/plugins/markdown_compose.ts +17 -15
  46. package/plugins/merge_conflict.i18n.json +380 -0
  47. package/plugins/merge_conflict.ts +72 -73
  48. package/plugins/path_complete.i18n.json +38 -0
  49. package/plugins/path_complete.ts +6 -4
  50. package/plugins/python-lsp.ts +2 -0
  51. package/plugins/rust-lsp.ts +2 -0
  52. package/plugins/search_replace.i18n.json +188 -0
  53. package/plugins/search_replace.ts +31 -29
  54. package/plugins/test_i18n.i18n.json +12 -0
  55. package/plugins/test_i18n.ts +18 -0
  56. package/plugins/theme_editor.i18n.json +1417 -0
  57. package/plugins/theme_editor.ts +73 -69
  58. package/plugins/todo_highlighter.i18n.json +86 -0
  59. package/plugins/todo_highlighter.ts +15 -13
  60. package/plugins/typescript-lsp.ts +2 -0
  61. package/plugins/vi_mode.i18n.json +716 -0
  62. package/plugins/vi_mode.ts +1195 -78
  63. package/plugins/welcome.i18n.json +110 -0
  64. package/plugins/welcome.ts +18 -16
@@ -0,0 +1,110 @@
1
+ {
2
+ "en": {
3
+ "cmd.open_help": "Plugin Demo: Open Help",
4
+ "cmd.open_help_desc": "Open the editor help page (uses built-in action)",
5
+ "cmd.save_file": "Plugin Demo: Save File",
6
+ "cmd.save_file_desc": "Save the current file (uses built-in action)",
7
+ "cmd.say_hello": "Plugin Demo: Say Hello",
8
+ "cmd.say_hello_desc": "Insert a friendly greeting into the buffer",
9
+ "cmd.insert_time": "Plugin Demo: Insert Time",
10
+ "cmd.insert_time_desc": "Insert the current time at cursor position",
11
+ "cmd.insert_comment": "Plugin Demo: Insert Comment",
12
+ "cmd.insert_comment_desc": "Insert a sample comment at cursor position",
13
+ "status.loaded": "Plugins are working! Welcome Plugin loaded successfully!",
14
+ "status.greeting_inserted": "Inserted greeting at cursor position",
15
+ "status.time_inserted": "Inserted time at cursor position",
16
+ "status.comment_inserted": "Comment inserted by plugin",
17
+ "text.greeting": "Hello from TypeScript! The plugin system is working!",
18
+ "text.comment": "// This comment was inserted by a TypeScript plugin!"
19
+ },
20
+ "es": {
21
+ "cmd.open_help": "Demo de Plugin: Abrir Ayuda",
22
+ "cmd.open_help_desc": "Abrir la pagina de ayuda del editor (usa accion incorporada)",
23
+ "cmd.save_file": "Demo de Plugin: Guardar Archivo",
24
+ "cmd.save_file_desc": "Guardar el archivo actual (usa accion incorporada)",
25
+ "cmd.say_hello": "Demo de Plugin: Decir Hola",
26
+ "cmd.say_hello_desc": "Insertar un saludo amigable en el buffer",
27
+ "cmd.insert_time": "Demo de Plugin: Insertar Hora",
28
+ "cmd.insert_time_desc": "Insertar la hora actual en la posicion del cursor",
29
+ "cmd.insert_comment": "Demo de Plugin: Insertar Comentario",
30
+ "cmd.insert_comment_desc": "Insertar un comentario de ejemplo en la posicion del cursor",
31
+ "status.loaded": "Los plugins funcionan! Plugin de Bienvenida cargado exitosamente!",
32
+ "status.greeting_inserted": "Saludo insertado en la posicion del cursor",
33
+ "status.time_inserted": "Hora insertada en la posicion del cursor",
34
+ "status.comment_inserted": "Comentario insertado por el plugin",
35
+ "text.greeting": "Hola desde TypeScript! El sistema de plugins esta funcionando!",
36
+ "text.comment": "// Este comentario fue insertado por un plugin de TypeScript!"
37
+ },
38
+ "de": {
39
+ "cmd.open_help": "Plugin-Demo: Hilfe offnen",
40
+ "cmd.open_help_desc": "Die Editor-Hilfeseite offnen (verwendet eingebaute Aktion)",
41
+ "cmd.save_file": "Plugin-Demo: Datei speichern",
42
+ "cmd.save_file_desc": "Die aktuelle Datei speichern (verwendet eingebaute Aktion)",
43
+ "cmd.say_hello": "Plugin-Demo: Hallo sagen",
44
+ "cmd.say_hello_desc": "Eine freundliche Begruessung in den Buffer einfugen",
45
+ "cmd.insert_time": "Plugin-Demo: Zeit einfugen",
46
+ "cmd.insert_time_desc": "Die aktuelle Zeit an der Cursorposition einfugen",
47
+ "cmd.insert_comment": "Plugin-Demo: Kommentar einfugen",
48
+ "cmd.insert_comment_desc": "Einen Beispielkommentar an der Cursorposition einfugen",
49
+ "status.loaded": "Plugins funktionieren! Welcome Plugin erfolgreich geladen!",
50
+ "status.greeting_inserted": "Begruessung an der Cursorposition eingefugt",
51
+ "status.time_inserted": "Zeit an der Cursorposition eingefugt",
52
+ "status.comment_inserted": "Kommentar durch Plugin eingefugt",
53
+ "text.greeting": "Hallo von TypeScript! Das Plugin-System funktioniert!",
54
+ "text.comment": "// Dieser Kommentar wurde von einem TypeScript-Plugin eingefugt!"
55
+ },
56
+ "fr": {
57
+ "cmd.open_help": "Demo Plugin: Ouvrir l'Aide",
58
+ "cmd.open_help_desc": "Ouvrir la page d'aide de l'editeur (utilise une action integree)",
59
+ "cmd.save_file": "Demo Plugin: Enregistrer le Fichier",
60
+ "cmd.save_file_desc": "Enregistrer le fichier actuel (utilise une action integree)",
61
+ "cmd.say_hello": "Demo Plugin: Dire Bonjour",
62
+ "cmd.say_hello_desc": "Inserer une salutation amicale dans le buffer",
63
+ "cmd.insert_time": "Demo Plugin: Inserer l'Heure",
64
+ "cmd.insert_time_desc": "Inserer l'heure actuelle a la position du curseur",
65
+ "cmd.insert_comment": "Demo Plugin: Inserer un Commentaire",
66
+ "cmd.insert_comment_desc": "Inserer un exemple de commentaire a la position du curseur",
67
+ "status.loaded": "Les plugins fonctionnent! Plugin de Bienvenue charge avec succes!",
68
+ "status.greeting_inserted": "Salutation inseree a la position du curseur",
69
+ "status.time_inserted": "Heure inseree a la position du curseur",
70
+ "status.comment_inserted": "Commentaire insere par le plugin",
71
+ "text.greeting": "Bonjour depuis TypeScript! Le systeme de plugins fonctionne!",
72
+ "text.comment": "// Ce commentaire a ete insere par un plugin TypeScript!"
73
+ },
74
+ "ja": {
75
+ "cmd.open_help": "プラグインデモ: ヘルプを開く",
76
+ "cmd.open_help_desc": "エディタのヘルプページを開く(組み込みアクションを使用)",
77
+ "cmd.save_file": "プラグインデモ: ファイルを保存",
78
+ "cmd.save_file_desc": "現在のファイルを保存する(組み込みアクションを使用)",
79
+ "cmd.say_hello": "プラグインデモ: 挨拶を挿入",
80
+ "cmd.say_hello_desc": "バッファにフレンドリーな挨拶を挿入する",
81
+ "cmd.insert_time": "プラグインデモ: 時刻を挿入",
82
+ "cmd.insert_time_desc": "カーソル位置に現在の時刻を挿入する",
83
+ "cmd.insert_comment": "プラグインデモ: コメントを挿入",
84
+ "cmd.insert_comment_desc": "カーソル位置にサンプルコメントを挿入する",
85
+ "status.loaded": "プラグインが動作しています!ウェルカムプラグインが正常に読み込まれました!",
86
+ "status.greeting_inserted": "カーソル位置に挨拶を挿入しました",
87
+ "status.time_inserted": "カーソル位置に時刻を挿入しました",
88
+ "status.comment_inserted": "プラグインによりコメントが挿入されました",
89
+ "text.greeting": "TypeScriptからこんにちは!プラグインシステムが動作しています!",
90
+ "text.comment": "// このコメントはTypeScriptプラグインによって挿入されました!"
91
+ },
92
+ "zh": {
93
+ "cmd.open_help": "插件演示: 打开帮助",
94
+ "cmd.open_help_desc": "打开编辑器帮助页面(使用内置操作)",
95
+ "cmd.save_file": "插件演示: 保存文件",
96
+ "cmd.save_file_desc": "保存当前文件(使用内置操作)",
97
+ "cmd.say_hello": "插件演示: 问候",
98
+ "cmd.say_hello_desc": "在缓冲区插入友好的问候语",
99
+ "cmd.insert_time": "插件演示: 插入时间",
100
+ "cmd.insert_time_desc": "在光标位置插入当前时间",
101
+ "cmd.insert_comment": "插件演示: 插入注释",
102
+ "cmd.insert_comment_desc": "在光标位置插入示例注释",
103
+ "status.loaded": "插件正在工作!欢迎插件加载成功!",
104
+ "status.greeting_inserted": "已在光标位置插入问候语",
105
+ "status.time_inserted": "已在光标位置插入时间",
106
+ "status.comment_inserted": "插件已插入注释",
107
+ "text.greeting": "来自TypeScript的问候!插件系统正在运行!",
108
+ "text.comment": "// 此注释由TypeScript插件插入!"
109
+ }
110
+ }
@@ -1,4 +1,6 @@
1
1
  /// <reference path="../types/fresh.d.ts" />
2
+ const editor = getEditor();
3
+
2
4
 
3
5
  /**
4
6
  * Welcome Plugin
@@ -6,33 +8,33 @@
6
8
  */
7
9
 
8
10
  // Show welcome message in status bar
9
- editor.setStatus("Plugins are working! Welcome Plugin loaded successfully!");
11
+ editor.setStatus(editor.t("status.loaded"));
10
12
 
11
13
  // Register commands that use built-in actions
12
14
  editor.registerCommand(
13
- "Plugin Demo: Open Help",
14
- "Open the editor help page (uses built-in action)",
15
+ "%cmd.open_help",
16
+ "%cmd.open_help_desc",
15
17
  "show_help",
16
18
  "normal"
17
19
  );
18
20
 
19
21
  editor.registerCommand(
20
- "Plugin Demo: Save File",
21
- "Save the current file (uses built-in action)",
22
+ "%cmd.save_file",
23
+ "%cmd.save_file_desc",
22
24
  "save",
23
25
  "normal"
24
26
  );
25
27
 
26
28
  // Register commands with custom TypeScript callbacks
27
29
  globalThis.plugin_say_hello = function(): void {
28
- editor.insertAtCursor("Hello from TypeScript! The plugin system is working!\n");
29
- editor.setStatus("Inserted greeting at cursor position");
30
+ editor.insertAtCursor(editor.t("text.greeting") + "\n");
31
+ editor.setStatus(editor.t("status.greeting_inserted"));
30
32
  editor.debug("Plugin callback executed: say_hello");
31
33
  };
32
34
 
33
35
  editor.registerCommand(
34
- "Plugin Demo: Say Hello",
35
- "Insert a friendly greeting into the buffer",
36
+ "%cmd.say_hello",
37
+ "%cmd.say_hello_desc",
36
38
  "plugin_say_hello",
37
39
  "normal"
38
40
  );
@@ -40,26 +42,26 @@ editor.registerCommand(
40
42
  globalThis.plugin_insert_time = function(): void {
41
43
  const time = new Date().toLocaleTimeString();
42
44
  editor.insertAtCursor(`Current time: ${time}\n`);
43
- editor.setStatus("Inserted time at cursor position");
45
+ editor.setStatus(editor.t("status.time_inserted"));
44
46
  editor.debug(`Plugin callback executed: insert_time at ${time}`);
45
47
  };
46
48
 
47
49
  editor.registerCommand(
48
- "Plugin Demo: Insert Time",
49
- "Insert the current time at cursor position",
50
+ "%cmd.insert_time",
51
+ "%cmd.insert_time_desc",
50
52
  "plugin_insert_time",
51
53
  "normal"
52
54
  );
53
55
 
54
56
  globalThis.plugin_insert_comment = function(): void {
55
- editor.insertAtCursor("// This comment was inserted by a TypeScript plugin!\n");
56
- editor.setStatus("Comment inserted by plugin");
57
+ editor.insertAtCursor(editor.t("text.comment") + "\n");
58
+ editor.setStatus(editor.t("status.comment_inserted"));
57
59
  editor.debug("Plugin callback executed: insert_comment");
58
60
  };
59
61
 
60
62
  editor.registerCommand(
61
- "Plugin Demo: Insert Comment",
62
- "Insert a sample comment at cursor position",
63
+ "%cmd.insert_comment",
64
+ "%cmd.insert_comment_desc",
63
65
  "plugin_insert_comment",
64
66
  "normal"
65
67
  );