fresh-editor 0.1.90

A lightweight, fast terminal-based text editor with LSP support and TypeScript plugins
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Config",
  "description": "Main configuration structure",
  "type": "object",
  "properties": {
    "version": {
      "description": "Configuration version (for migration support)\nConfigs without this field are treated as version 0",
      "type": "integer",
      "format": "uint32",
      "minimum": 0,
      "default": 0
    },
    "theme": {
      "description": "Color theme name",
      "$ref": "#/$defs/ThemeOptions",
      "default": "high-contrast"
    },
    "locale": {
      "description": "UI locale (language) for translations\nIf not set, auto-detected from environment (LC_ALL, LC_MESSAGES, LANG)",
      "$ref": "#/$defs/LocaleOptions",
      "default": null
    },
    "check_for_updates": {
      "description": "Check for new versions on startup (default: true).\nWhen enabled, also sends basic anonymous telemetry (version, OS, terminal type).",
      "type": "boolean",
      "default": true
    },
    "editor": {
      "description": "Editor behavior settings (indentation, line numbers, wrapping, etc.)",
      "$ref": "#/$defs/EditorConfig",
      "default": {
        "line_numbers": true,
        "relative_line_numbers": false,
        "line_wrap": true,
        "syntax_highlighting": true,
        "show_menu_bar": true,
        "show_tab_bar": true,
        "use_terminal_bg": false,
        "cursor_style": "default",
        "tab_size": 4,
        "auto_indent": true,
        "scroll_offset": 3,
        "default_line_ending": "lf",
        "quick_suggestions": true,
        "quick_suggestions_delay_ms": 10,
        "suggest_on_trigger_characters": true,
        "accept_suggestion_on_enter": "on",
        "enable_inlay_hints": true,
        "enable_semantic_tokens_full": false,
        "mouse_hover_enabled": true,
        "mouse_hover_delay_ms": 500,
        "double_click_time_ms": 500,
        "recovery_enabled": true,
        "auto_save_interval_secs": 2,
        "auto_revert_poll_interval_ms": 2000,
        "keyboard_disambiguate_escape_codes": true,
        "keyboard_report_event_types": false,
        "keyboard_report_alternate_keys": true,
        "keyboard_report_all_keys_as_escape_codes": false,
        "highlight_timeout_ms": 5,
        "snapshot_interval": 100,
        "highlight_context_bytes": 10000,
        "large_file_threshold_bytes": 1048576,
        "estimated_line_length": 80,
        "file_tree_poll_interval_ms": 3000
      }
    },
    "file_explorer": {
      "description": "File explorer panel settings",
      "$ref": "#/$defs/FileExplorerConfig",
      "default": {
        "respect_gitignore": true,
        "show_hidden": false,
        "show_gitignored": false,
        "custom_ignore_patterns": [],
        "width": 0.30000001192092896
      }
    },
    "file_browser": {
      "description": "File browser settings (Open File dialog)",
      "$ref": "#/$defs/FileBrowserConfig",
      "default": {
        "show_hidden": false
      }
    },
    "terminal": {
      "description": "Terminal settings",
      "$ref": "#/$defs/TerminalConfig",
      "default": {
        "jump_to_end_on_output": true
      }
    },
    "keybindings": {
      "description": "Custom keybindings (overrides for the active map)",
      "type": "array",
      "items": {
        "$ref": "#/$defs/Keybinding"
      },
      "default": []
    },
    "keybinding_maps": {
      "description": "Named keybinding maps (user can define custom maps here)\nEach map can optionally inherit from another map",
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/KeymapConfig"
      },
      "default": {}
    },
    "active_keybinding_map": {
      "description": "Active keybinding map name",
      "$ref": "#/$defs/KeybindingMapOptions",
      "default": "default"
    },
    "languages": {
      "description": "Per-language configuration overrides (tab size, formatters, etc.)",
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/LanguageConfig"
      },
      "default": {}
    },
    "lsp": {
      "description": "LSP server configurations by language",
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/LspServerConfig"
      },
      "default": {}
    },
    "warnings": {
      "description": "Warning notification settings",
      "$ref": "#/$defs/WarningsConfig",
      "default": {
        "show_status_indicator": true
      }
    },
    "plugins": {
      "description": "Plugin configurations by plugin name\nPlugins are auto-discovered from the plugins directory.\nUse this to enable/disable specific plugins.",
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/PluginConfig"
      },
      "x-standalone-category": true,
      "x-no-add": true,
      "default": {}
    },
    "packages": {
      "description": "Package manager settings for plugin/theme installation",
      "$ref": "#/$defs/PackagesConfig",
      "default": {
        "sources": [
          "https://github.com/sinelaw/fresh-plugins-registry"
        ]
      }
    }
  },
  "$defs": {
    "ThemeOptions": {
      "description": "Available color themes",
      "type": "string",
      "enum": [
        "dark",
        "light",
        "high-contrast",
        "nostalgia"
      ]
    },
    "LocaleOptions": {
      "description": "UI locale (language). Use null for auto-detection from environment.",
      "enum": [
        null,
        "cs",
        "de",
        "en",
        "es",
        "fr",
        "it",
        "ja",
        "ko",
        "pt-BR",
        "ru",
        "th",
        "uk",
        "zh-CN"
      ]
    },
    "EditorConfig": {
      "description": "Editor behavior configuration",
      "type": "object",
      "properties": {
        "line_numbers": {
          "description": "Show line numbers in the gutter (default for new buffers)",
          "type": "boolean",
          "x-section": "Display",
          "default": true
        },
        "relative_line_numbers": {
          "description": "Show line numbers relative to cursor position",
          "type": "boolean",
          "x-section": "Display",
          "default": false
        },
        "line_wrap": {
          "description": "Wrap long lines to fit the window width (default for new views)",
          "type": "boolean",
          "x-section": "Display",
          "default": true
        },
        "syntax_highlighting": {
          "description": "Enable syntax highlighting for code files",
          "type": "boolean",
          "x-section": "Display",
          "default": true
        },
        "show_menu_bar": {
          "description": "Whether the menu bar is visible by default.\nThe menu bar provides access to menus (File, Edit, View, etc.) at the top of the screen.\nCan be toggled at runtime via command palette or keybinding.\nDefault: true",
          "type": "boolean",
          "x-section": "Display",
          "default": true
        },
        "show_tab_bar": {
          "description": "Whether the tab bar is visible by default.\nThe tab bar shows open files in each split pane.\nCan be toggled at runtime via command palette or keybinding.\nDefault: true",
          "type": "boolean",
          "x-section": "Display",
          "default": true
        },
        "use_terminal_bg": {
          "description": "Use the terminal's default background color instead of the theme's editor background.\nWhen enabled, the editor background inherits from the terminal emulator,\nallowing transparency or custom terminal backgrounds to show through.\nDefault: false",
          "type": "boolean",
          "x-section": "Display",
          "default": false
        },
        "cursor_style": {
          "description": "Cursor style for the terminal cursor.\nOptions: blinking_block, steady_block, blinking_bar, steady_bar, blinking_underline, steady_underline\nDefault: blinking_block",
          "$ref": "#/$defs/CursorStyle",
          "x-section": "Display",
          "default": "default"
        },
        "tab_size": {
          "description": "Number of spaces per tab character",
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "x-section": "Editing",
          "default": 4
        },
        "auto_indent": {
          "description": "Automatically indent new lines based on the previous line",
          "type": "boolean",
          "x-section": "Editing",
          "default": true
        },
        "scroll_offset": {
          "description": "Minimum lines to keep visible above/below cursor when scrolling",
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "x-section": "Editing",
          "default": 3
        },
        "default_line_ending": {
          "description": "Default line ending format for new files.\nFiles loaded from disk will use their detected line ending format.\nOptions: \"lf\" (Unix/Linux/macOS), \"crlf\" (Windows), \"cr\" (Classic Mac)\nDefault: \"lf\"",
          "$ref": "#/$defs/LineEndingOption",
          "x-section": "Editing",
          "default": "lf"
        },
        "quick_suggestions": {
          "description": "Enable quick suggestions (VS Code-like behavior).\nWhen enabled, completion suggestions appear automatically while typing,\nnot just on trigger characters (like `.` or `::`).\nDefault: true",
          "type": "boolean",
          "x-section": "Completion",
          "default": true
        },
        "quick_suggestions_delay_ms": {
          "description": "Delay in milliseconds before showing completion suggestions.\nLower values (10-50ms) feel more responsive but may be distracting.\nHigher values (100-500ms) reduce noise while typing.\nTrigger characters (like `.`) bypass this delay.\nDefault: 10 (matches VS Code)",
          "type": "integer",
          "format": "uint64",
          "minimum": 0,
          "x-section": "Completion",
          "default": 10
        },
        "suggest_on_trigger_characters": {
          "description": "Whether trigger characters (like `.`, `::`, `->`) immediately show completions.\nWhen true, typing a trigger character bypasses quick_suggestions_delay_ms.\nDefault: true",
          "type": "boolean",
          "x-section": "Completion",
          "default": true
        },
        "accept_suggestion_on_enter": {
          "description": "Controls whether pressing Enter accepts the selected completion.\n- \"on\": Enter always accepts the completion\n- \"off\": Enter inserts a newline (use Tab to accept)\n- \"smart\": Enter accepts only if the completion text differs from typed text\nDefault: \"on\"",
          "$ref": "#/$defs/AcceptSuggestionOnEnter",
          "x-section": "Completion",
          "default": "on"
        },
        "enable_inlay_hints": {
          "description": "Whether to enable LSP inlay hints (type hints, parameter hints, etc.)",
          "type": "boolean",
          "x-section": "LSP",
          "default": true
        },
        "enable_semantic_tokens_full": {
          "description": "Whether to request full-document LSP semantic tokens.\nRange requests are still used when supported.\nDefault: false (range-only to avoid heavy full refreshes).",
          "type": "boolean",
          "x-section": "LSP",
          "default": false
        },
        "mouse_hover_enabled": {
          "description": "Whether mouse hover triggers LSP hover requests.\nWhen enabled, hovering over code with the mouse will show documentation.\nDefault: true",
          "type": "boolean",
          "x-section": "Mouse",
          "default": true
        },
        "mouse_hover_delay_ms": {
          "description": "Delay in milliseconds before a mouse hover triggers an LSP hover request.\nLower values show hover info faster but may cause more LSP server load.\nDefault: 500ms",
          "type": "integer",
          "format": "uint64",
          "minimum": 0,
          "x-section": "Mouse",
          "default": 500
        },
        "double_click_time_ms": {
          "description": "Time window in milliseconds for detecting double-clicks.\nTwo clicks within this time are treated as a double-click (word selection).\nDefault: 500ms",
          "type": "integer",
          "format": "uint64",
          "minimum": 0,
          "x-section": "Mouse",
          "default": 500
        },
        "recovery_enabled": {
          "description": "Whether to enable file recovery (Emacs-style auto-save)\nWhen enabled, buffers are periodically saved to recovery files\nso they can be recovered if the editor crashes.",
          "type": "boolean",
          "x-section": "Recovery",
          "default": true
        },
        "auto_save_interval_secs": {
          "description": "Auto-save interval in seconds for file recovery\nModified buffers are saved to recovery files at this interval.\nDefault: 2 seconds for fast recovery with minimal data loss.\nSet to 0 to disable periodic auto-save (manual recovery only).",
          "type": "integer",
          "format": "uint32",
          "minimum": 0,
          "x-section": "Recovery",
          "default": 2
        },
        "auto_revert_poll_interval_ms": {
          "description": "Poll interval in milliseconds for auto-reverting open buffers.\nWhen auto-revert is enabled, file modification times are checked at this interval.\nLower values detect external changes faster but use more CPU.\nDefault: 2000ms (2 seconds)",
          "type": "integer",
          "format": "uint64",
          "minimum": 0,
          "x-section": "Recovery",
          "default": 2000
        },
        "keyboard_disambiguate_escape_codes": {
          "description": "Enable keyboard enhancement: disambiguate escape codes using CSI-u sequences.\nThis allows unambiguous reading of Escape and modified keys.\nRequires terminal support (kitty keyboard protocol).\nDefault: true",
          "type": "boolean",
          "x-section": "Keyboard",
          "default": true
        },
        "keyboard_report_event_types": {
          "description": "Enable keyboard enhancement: report key event types (repeat/release).\nAdds extra events when keys are autorepeated or released.\nRequires terminal support (kitty keyboard protocol).\nDefault: false",
          "type": "boolean",
          "x-section": "Keyboard",
          "default": false
        },
        "keyboard_report_alternate_keys": {
          "description": "Enable keyboard enhancement: report alternate keycodes.\nSends alternate keycodes in addition to the base keycode.\nRequires terminal support (kitty keyboard protocol).\nDefault: true",
          "type": "boolean",
          "x-section": "Keyboard",
          "default": true
        },
        "keyboard_report_all_keys_as_escape_codes": {
          "description": "Enable keyboard enhancement: report all keys as escape codes.\nRepresents all keyboard events as CSI-u sequences.\nRequired for repeat/release events on plain-text keys.\nRequires terminal support (kitty keyboard protocol).\nDefault: false",
          "type": "boolean",
          "x-section": "Keyboard",
          "default": false
        },
        "highlight_timeout_ms": {
          "description": "Maximum time in milliseconds for syntax highlighting per frame",
          "type": "integer",
          "format": "uint64",
          "minimum": 0,
          "x-section": "Performance",
          "default": 5
        },
        "snapshot_interval": {
          "description": "Undo history snapshot interval (number of edits between snapshots)",
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "x-section": "Performance",
          "default": 100
        },
        "highlight_context_bytes": {
          "description": "Number of bytes to look back/forward from the viewport for syntax highlighting context.\nLarger values improve accuracy for multi-line constructs (strings, comments, nested blocks)\nbut may slow down highlighting for very large files.\nDefault: 10KB (10000 bytes)",
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "x-section": "Performance",
          "default": 10000
        },
        "large_file_threshold_bytes": {
          "description": "File size threshold in bytes for \"large file\" behavior\nFiles larger than this will:\n- Skip LSP features\n- Use constant-size scrollbar thumb (1 char)\n\nFiles smaller will count actual lines for accurate scrollbar rendering",
          "type": "integer",
          "format": "uint64",
          "minimum": 0,
          "x-section": "Performance",
          "default": 1048576
        },
        "estimated_line_length": {
          "description": "Estimated average line length in bytes (used for large file line estimation)\nThis is used by LineIterator to estimate line positions in large files\nwithout line metadata. Typical values: 80-120 bytes.",
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "x-section": "Performance",
          "default": 80
        },
        "file_tree_poll_interval_ms": {
          "description": "Poll interval in milliseconds for refreshing expanded directories in the file explorer.\nDirectory modification times are checked at this interval to detect new/deleted files.\nLower values detect changes faster but use more CPU.\nDefault: 3000ms (3 seconds)",
          "type": "integer",
          "format": "uint64",
          "minimum": 0,
          "x-section": "Performance",
          "default": 3000
        }
      }
    },
    "CursorStyle": {
      "description": "Terminal cursor style",
      "type": "string",
      "enum": [
        "default",
        "blinking_block",
        "steady_block",
        "blinking_bar",
        "steady_bar",
        "blinking_underline",
        "steady_underline"
      ]
    },
    "LineEndingOption": {
      "description": "Default line ending format for new files",
      "type": "string",
      "enum": [
        "lf",
        "crlf",
        "cr"
      ],
      "default": "lf"
    },
    "AcceptSuggestionOnEnter": {
      "description": "Controls whether Enter accepts a completion suggestion",
      "type": "string",
      "enum": [
        "on",
        "off",
        "smart"
      ],
      "default": "on"
    },
    "FileExplorerConfig": {
      "description": "File explorer configuration",
      "type": "object",
      "properties": {
        "respect_gitignore": {
          "description": "Whether to respect .gitignore files",
          "type": "boolean",
          "default": true
        },
        "show_hidden": {
          "description": "Whether to show hidden files (starting with .) by default",
          "type": "boolean",
          "default": false
        },
        "show_gitignored": {
          "description": "Whether to show gitignored files by default",
          "type": "boolean",
          "default": false
        },
        "custom_ignore_patterns": {
          "description": "Custom patterns to ignore (in addition to .gitignore)",
          "type": "array",
          "items": {
            "type": "string"
          },
          "default": []
        },
        "width": {
          "description": "Width of file explorer as percentage (0.0 to 1.0)",
          "type": "number",
          "format": "float",
          "default": 0.30000001192092896
        }
      }
    },
    "FileBrowserConfig": {
      "description": "File browser configuration (for Open File dialog)",
      "type": "object",
      "properties": {
        "show_hidden": {
          "description": "Whether to show hidden files (starting with .) by default in Open File dialog",
          "type": "boolean",
          "default": false
        }
      }
    },
    "TerminalConfig": {
      "description": "Terminal configuration",
      "type": "object",
      "properties": {
        "jump_to_end_on_output": {
          "description": "When viewing terminal scrollback and new output arrives,\nautomatically jump back to terminal mode (default: true)",
          "type": "boolean",
          "default": true
        }
      }
    },
    "Keybinding": {
      "description": "Keybinding definition",
      "type": "object",
      "properties": {
        "key": {
          "description": "Key name (e.g., \"a\", \"Enter\", \"F1\") - for single-key bindings",
          "type": "string"
        },
        "modifiers": {
          "description": "Modifiers (e.g., [\"ctrl\"], [\"ctrl\", \"shift\"]) - for single-key bindings",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "keys": {
          "description": "Key sequence for chord bindings (e.g., [{\"key\": \"x\", \"modifiers\": [\"ctrl\"]}, {\"key\": \"s\", \"modifiers\": [\"ctrl\"]}])\nIf present, takes precedence over key + modifiers",
          "type": "array",
          "items": {
            "$ref": "#/$defs/KeyPress"
          }
        },
        "action": {
          "description": "Action to perform (e.g., \"insert_char\", \"move_left\")",
          "type": "string"
        },
        "args": {
          "description": "Optional arguments for the action",
          "type": "object",
          "additionalProperties": true,
          "default": {}
        },
        "when": {
          "description": "Optional condition (e.g., \"mode == insert\")",
          "type": [
            "string",
            "null"
          ],
          "default": null
        }
      },
      "required": [
        "action"
      ],
      "x-display-field": "/action"
    },
    "KeyPress": {
      "description": "A single key in a sequence",
      "type": "object",
      "properties": {
        "key": {
          "description": "Key name (e.g., \"a\", \"Enter\", \"F1\")",
          "type": "string"
        },
        "modifiers": {
          "description": "Modifiers (e.g., [\"ctrl\"], [\"ctrl\", \"shift\"])",
          "type": "array",
          "items": {
            "type": "string"
          },
          "default": []
        }
      },
      "required": [
        "key"
      ]
    },
    "KeymapConfig": {
      "description": "Keymap configuration (for built-in and user-defined keymaps)",
      "type": "object",
      "properties": {
        "inherits": {
          "description": "Optional parent keymap to inherit from",
          "type": [
            "string",
            "null"
          ]
        },
        "bindings": {
          "description": "Keybindings defined in this keymap",
          "type": "array",
          "items": {
            "$ref": "#/$defs/Keybinding"
          },
          "default": []
        }
      },
      "x-display-field": "/inherits"
    },
    "KeybindingMapOptions": {
      "description": "Available keybinding maps",
      "type": "string",
      "enum": [
        "default",
        "emacs",
        "vscode",
        "macos"
      ]
    },
    "LanguageConfig": {
      "description": "Language-specific configuration",
      "type": "object",
      "properties": {
        "extensions": {
          "description": "File extensions for this language (e.g., [\"rs\"] for Rust)",
          "type": "array",
          "items": {
            "type": "string"
          },
          "default": []
        },
        "filenames": {
          "description": "Exact filenames for this language (e.g., [\"Makefile\", \"GNUmakefile\"])",
          "type": "array",
          "items": {
            "type": "string"
          },
          "default": []
        },
        "grammar": {
          "description": "Tree-sitter grammar name",
          "type": "string",
          "default": ""
        },
        "comment_prefix": {
          "description": "Comment prefix",
          "type": [
            "string",
            "null"
          ],
          "default": null
        },
        "auto_indent": {
          "description": "Whether to auto-indent",
          "type": "boolean",
          "default": true
        },
        "highlighter": {
          "description": "Preferred highlighter backend (auto, tree-sitter, or textmate)",
          "$ref": "#/$defs/HighlighterPreference",
          "default": "auto"
        },
        "textmate_grammar": {
          "description": "Path to custom TextMate grammar file (optional)\nIf specified, this grammar will be used when highlighter is \"textmate\"",
          "type": [
            "string",
            "null"
          ],
          "default": null
        },
        "show_whitespace_tabs": {
          "description": "Whether to show whitespace tab indicators (→) for this language\nDefaults to true. Set to false for languages like Go that use tabs for indentation.",
          "type": "boolean",
          "default": true
        },
        "use_tabs": {
          "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.",
          "type": "boolean",
          "default": false
        },
        "tab_size": {
          "description": "Tab size (number of spaces per tab) for this language.\nIf not specified, falls back to the global editor.tab_size setting.",
          "type": [
            "integer",
            "null"
          ],
          "format": "uint",
          "minimum": 0,
          "default": null
        },
        "formatter": {
          "description": "The formatter for this language (used by format_buffer command)",
          "anyOf": [
            {
              "$ref": "#/$defs/FormatterConfig"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "format_on_save": {
          "description": "Whether to automatically format on save (uses the formatter above)",
          "type": "boolean",
          "default": false
        },
        "on_save": {
          "description": "Actions to run when a file of this language is saved (linters, etc.)\nActions are run in order; if any fails (non-zero exit), subsequent actions don't run\nNote: Use `formatter` + `format_on_save` for formatting, not on_save",
          "type": "array",
          "items": {
            "$ref": "#/$defs/OnSaveAction"
          },
          "default": []
        }
      },
      "x-display-field": "/grammar"
    },
    "HighlighterPreference": {
      "description": "Preference for which syntax highlighting backend to use",
      "oneOf": [
        {
          "description": "Use tree-sitter if available, fall back to TextMate",
          "type": "string",
          "const": "auto"
        },
        {
          "description": "Force tree-sitter only (no highlighting if unavailable)",
          "type": "string",
          "const": "tree-sitter"
        },
        {
          "description": "Force TextMate grammar (skip tree-sitter even if available)",
          "type": "string",
          "const": "textmate"
        }
      ]
    },
    "FormatterConfig": {
      "description": "Formatter configuration for a language",
      "type": "object",
      "properties": {
        "command": {
          "description": "The formatter command to run (e.g., \"rustfmt\", \"prettier\")",
          "type": "string"
        },
        "args": {
          "description": "Arguments to pass to the formatter\nUse \"$FILE\" to include the file path",
          "type": "array",
          "items": {
            "type": "string"
          },
          "default": []
        },
        "stdin": {
          "description": "Whether to pass buffer content via stdin (default: true)\nMost formatters read from stdin and write to stdout",
          "type": "boolean",
          "default": true
        },
        "timeout_ms": {
          "description": "Timeout in milliseconds (default: 10000)",
          "type": "integer",
          "format": "uint64",
          "minimum": 0,
          "default": 10000
        }
      },
      "required": [
        "command"
      ],
      "x-display-field": "/command"
    },
    "OnSaveAction": {
      "description": "Action to run when a file is saved (for linters, etc.)",
      "type": "object",
      "properties": {
        "command": {
          "description": "The shell command to run\nThe file path is available as $FILE or as an argument",
          "type": "string"
        },
        "args": {
          "description": "Arguments to pass to the command\nUse \"$FILE\" to include the file path",
          "type": "array",
          "items": {
            "type": "string"
          },
          "default": []
        },
        "working_dir": {
          "description": "Working directory for the command (defaults to project root)",
          "type": [
            "string",
            "null"
          ],
          "default": null
        },
        "stdin": {
          "description": "Whether to use the buffer content as stdin",
          "type": "boolean",
          "default": false
        },
        "timeout_ms": {
          "description": "Timeout in milliseconds (default: 10000)",
          "type": "integer",
          "format": "uint64",
          "minimum": 0,
          "default": 10000
        },
        "enabled": {
          "description": "Whether this action is enabled (default: true)\nSet to false to disable an action without removing it from config",
          "type": "boolean",
          "default": true
        }
      },
      "required": [
        "command"
      ],
      "x-display-field": "/command"
    },
    "LspServerConfig": {
      "description": "LSP server configuration",
      "type": "object",
      "properties": {
        "command": {
          "description": "Command to spawn the server.\nRequired when enabled=true, ignored when enabled=false.",
          "type": "string",
          "default": ""
        },
        "args": {
          "description": "Arguments to pass to the server",
          "type": "array",
          "items": {
            "type": "string"
          },
          "default": []
        },
        "enabled": {
          "description": "Whether the server is enabled",
          "type": "boolean",
          "default": true
        },
        "auto_start": {
          "description": "Whether to auto-start this LSP server when opening matching files\nIf false (default), the server must be started manually via command palette",
          "type": "boolean",
          "default": false
        },
        "process_limits": {
          "description": "Process resource limits (memory and CPU)",
          "$ref": "#/$defs/ProcessLimits",
          "default": {
            "max_memory_percent": 50,
            "max_cpu_percent": 90,
            "enabled": true
          }
        },
        "initialization_options": {
          "description": "Custom initialization options to send to the server\nThese are passed in the `initializationOptions` field of the LSP Initialize request",
          "default": null
        }
      },
      "x-display-field": "/command"
    },
    "ProcessLimits": {
      "description": "Configuration for process resource limits",
      "type": "object",
      "properties": {
        "max_memory_percent": {
          "description": "Maximum memory usage as percentage of total system memory (None = no limit)\nDefault is 50% of total system memory",
          "type": [
            "integer",
            "null"
          ],
          "format": "uint32",
          "minimum": 0,
          "default": null
        },
        "max_cpu_percent": {
          "description": "Maximum CPU usage as percentage of total CPU (None = no limit)\nFor multi-core systems, 100% = 1 core, 200% = 2 cores, etc.",
          "type": [
            "integer",
            "null"
          ],
          "format": "uint32",
          "minimum": 0,
          "default": null
        },
        "enabled": {
          "description": "Enable resource limiting (can be disabled per-platform)",
          "type": "boolean",
          "default": true
        }
      }
    },
    "WarningsConfig": {
      "description": "Warning notification configuration",
      "type": "object",
      "properties": {
        "show_status_indicator": {
          "description": "Show warning/error indicators in the status bar (default: true)\nWhen enabled, displays a colored indicator for LSP errors and other warnings",
          "type": "boolean",
          "default": true
        }
      }
    },
    "PluginConfig": {
      "description": "Configuration for a single plugin",
      "type": "object",
      "properties": {
        "enabled": {
          "description": "Whether this plugin is enabled (default: true)\nWhen disabled, the plugin will not be loaded or executed.",
          "type": "boolean",
          "default": true
        },
        "path": {
          "description": "Path to the plugin file (populated automatically when scanning)\nThis is filled in by the plugin system and should not be set manually.",
          "type": [
            "string",
            "null"
          ],
          "readOnly": true
        }
      },
      "x-display-field": "/enabled"
    },
    "PackagesConfig": {
      "description": "Package manager configuration for plugins and themes",
      "type": "object",
      "properties": {
        "sources": {
          "description": "Registry sources (git repository URLs containing plugin/theme indices)\nDefault: [\"https://github.com/sinelaw/fresh-plugins-registry\"]",
          "type": "array",
          "items": {
            "type": "string"
          },
          "default": [
            "https://github.com/sinelaw/fresh-plugins-registry"
          ]
        }
      }
    }
  }
}