@fresh-editor/fresh-editor 0.1.58 → 0.1.63

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.
@@ -97,668 +97,7 @@
97
97
  },
98
98
  "menu": {
99
99
  "description": "Menu bar configuration",
100
- "$ref": "#/$defs/MenuConfig",
101
- "default": {
102
- "menus": [
103
- {
104
- "label": "File",
105
- "items": [
106
- {
107
- "label": "New File",
108
- "action": "new",
109
- "args": {},
110
- "when": null,
111
- "checkbox": null
112
- },
113
- {
114
- "label": "Open File...",
115
- "action": "open",
116
- "args": {},
117
- "when": null,
118
- "checkbox": null
119
- },
120
- {
121
- "separator": true
122
- },
123
- {
124
- "label": "Save",
125
- "action": "save",
126
- "args": {},
127
- "when": null,
128
- "checkbox": null
129
- },
130
- {
131
- "label": "Save As...",
132
- "action": "save_as",
133
- "args": {},
134
- "when": null,
135
- "checkbox": null
136
- },
137
- {
138
- "label": "Revert",
139
- "action": "revert",
140
- "args": {},
141
- "when": null,
142
- "checkbox": null
143
- },
144
- {
145
- "separator": true
146
- },
147
- {
148
- "label": "Close Buffer",
149
- "action": "close",
150
- "args": {},
151
- "when": null,
152
- "checkbox": null
153
- },
154
- {
155
- "separator": true
156
- },
157
- {
158
- "label": "Switch Project...",
159
- "action": "switch_project",
160
- "args": {},
161
- "when": null,
162
- "checkbox": null
163
- },
164
- {
165
- "label": "Quit",
166
- "action": "quit",
167
- "args": {},
168
- "when": null,
169
- "checkbox": null
170
- }
171
- ]
172
- },
173
- {
174
- "label": "Edit",
175
- "items": [
176
- {
177
- "label": "Undo",
178
- "action": "undo",
179
- "args": {},
180
- "when": null,
181
- "checkbox": null
182
- },
183
- {
184
- "label": "Redo",
185
- "action": "redo",
186
- "args": {},
187
- "when": null,
188
- "checkbox": null
189
- },
190
- {
191
- "separator": true
192
- },
193
- {
194
- "label": "Cut",
195
- "action": "cut",
196
- "args": {},
197
- "when": null,
198
- "checkbox": null
199
- },
200
- {
201
- "label": "Copy",
202
- "action": "copy",
203
- "args": {},
204
- "when": null,
205
- "checkbox": null
206
- },
207
- {
208
- "label": "Paste",
209
- "action": "paste",
210
- "args": {},
211
- "when": null,
212
- "checkbox": null
213
- },
214
- {
215
- "separator": true
216
- },
217
- {
218
- "label": "Select All",
219
- "action": "select_all",
220
- "args": {},
221
- "when": null,
222
- "checkbox": null
223
- },
224
- {
225
- "separator": true
226
- },
227
- {
228
- "label": "Find...",
229
- "action": "search",
230
- "args": {},
231
- "when": null,
232
- "checkbox": null
233
- },
234
- {
235
- "label": "Find in Selection",
236
- "action": "find_in_selection",
237
- "args": {},
238
- "when": "has_selection",
239
- "checkbox": null
240
- },
241
- {
242
- "label": "Find Next",
243
- "action": "find_next",
244
- "args": {},
245
- "when": null,
246
- "checkbox": null
247
- },
248
- {
249
- "label": "Find Previous",
250
- "action": "find_previous",
251
- "args": {},
252
- "when": null,
253
- "checkbox": null
254
- },
255
- {
256
- "label": "Replace...",
257
- "action": "query_replace",
258
- "args": {},
259
- "when": null,
260
- "checkbox": null
261
- },
262
- {
263
- "separator": true
264
- },
265
- {
266
- "label": "Delete Line",
267
- "action": "delete_line",
268
- "args": {},
269
- "when": null,
270
- "checkbox": null
271
- }
272
- ]
273
- },
274
- {
275
- "label": "View",
276
- "items": [
277
- {
278
- "label": "File Explorer",
279
- "action": "toggle_file_explorer",
280
- "args": {},
281
- "when": null,
282
- "checkbox": "file_explorer"
283
- },
284
- {
285
- "separator": true
286
- },
287
- {
288
- "label": "Line Numbers",
289
- "action": "toggle_line_numbers",
290
- "args": {},
291
- "when": null,
292
- "checkbox": "line_numbers"
293
- },
294
- {
295
- "label": "Line Wrap",
296
- "action": "toggle_line_wrap",
297
- "args": {},
298
- "when": null,
299
- "checkbox": "line_wrap"
300
- },
301
- {
302
- "label": "Mouse Support",
303
- "action": "toggle_mouse_capture",
304
- "args": {},
305
- "when": null,
306
- "checkbox": "mouse_capture"
307
- },
308
- {
309
- "separator": true
310
- },
311
- {
312
- "label": "Set Background...",
313
- "action": "set_background",
314
- "args": {},
315
- "when": null,
316
- "checkbox": null
317
- },
318
- {
319
- "label": "Set Background Blend...",
320
- "action": "set_background_blend",
321
- "args": {},
322
- "when": null,
323
- "checkbox": null
324
- },
325
- {
326
- "label": "Set Compose Width...",
327
- "action": "set_compose_width",
328
- "args": {},
329
- "when": null,
330
- "checkbox": null
331
- },
332
- {
333
- "separator": true
334
- },
335
- {
336
- "label": "Select Theme...",
337
- "action": "select_theme",
338
- "args": {},
339
- "when": null,
340
- "checkbox": null
341
- },
342
- {
343
- "label": "Settings...",
344
- "action": "open_settings",
345
- "args": {},
346
- "when": null,
347
- "checkbox": null
348
- },
349
- {
350
- "separator": true
351
- },
352
- {
353
- "label": "Split Horizontal",
354
- "action": "split_horizontal",
355
- "args": {},
356
- "when": null,
357
- "checkbox": null
358
- },
359
- {
360
- "label": "Split Vertical",
361
- "action": "split_vertical",
362
- "args": {},
363
- "when": null,
364
- "checkbox": null
365
- },
366
- {
367
- "label": "Close Split",
368
- "action": "close_split",
369
- "args": {},
370
- "when": null,
371
- "checkbox": null
372
- },
373
- {
374
- "label": "Focus Next Split",
375
- "action": "next_split",
376
- "args": {},
377
- "when": null,
378
- "checkbox": null
379
- },
380
- {
381
- "label": "Focus Previous Split",
382
- "action": "prev_split",
383
- "args": {},
384
- "when": null,
385
- "checkbox": null
386
- },
387
- {
388
- "label": "Toggle Maximize Split",
389
- "action": "toggle_maximize_split",
390
- "args": {},
391
- "when": null,
392
- "checkbox": null
393
- },
394
- {
395
- "separator": true
396
- },
397
- {
398
- "label": "Terminal",
399
- "items": [
400
- {
401
- "label": "Open Terminal",
402
- "action": "open_terminal",
403
- "args": {},
404
- "when": null,
405
- "checkbox": null
406
- },
407
- {
408
- "label": "Close Terminal",
409
- "action": "close_terminal",
410
- "args": {},
411
- "when": null,
412
- "checkbox": null
413
- },
414
- {
415
- "separator": true
416
- },
417
- {
418
- "label": "Toggle Keyboard Capture",
419
- "action": "toggle_keyboard_capture",
420
- "args": {},
421
- "when": null,
422
- "checkbox": null
423
- }
424
- ]
425
- },
426
- {
427
- "separator": true
428
- },
429
- {
430
- "label": "Keybinding Style",
431
- "items": [
432
- {
433
- "label": "Default",
434
- "action": "switch_keybinding_map",
435
- "args": {
436
- "map": "default"
437
- },
438
- "when": null,
439
- "checkbox": null
440
- },
441
- {
442
- "label": "Emacs",
443
- "action": "switch_keybinding_map",
444
- "args": {
445
- "map": "emacs"
446
- },
447
- "when": null,
448
- "checkbox": null
449
- },
450
- {
451
- "label": "VSCode",
452
- "action": "switch_keybinding_map",
453
- "args": {
454
- "map": "vscode"
455
- },
456
- "when": null,
457
- "checkbox": null
458
- }
459
- ]
460
- }
461
- ]
462
- },
463
- {
464
- "label": "Selection",
465
- "items": [
466
- {
467
- "label": "Select All",
468
- "action": "select_all",
469
- "args": {},
470
- "when": null,
471
- "checkbox": null
472
- },
473
- {
474
- "label": "Select Word",
475
- "action": "select_word",
476
- "args": {},
477
- "when": null,
478
- "checkbox": null
479
- },
480
- {
481
- "label": "Select Line",
482
- "action": "select_line",
483
- "args": {},
484
- "when": null,
485
- "checkbox": null
486
- },
487
- {
488
- "label": "Expand Selection",
489
- "action": "expand_selection",
490
- "args": {},
491
- "when": null,
492
- "checkbox": null
493
- },
494
- {
495
- "separator": true
496
- },
497
- {
498
- "label": "Add Cursor Above",
499
- "action": "add_cursor_above",
500
- "args": {},
501
- "when": null,
502
- "checkbox": null
503
- },
504
- {
505
- "label": "Add Cursor Below",
506
- "action": "add_cursor_below",
507
- "args": {},
508
- "when": null,
509
- "checkbox": null
510
- },
511
- {
512
- "label": "Add Cursor at Next Match",
513
- "action": "add_cursor_next_match",
514
- "args": {},
515
- "when": null,
516
- "checkbox": null
517
- },
518
- {
519
- "label": "Remove Secondary Cursors",
520
- "action": "remove_secondary_cursors",
521
- "args": {},
522
- "when": null,
523
- "checkbox": null
524
- }
525
- ]
526
- },
527
- {
528
- "label": "Go",
529
- "items": [
530
- {
531
- "label": "Go to Line...",
532
- "action": "goto_line",
533
- "args": {},
534
- "when": null,
535
- "checkbox": null
536
- },
537
- {
538
- "label": "Go to Definition",
539
- "action": "lsp_goto_definition",
540
- "args": {},
541
- "when": null,
542
- "checkbox": null
543
- },
544
- {
545
- "label": "Find References",
546
- "action": "lsp_references",
547
- "args": {},
548
- "when": null,
549
- "checkbox": null
550
- },
551
- {
552
- "separator": true
553
- },
554
- {
555
- "label": "Next Buffer",
556
- "action": "next_buffer",
557
- "args": {},
558
- "when": null,
559
- "checkbox": null
560
- },
561
- {
562
- "label": "Previous Buffer",
563
- "action": "prev_buffer",
564
- "args": {},
565
- "when": null,
566
- "checkbox": null
567
- },
568
- {
569
- "separator": true
570
- },
571
- {
572
- "label": "Command Palette...",
573
- "action": "command_palette",
574
- "args": {},
575
- "when": null,
576
- "checkbox": null
577
- }
578
- ]
579
- },
580
- {
581
- "label": "LSP",
582
- "items": [
583
- {
584
- "label": "Show Hover Info",
585
- "action": "lsp_hover",
586
- "args": {},
587
- "when": "lsp_available",
588
- "checkbox": null
589
- },
590
- {
591
- "label": "Go to Definition",
592
- "action": "lsp_goto_definition",
593
- "args": {},
594
- "when": "lsp_available",
595
- "checkbox": null
596
- },
597
- {
598
- "label": "Find References",
599
- "action": "lsp_references",
600
- "args": {},
601
- "when": "lsp_available",
602
- "checkbox": null
603
- },
604
- {
605
- "label": "Rename Symbol",
606
- "action": "lsp_rename",
607
- "args": {},
608
- "when": "lsp_available",
609
- "checkbox": null
610
- },
611
- {
612
- "separator": true
613
- },
614
- {
615
- "label": "Show Completions",
616
- "action": "lsp_completion",
617
- "args": {},
618
- "when": "lsp_available",
619
- "checkbox": null
620
- },
621
- {
622
- "label": "Show Signature Help",
623
- "action": "lsp_signature_help",
624
- "args": {},
625
- "when": "lsp_available",
626
- "checkbox": null
627
- },
628
- {
629
- "label": "Code Actions",
630
- "action": "lsp_code_actions",
631
- "args": {},
632
- "when": "lsp_available",
633
- "checkbox": null
634
- },
635
- {
636
- "separator": true
637
- },
638
- {
639
- "label": "Toggle Inlay Hints",
640
- "action": "toggle_inlay_hints",
641
- "args": {},
642
- "when": "lsp_available",
643
- "checkbox": null
644
- },
645
- {
646
- "label": "Toggle Mouse Hover",
647
- "action": "toggle_mouse_hover",
648
- "args": {},
649
- "when": null,
650
- "checkbox": "mouse_hover"
651
- },
652
- {
653
- "separator": true
654
- },
655
- {
656
- "label": "Restart Server",
657
- "action": "lsp_restart",
658
- "args": {},
659
- "when": null,
660
- "checkbox": null
661
- },
662
- {
663
- "label": "Stop Server",
664
- "action": "lsp_stop",
665
- "args": {},
666
- "when": null,
667
- "checkbox": null
668
- }
669
- ]
670
- },
671
- {
672
- "label": "Explorer",
673
- "items": [
674
- {
675
- "label": "New File",
676
- "action": "file_explorer_new_file",
677
- "args": {},
678
- "when": "file_explorer_focused",
679
- "checkbox": null
680
- },
681
- {
682
- "label": "New Folder",
683
- "action": "file_explorer_new_directory",
684
- "args": {},
685
- "when": "file_explorer_focused",
686
- "checkbox": null
687
- },
688
- {
689
- "separator": true
690
- },
691
- {
692
- "label": "Open",
693
- "action": "file_explorer_open",
694
- "args": {},
695
- "when": "file_explorer_focused",
696
- "checkbox": null
697
- },
698
- {
699
- "label": "Rename",
700
- "action": "file_explorer_rename",
701
- "args": {},
702
- "when": "file_explorer_focused",
703
- "checkbox": null
704
- },
705
- {
706
- "label": "Delete",
707
- "action": "file_explorer_delete",
708
- "args": {},
709
- "when": "file_explorer_focused",
710
- "checkbox": null
711
- },
712
- {
713
- "separator": true
714
- },
715
- {
716
- "label": "Refresh",
717
- "action": "file_explorer_refresh",
718
- "args": {},
719
- "when": "file_explorer_focused",
720
- "checkbox": null
721
- },
722
- {
723
- "separator": true
724
- },
725
- {
726
- "label": "Show Hidden Files",
727
- "action": "file_explorer_toggle_hidden",
728
- "args": {},
729
- "when": "file_explorer",
730
- "checkbox": "file_explorer_show_hidden"
731
- },
732
- {
733
- "label": "Show Gitignored Files",
734
- "action": "file_explorer_toggle_gitignored",
735
- "args": {},
736
- "when": "file_explorer",
737
- "checkbox": "file_explorer_show_gitignored"
738
- }
739
- ]
740
- },
741
- {
742
- "label": "Help",
743
- "items": [
744
- {
745
- "label": "Show Fresh Manual",
746
- "action": "show_help",
747
- "args": {},
748
- "when": null,
749
- "checkbox": null
750
- },
751
- {
752
- "label": "Keyboard Shortcuts",
753
- "action": "keyboard_shortcuts",
754
- "args": {},
755
- "when": null,
756
- "checkbox": null
757
- }
758
- ]
759
- }
760
- ]
761
- }
100
+ "$ref": "#/$defs/MenuConfig"
762
101
  }
