@fresh-editor/fresh-editor 0.1.14 → 0.1.18

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.
@@ -23,7 +23,7 @@
23
23
  "hasInstallScript": true,
24
24
  "license": "GPL-2.0",
25
25
  "name": "@fresh-editor/fresh-editor",
26
- "version": "0.1.14"
26
+ "version": "0.1.18"
27
27
  },
28
28
  "node_modules/@isaacs/balanced-match": {
29
29
  "engines": {
@@ -896,5 +896,5 @@
896
896
  }
897
897
  },
898
898
  "requires": true,
899
- "version": "0.1.14"
899
+ "version": "0.1.18"
900
900
  }
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "artifactDownloadUrl": "https://github.com/sinelaw/fresh/releases/download/v0.1.14",
2
+ "artifactDownloadUrl": "https://github.com/sinelaw/fresh/releases/download/v0.1.18",
3
3
  "author": "Noam Lewis",
4
4
  "bin": {
5
5
  "fresh": "run-fresh.js"
@@ -92,7 +92,7 @@
92
92
  "zipExt": ".tar.xz"
93
93
  }
94
94
  },
95
- "version": "0.1.14",
95
+ "version": "0.1.18",
96
96
  "volta": {
97
97
  "node": "18.14.1",
98
98
  "npm": "9.5.0"
@@ -0,0 +1,416 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Fresh Editor Configuration",
4
+ "$ref": "#/$defs/Config",
5
+ "$defs": {
6
+ "Config": {
7
+ "type": "object",
8
+ "properties": {
9
+ "active_keybinding_map": {
10
+ "type": "string",
11
+ "description": "Active keybinding map name (e.g., \"default\", \"emacs\", \"vscode\", or a custom name)"
12
+ },
13
+ "editor": {
14
+ "$ref": "#/$defs/EditorConfig",
15
+ "description": "Editor behavior settings (indentation, line numbers, wrapping, etc.)"
16
+ },
17
+ "file_explorer": {
18
+ "$ref": "#/$defs/FileExplorerConfig",
19
+ "description": "File explorer panel settings"
20
+ },
21
+ "keybinding_maps": {
22
+ "type": "object",
23
+ "additionalProperties": {
24
+ "$ref": "#/$defs/KeymapConfig"
25
+ },
26
+ "description": "Named keybinding maps (user can define custom maps here)\nEach map can optionally inherit from another map"
27
+ },
28
+ "keybindings": {
29
+ "type": "array",
30
+ "items": {
31
+ "$ref": "#/$defs/Keybinding"
32
+ },
33
+ "description": "Custom keybindings (overrides for the active map)"
34
+ },
35
+ "languages": {
36
+ "type": "object",
37
+ "additionalProperties": {
38
+ "$ref": "#/$defs/LanguageConfig"
39
+ },
40
+ "description": "Per-language configuration overrides (tab size, formatters, etc.)"
41
+ },
42
+ "lsp": {
43
+ "type": "object",
44
+ "additionalProperties": {
45
+ "$ref": "#/$defs/LspServerConfig"
46
+ },
47
+ "description": "LSP server configurations by language"
48
+ },
49
+ "menu": {
50
+ "$ref": "#/$defs/MenuConfig",
51
+ "description": "Menu bar configuration"
52
+ },
53
+ "theme": {
54
+ "type": "string",
55
+ "description": "Color theme name (e.g., \"high-contrast\", \"monokai\", \"solarized-dark\")"
56
+ }
57
+ },
58
+ "description": "Main configuration structure"
59
+ },
60
+ "EditorConfig": {
61
+ "type": "object",
62
+ "properties": {
63
+ "auto_indent": {
64
+ "type": "boolean",
65
+ "description": "Automatically indent new lines based on the previous line"
66
+ },
67
+ "auto_save_interval_secs": {
68
+ "type": "integer",
69
+ "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)."
70
+ },
71
+ "enable_inlay_hints": {
72
+ "type": "boolean",
73
+ "description": "Whether to enable LSP inlay hints (type hints, parameter hints, etc.)"
74
+ },
75
+ "estimated_line_length": {
76
+ "type": "integer",
77
+ "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."
78
+ },
79
+ "highlight_timeout_ms": {
80
+ "type": "integer",
81
+ "description": "Maximum time in milliseconds for syntax highlighting per frame"
82
+ },
83
+ "large_file_threshold_bytes": {
84
+ "type": "integer",
85
+ "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)\nFiles smaller will count actual lines for accurate scrollbar rendering"
86
+ },
87
+ "line_numbers": {
88
+ "type": "boolean",
89
+ "description": "Show line numbers in the gutter"
90
+ },
91
+ "line_wrap": {
92
+ "type": "boolean",
93
+ "description": "Wrap long lines to fit the window width"
94
+ },
95
+ "recovery_enabled": {
96
+ "type": "boolean",
97
+ "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."
98
+ },
99
+ "relative_line_numbers": {
100
+ "type": "boolean",
101
+ "description": "Show line numbers relative to cursor position"
102
+ },
103
+ "scroll_offset": {
104
+ "type": "integer",
105
+ "description": "Minimum lines to keep visible above/below cursor when scrolling"
106
+ },
107
+ "snapshot_interval": {
108
+ "type": "integer",
109
+ "description": "Undo history snapshot interval (number of edits between snapshots)"
110
+ },
111
+ "syntax_highlighting": {
112
+ "type": "boolean",
113
+ "description": "Enable syntax highlighting for code files"
114
+ },
115
+ "tab_size": {
116
+ "type": "integer",
117
+ "description": "Number of spaces per tab character"
118
+ }
119
+ },
120
+ "description": "Editor behavior configuration"
121
+ },
122
+ "FileExplorerConfig": {
123
+ "type": "object",
124
+ "properties": {
125
+ "custom_ignore_patterns": {
126
+ "type": "array",
127
+ "items": {
128
+ "type": "string"
129
+ },
130
+ "description": "Custom patterns to ignore (in addition to .gitignore)"
131
+ },
132
+ "respect_gitignore": {
133
+ "type": "boolean",
134
+ "description": "Whether to respect .gitignore files"
135
+ },
136
+ "show_gitignored": {
137
+ "type": "boolean",
138
+ "description": "Whether to show gitignored files by default"
139
+ },
140
+ "show_hidden": {
141
+ "type": "boolean",
142
+ "description": "Whether to show hidden files (starting with .) by default"
143
+ },
144
+ "width": {
145
+ "type": "number",
146
+ "description": "Width of file explorer as percentage (0.0 to 1.0)"
147
+ }
148
+ },
149
+ "description": "File explorer configuration"
150
+ },
151
+ "HighlighterPreference": {
152
+ "type": "string",
153
+ "enum": [
154
+ "auto",
155
+ "tree-sitter",
156
+ "textmate"
157
+ ],
158
+ "default": "auto",
159
+ "description": "Preference for which syntax highlighting backend to use"
160
+ },
161
+ "KeyPress": {
162
+ "type": "object",
163
+ "properties": {
164
+ "key": {
165
+ "type": "string",
166
+ "description": "Key name (e.g., \"a\", \"Enter\", \"F1\")"
167
+ },
168
+ "modifiers": {
169
+ "type": "array",
170
+ "items": {
171
+ "type": "string"
172
+ },
173
+ "description": "Modifiers (e.g., [\"ctrl\"], [\"ctrl\", \"shift\"])"
174
+ }
175
+ },
176
+ "required": [
177
+ "key"
178
+ ],
179
+ "description": "A single key in a sequence"
180
+ },
181
+ "Keybinding": {
182
+ "type": "object",
183
+ "properties": {
184
+ "action": {
185
+ "type": "string",
186
+ "description": "Action to perform (e.g., \"insert_char\", \"move_left\")"
187
+ },
188
+ "args": {
189
+ "type": "object",
190
+ "additionalProperties": {},
191
+ "description": "Optional arguments for the action"
192
+ },
193
+ "key": {
194
+ "type": "string",
195
+ "description": "Key name (e.g., \"a\", \"Enter\", \"F1\") - for single-key bindings"
196
+ },
197
+ "keys": {
198
+ "type": "array",
199
+ "items": {
200
+ "$ref": "#/$defs/KeyPress"
201
+ },
202
+ "description": "Key sequence for chord bindings (e.g., [{\"key\": \"x\", \"modifiers\": [\"ctrl\"]}, {\"key\": \"s\", \"modifiers\": [\"ctrl\"]}])\nIf present, takes precedence over key + modifiers"
203
+ },
204
+ "modifiers": {
205
+ "type": "array",
206
+ "items": {
207
+ "type": "string"
208
+ },
209
+ "description": "Modifiers (e.g., [\"ctrl\"], [\"ctrl\", \"shift\"]) - for single-key bindings"
210
+ },
211
+ "when": {
212
+ "anyOf": [
213
+ {
214
+ "type": "string"
215
+ },
216
+ {
217
+ "type": "null"
218
+ }
219
+ ],
220
+ "description": "Optional condition (e.g., \"mode == insert\")"
221
+ }
222
+ },
223
+ "required": [
224
+ "action"
225
+ ],
226
+ "description": "Keybinding definition"
227
+ },
228
+ "KeymapConfig": {
229
+ "type": "object",
230
+ "properties": {
231
+ "bindings": {
232
+ "type": "array",
233
+ "items": {
234
+ "$ref": "#/$defs/Keybinding"
235
+ },
236
+ "description": "Keybindings defined in this keymap"
237
+ },
238
+ "inherits": {
239
+ "anyOf": [
240
+ {
241
+ "type": "string"
242
+ },
243
+ {
244
+ "type": "null"
245
+ }
246
+ ],
247
+ "description": "Optional parent keymap to inherit from"
248
+ }
249
+ },
250
+ "description": "Keymap configuration (for built-in and user-defined keymaps)"
251
+ },
252
+ "LanguageConfig": {
253
+ "type": "object",
254
+ "properties": {
255
+ "auto_indent": {
256
+ "type": "boolean",
257
+ "description": "Whether to auto-indent"
258
+ },
259
+ "comment_prefix": {
260
+ "anyOf": [
261
+ {
262
+ "type": "string"
263
+ },
264
+ {
265
+ "type": "null"
266
+ }
267
+ ],
268
+ "description": "Comment prefix"
269
+ },
270
+ "extensions": {
271
+ "type": "array",
272
+ "items": {
273
+ "type": "string"
274
+ },
275
+ "description": "File extensions for this language"
276
+ },
277
+ "grammar": {
278
+ "type": "string",
279
+ "description": "Tree-sitter grammar name"
280
+ },
281
+ "highlighter": {
282
+ "$ref": "#/$defs/HighlighterPreference",
283
+ "description": "Preferred highlighter backend (auto, tree-sitter, or textmate)"
284
+ },
285
+ "textmate_grammar": {
286
+ "anyOf": [
287
+ {
288
+ "type": "string"
289
+ },
290
+ {
291
+ "type": "null"
292
+ }
293
+ ],
294
+ "description": "Path to custom TextMate grammar file (optional)\nIf specified, this grammar will be used when highlighter is \"textmate\""
295
+ }
296
+ },
297
+ "required": [
298
+ "extensions",
299
+ "grammar"
300
+ ],
301
+ "description": "Language-specific configuration"
302
+ },
303
+ "LspServerConfig": {
304
+ "type": "object",
305
+ "properties": {
306
+ "args": {
307
+ "type": "array",
308
+ "items": {
309
+ "type": "string"
310
+ },
311
+ "description": "Arguments to pass to the server"
312
+ },
313
+ "auto_start": {
314
+ "type": "boolean",
315
+ "description": "Whether to auto-start this LSP server when opening matching files\nIf false (default), the server must be started manually via command palette"
316
+ },
317
+ "command": {
318
+ "type": "string",
319
+ "description": "Command to spawn the server"
320
+ },
321
+ "enabled": {
322
+ "type": "boolean",
323
+ "description": "Whether the server is enabled"
324
+ },
325
+ "process_limits": {
326
+ "$ref": "#/$defs/ProcessLimits",
327
+ "description": "Process resource limits (memory and CPU)"
328
+ }
329
+ },
330
+ "required": [
331
+ "args",
332
+ "command"
333
+ ],
334
+ "description": "Configuration for a language server"
335
+ },
336
+ "Menu": {
337
+ "type": "object",
338
+ "properties": {
339
+ "items": {
340
+ "type": "array",
341
+ "items": {
342
+ "$ref": "#/$defs/MenuItem"
343
+ },
344
+ "description": "Menu items (actions, separators, or submenus)"
345
+ },
346
+ "label": {
347
+ "type": "string",
348
+ "description": "Display label for the menu (e.g., \"File\", \"Edit\")"
349
+ }
350
+ },
351
+ "required": [
352
+ "items",
353
+ "label"
354
+ ],
355
+ "description": "A top-level menu in the menu bar"
356
+ },
357
+ "MenuConfig": {
358
+ "type": "object",
359
+ "properties": {
360
+ "menus": {
361
+ "type": "array",
362
+ "items": {
363
+ "$ref": "#/$defs/Menu"
364
+ },
365
+ "description": "List of top-level menus in the menu bar"
366
+ }
367
+ },
368
+ "description": "Menu bar configuration"
369
+ },
370
+ "MenuItem": {
371
+ "type": "string",
372
+ "enum": [
373
+ "separator",
374
+ "action",
375
+ "label: string",
376
+ "action: string",
377
+ "args: hashmap<string, serde_json::value>",
378
+ "when: option<string>",
379
+ "checkbox: option<string>"
380
+ ],
381
+ "description": "A menu item (action, separator, or submenu)"
382
+ },
383
+ "ProcessLimits": {
384
+ "type": "object",
385
+ "properties": {
386
+ "enabled": {
387
+ "type": "boolean",
388
+ "description": "Enable resource limiting (can be disabled per-platform)"
389
+ },
390
+ "max_cpu_percent": {
391
+ "anyOf": [
392
+ {
393
+ "type": "integer"
394
+ },
395
+ {
396
+ "type": "null"
397
+ }
398
+ ],
399
+ "description": "Maximum CPU usage as percentage of total CPU (None = no limit)\nFor multi-core systems, 100% = 1 core, 200% = 2 cores, etc."
400
+ },
401
+ "max_memory_mb": {
402
+ "anyOf": [
403
+ {
404
+ "type": "integer"
405
+ },
406
+ {
407
+ "type": "null"
408
+ }
409
+ ],
410
+ "description": "Maximum memory usage in megabytes (None = no limit)"
411
+ }
412
+ },
413
+ "description": "Configuration for process resource limits"
414
+ }
415
+ }
416
+ }