763
102
  },
764
103
  "$defs": {
@@ -991,7 +330,8 @@
991
330
  },
992
331
  "required": [
993
332
  "action"
994
- ]
333
+ ],
334
+ "x-display-field": "/action"
995
335
  },
996
336
  "KeyPress": {
997
337
  "description": "A single key in a sequence",
@@ -1033,7 +373,8 @@
1033
373
  },
1034
374
  "default": []
1035
375
  }
1036
- }
376
+ },
377
+ "x-display-field": "/inherits"
1037
378
  },
1038
379
  "KeybindingMapOptions": {
1039
380
  "description": "Available keybinding maps",
@@ -1104,8 +445,27 @@
1104
445
  "description": "Whether pressing Tab should insert a tab character instead of spaces.\nDefaults to false (insert spaces based on tab_size).\nSet to true for languages like Go and Makefile that require tabs.",
1105
446
  "type": "boolean",
1106
447
  "default": false
448
+ },
449
+ "tab_size": {
450
+ "description": "Tab size (number of spaces per tab) for this language.\nIf not specified, falls back to the global editor.tab_size setting.",
451
+ "type": [
452
+ "integer",
453
+ "null"
454
+ ],
455
+ "format": "uint",
456
+ "minimum": 0,
457
+ "default": null
458
+ },
459
+ "on_save": {
460
+ "description": "Actions to run when a file of this language is saved\nActions are run in order; if any fails (non-zero exit), subsequent actions don't run",
461
+ "type": "array",
462
+ "items": {
463
+ "$ref": "#/$defs/OnSaveAction"
464
+ },
465
+ "default": []
1107
466
  }
1108
- }
467
+ },
468
+ "x-display-field": "/grammar"
1109
469
  },
1110
470
  "HighlighterPreference": {
1111
471
  "description": "Preference for which syntax highlighting backend to use",
@@ -1127,6 +487,63 @@
1127
487
  }
1128
488
  ]
1129
489
  },
490
+ "OnSaveAction": {
491
+ "description": "Action to run when a file is saved",
492
+ "type": "object",
493
+ "properties": {
494
+ "command": {
495
+ "description": "The shell command to run\nThe file path is available as $FILE or as an argument",
496
+ "type": "string"
497
+ },
498
+ "args": {
499
+ "description": "Arguments to pass to the command\nUse \"$FILE\" to include the file path",
500
+ "type": "array",
501
+ "items": {
502
+ "type": "string"
503
+ },
504
+ "default": []
505
+ },
506
+ "working_dir": {
507
+ "description": "Working directory for the command (defaults to project root)",
508
+ "type": [
509
+ "string",
510
+ "null"
511
+ ],
512
+ "default": null
513
+ },
514
+ "stdin": {
515
+ "description": "Whether to use the buffer content as stdin",
516
+ "type": "boolean",
517
+ "default": false
518
+ },
519
+ "replace_buffer": {
520
+ "description": "Whether to replace the buffer with the command's stdout\nUseful for formatters",
521
+ "type": "boolean",
522
+ "default": false
523
+ },
524
+ "timeout_ms": {
525
+ "description": "Timeout in milliseconds (default: 10000)",
526
+ "type": "integer",
527
+ "format": "uint64",
528
+ "minimum": 0,
529
+ "default": 10000
530
+ },
531
+ "optional": {
532
+ "description": "Whether this action is optional (won't error if command not found)\nUseful for default formatters that may not be installed\nWhen true, shows a status message instead of an error if command is missing",
533
+ "type": "boolean",
534
+ "default": false
535
+ },
536
+ "enabled": {
537
+ "description": "Whether this action is enabled (default: true)\nSet to false to disable an action without removing it from config",
538
+ "type": "boolean",
539
+ "default": true
540
+ }
541
+ },
542
+ "required": [
543
+ "command"
544
+ ],
545
+ "x-display-field": "/command"
546
+ },
1130
547
  "LspServerConfig": {
1131
548
  "description": "LSP server configuration",
1132
549
  "type": "object",
@@ -1169,7 +586,8 @@
1169
586
  },
1170
587
  "required": [
1171
588
  "command"
1172
- ]
589
+ ],
590
+ "x-display-field": "/command"
1173
591
  },
1174
592
  "ProcessLimits": {
1175
593
  "description": "Configuration for process resource limits",
@@ -1307,6 +725,22 @@
1307
725
  "items"
1308
726
  ]
1309
727
  },
728
+ {
729
+ "description": "A dynamic submenu whose items are generated at runtime\nThe `source` field specifies what to generate (e.g., \"themes\")",
730
+ "type": "object",
731
+ "properties": {
732
+ "label": {
733
+ "type": "string"
734
+ },
735
+ "source": {
736
+ "type": "string"
737
+ }
738
+ },
739
+ "required": [
740
+ "label",
741
+ "source"
742
+ ]
743
+ },
1310
744
  {
1311
745
  "description": "A disabled info label (no action)",
1312
746
  "type": "object",