@fresh-editor/fresh-editor 0.3.2 → 0.3.4
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.
- package/CHANGELOG.md +84 -0
- package/package.json +1 -1
- package/plugins/config-schema.json +9 -1
- package/plugins/diagnostics_panel.ts +4 -0
- package/plugins/find_references.ts +4 -0
- package/plugins/git_explorer.ts +9 -1
- package/plugins/lib/finder.ts +81 -10
- package/plugins/lib/fresh.d.ts +40 -4
- package/plugins/live_grep.i18n.json +42 -14
- package/plugins/live_grep.ts +491 -41
- package/plugins/markdown_compose.ts +17 -3
- package/plugins/schemas/theme.schema.json +462 -12
- package/plugins/search_replace.ts +5 -0
- package/plugins/theme_editor.i18n.json +112 -0
- package/plugins/theme_editor.ts +58 -50
- package/themes/dark.json +2 -0
- package/themes/high-contrast.json +2 -0
- package/themes/light.json +2 -0
- package/themes/nord.json +5 -0
- package/themes/nostalgia.json +2 -0
- package/themes/solarized-dark.json +5 -0
- package/themes/terminal.json +128 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,89 @@
|
|
|
1
1
|
# Release Notes
|
|
2
2
|
|
|
3
|
+
## 0.3.4
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* **Live Grep floating overlay + Utility Dock** (#1796): Live Grep now opens as a centered floating overlay with results on the left and a real-buffer file preview on the right (full syntax highlighting, gutter, soft-wrap). `Esc` returns you to your prior layout exactly. **Resume** (`Alt+r`) reopens the last query with cached results. **Export to Quickfix** (`Alt+M`) sends results into a dockable list.
|
|
8
|
+
|
|
9
|
+
* New **Utility Dock** at the workspace root hosts the terminal (`` Alt+` ``), Quickfix, Diagnostics, and Find References — they share one pane spanning the full width instead of nesting under whichever split was focused.
|
|
10
|
+
|
|
11
|
+
* **Pluggable Live Grep providers**: Built-in chain is now ripgrep → **git-grep (default in repos)** → grep, with `ag` / `ack` available via plugin registration. `Alt+P` cycles to the next available provider; the active one shows in the overlay's title bar. Plugins can register custom backends via `editor.getPluginApi("live-grep")`.
|
|
12
|
+
|
|
13
|
+
* **Settings tree-view**: The left category list is now an expandable tree — categories with multiple sections show chevrons, expanding reveals jumpable section rows, and the tree cursor follows scrolling so you can see where you are in the body. Section jumps snap to the top of the section. Toggle controls render as a chip-style `[ ✓ ACTIVE ]` indicator.
|
|
14
|
+
|
|
15
|
+
* **HDL language support** (#1528, reported by @bqinTT): Syntax highlighting for **Verilog** (`.v` left mapped to vlang for compatibility, `.vh`/`.verilog`), **SystemVerilog** (`.sv`/`.svh`/`.svi`/`.svp`), and **VHDL** (`.vhd`/`.vhdl`/`.vho`). `svls` wired as the default LSP for Verilog/SystemVerilog (opt-in per project).
|
|
16
|
+
|
|
17
|
+
* **New `terminal` built-in theme** (#1457, #1798, reported by @AmethystGosling169 and @BrettKinny): Colors come from your terminal's own palette instead of hard-coded RGB — backgrounds use `Default` so transparency and your terminal's background show through; accents use ANSI named colors that remap to whatever your terminal colorscheme defines. Selection uses reverse-video so it inverts whatever colors are already on screen.
|
|
18
|
+
|
|
19
|
+
* **Theme inheritance with `extends`**: User themes can now `extends: "builtin://light"` (or `dark` / `high-contrast` / `nostalgia` / `terminal`) and layer overrides on top — the same model VSCode/Helix/Sublime/Zed use. With no `extends`, an explicit `editor.bg` triggers luminance-based auto-inference (bright bg → light base, dim → dark), so partial light themes no longer end up with dark UI chrome (#1281, reported by @nico2004444).
|
|
20
|
+
|
|
21
|
+
* **File explorer context-menu additions** (#1576, reported by @RandomGHUser): **Duplicate** (creates `name copy[.ext]` next to the source, multi-select supported), **Copy Full Path** and **Copy Relative Path** (newline-joined for multi-select). The new entries don't appear on the project root.
|
|
22
|
+
|
|
23
|
+
* **Distribute clipboard across cursors** (#1057, reported by @graphixillusion): With N cursors and an N-line clipboard, paste now gives each cursor one line in top-to-bottom order — VSCode / Notepad++ "column-mode paste" semantics. A block-selected copy/paste round-trip preserves its rectangular shape. Behavior is unchanged when counts don't match.
|
|
24
|
+
|
|
25
|
+
* **Discard option in quit prompt** (#1839, reported by @turkishmaid): With `hot_exit` on (the default), the unsaved-changes prompt now offers "(d)iscard and quit" so accidental edits no longer require disabling hot_exit globally to throw away. Picking "save" on quit also chains a Save As prompt for each dirty unnamed buffer instead of silently dropping it.
|
|
26
|
+
|
|
27
|
+
* **Project name in window title** (#1793, reported by @dAnjou): Title is now `<file> — <project> — Fresh` so multiple Fresh sessions in different projects are distinguishable in your taskbar/window list.
|
|
28
|
+
|
|
29
|
+
* **Cursor-jump animation toggle** (#1788): New `editor.cursor_jump_animation` setting lets you keep ambient animations (tab slides, dashboard) while disabling just the cursor-jump trail. The master `editor.animations` setting still wins.
|
|
30
|
+
|
|
31
|
+
### Improvements
|
|
32
|
+
|
|
33
|
+
* **Search & Replace across project no longer hangs on large binary files** (#1342, reported by @dragonfyre13): Hardcoded extension fast-path skips known-binary files (compiled artifacts, archives, media, ML weights, fonts) before any I/O. Per-file size cap and stronger header sniff (PNG, ZIP-based archives like `.pth`, ELF) catch the formats whose first bytes can look text-like.
|
|
34
|
+
|
|
35
|
+
* **POSIX ACL writability** (#1765, reported by @cherouize): A file granted write access via `setfacl -m u:NAME:rw` is no longer reported read-only — Fresh now asks the kernel via `faccessat(W_OK)` instead of walking inode mode bits, so ACLs, capabilities, and read-only mounts are all honored.
|
|
36
|
+
|
|
37
|
+
* **LSP status popup doesn't auto-show**: Auto-popping on first file open stole focus and swallowed keystrokes for users who hadn't asked to enable LSP. The `LSP` indicator is now a manual click target; its `Off` state (configured but not running) is rendered with a more prominent attention-grabbing color so discoverability isn't lost.
|
|
38
|
+
|
|
39
|
+
* **Hover popup no longer flickers on mouse moves** (#692) inside the editor (gutter, end-of-line, between words). It only dismisses when the mouse leaves the editor area entirely. New hover responses replace the existing popup instead of stacking.
|
|
40
|
+
|
|
41
|
+
* **Multi-cursor `Ctrl-D` after substring search** (#1697, reported by @dtwilliamson): When the cursor is inside an active search match, "Add cursor at next match" selects the next *search match* instead of expanding to the surrounding word.
|
|
42
|
+
|
|
43
|
+
* **JavaScript syntax highlighting** (#899, reported by @comesuccingfuccsloot): Routed through tree-sitter, so template literals containing arrow functions or `${expr}` no longer leak `@string` styling across the rest of the file.
|
|
44
|
+
|
|
45
|
+
* **Smarter auto-indent for Lua / Ruby / Bash / Pascal**: Tree-sitter `indents.scm` is now the single source of truth for keyword-delimited languages, so `(` opening a function call no longer gets treated as a block-opening delimiter.
|
|
46
|
+
|
|
47
|
+
* **Enter at column 0 doesn't push the line right anymore** (#1425, reported by @goszlanyi): Auto-indent now detects "cursor at column 0 of a non-empty line" and inserts a bare newline. Closing-delimiter lines still get the established indent-before-close behavior.
|
|
48
|
+
|
|
49
|
+
* **Live Diff virtual lines soft-wrap** (#1787) instead of being truncated at the right edge.
|
|
50
|
+
|
|
51
|
+
* **Per-workspace hot-exit recovery** (#1550, reported by @goszlanyi): Standalone-mode recovery files are now scoped per working directory. Quitting Fresh in folder B no longer wipes folder A's recovered unnamed-buffer state.
|
|
52
|
+
|
|
53
|
+
* **Terminal PTY resyncs on tab reveal** (#1795): Resizing the host while a terminal was hidden behind another tab now correctly forwards `SIGWINCH` when you switch back — `$COLUMNS` / `stty size` stay accurate.
|
|
54
|
+
|
|
55
|
+
* **Open File dialog scrolls correctly on small terminals** (#245): Selection no longer slides past the bottom of the visible list.
|
|
56
|
+
|
|
57
|
+
* **Keybinding editor scrollbar responds to mouse** (#1593, reported by @Kodiak-01): Click and drag both work; wheel scrolls the viewport instead of moving the selection (so a scrollbar drag isn't undone by the next wheel tick).
|
|
58
|
+
|
|
59
|
+
* **Settings Number controls** (#1825, e.g. Tab Size): Tab now commits and exits the input; clicking the value cell enters edit mode (matches Enter).
|
|
60
|
+
|
|
61
|
+
* **Plugin keybinding labels refresh on every prompt open** so plugins surfacing key hints ("`Alt+P` to cycle", overlay headers, etc.) reflect mid-session rebinds without restart.
|
|
62
|
+
|
|
63
|
+
* **New plugin hook `after_file_explorer_change`** fires on FS-mutating explorer actions (Duplicate, Paste, New File, Rename, Delete) so plugins like git_explorer can refresh badges immediately.
|
|
64
|
+
|
|
65
|
+
* **Theme picker consistency**: The Theme Editor plugin's picker now shows the same set of themes as the native `Select Theme` prompt — no more divergence from a separate `cwd/themes` scan or normalization mismatches. New plugin API `editor.getAllThemes()` returns the cached map directly so plugins can drop their own filesystem walks.
|
|
66
|
+
|
|
67
|
+
### Bug Fixes
|
|
68
|
+
|
|
69
|
+
* **Crash fixes**: `Option::unwrap()` panic when pasting in the Theme Editor (event apply used the wrong split). `DeleteBackward` panics on stale cursor state in vi-mode count prefixes and plugin action batches. Theme editor crash on the new `terminal` theme's modifier fields. Embedded-plugin extraction race across concurrent test processes.
|
|
70
|
+
|
|
71
|
+
* **Search** (#1537, reported by @pstahle): `Find Selection Next/Previous` on a non-word character (e.g. `}` after goto-matching-bracket) no longer hijacks the search query — it now navigates the existing search instead.
|
|
72
|
+
|
|
73
|
+
* **OpenLine (Emacs `C-o`)**: Cursor stays on the original line instead of advancing — was previously indistinguishable from Enter.
|
|
74
|
+
|
|
75
|
+
* **Markdown compose** (#1789, #1790): Wrap budget widened by one column to prevent orphan-word re-wrapping on Windows; current-line highlight now extends across soft-wrapped sub-rows.
|
|
76
|
+
|
|
77
|
+
* **Viewport** (#1794): Popup anchoring counts true visual rows under wrap, so completion popups appear next to the cursor instead of several rows above in heavily-wrapped buffers.
|
|
78
|
+
|
|
79
|
+
### Under the Hood
|
|
80
|
+
|
|
81
|
+
* **Smaller release binaries**: New `dist` cargo profile (`strip=true`, `lto=fat`, `codegen-units=1`, `opt-level=z`) is now applied to release builds. Binary shrinks from 62.4 MB → ~46 MB (-26%). Backtraces are still included in panics.
|
|
82
|
+
|
|
83
|
+
* **Build performance**: `oxc` and `rquickjs` now build at `opt-level=3` in dev/test profiles to keep iteration fast despite their size.
|
|
84
|
+
|
|
85
|
+
* **Semantic test framework + ~250 migrated cases**: A new "scenario" test layer dispatches `Action`s straight against an isolated editor instance, skipping plugin loading where the assertion surface (buffer text + caret) can't observe it — about 440 ms saved per test harness. ~250 e2e claims have been migrated across multicursor, block selection, auto-indent, paste, undo/redo, search-modal flows, multibyte handling, and many regression repros (issues #191, #1147, #1305, #1574, #1697, etc.). Property-based theorems over generated action sequences caught two real production crashes in no-render dispatch paths (vi-mode count prefixes, plugin action batches) — both fixed in this release. A pre-existing race in concurrent embedded-plugin extraction (could leave half-written plugins for parallel test processes) is also fixed.
|
|
86
|
+
|
|
3
87
|
## 0.3.2
|
|
4
88
|
|
|
5
89
|
### Features
|
package/package.json
CHANGED
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
"$ref": "#/$defs/EditorConfig",
|
|
32
32
|
"default": {
|
|
33
33
|
"animations": true,
|
|
34
|
+
"cursor_jump_animation": true,
|
|
34
35
|
"line_numbers": true,
|
|
35
36
|
"relative_line_numbers": false,
|
|
36
37
|
"highlight_current_line": true,
|
|
@@ -247,7 +248,8 @@
|
|
|
247
248
|
"dark",
|
|
248
249
|
"light",
|
|
249
250
|
"high-contrast",
|
|
250
|
-
"nostalgia"
|
|
251
|
+
"nostalgia",
|
|
252
|
+
"terminal"
|
|
251
253
|
]
|
|
252
254
|
},
|
|
253
255
|
"LocaleOptions": {
|
|
@@ -280,6 +282,12 @@
|
|
|
280
282
|
"default": true,
|
|
281
283
|
"x-section": "Display"
|
|
282
284
|
},
|
|
285
|
+
"cursor_jump_animation": {
|
|
286
|
+
"description": "Enable the cursor-jump trail animation on long cursor moves\n(search jumps, go-to-definition, pane switches). Has no effect\nwhen `animations` is `false`.",
|
|
287
|
+
"type": "boolean",
|
|
288
|
+
"default": true,
|
|
289
|
+
"x-section": "Display"
|
|
290
|
+
},
|
|
283
291
|
"line_numbers": {
|
|
284
292
|
"description": "Show line numbers in the gutter (default for new buffers)",
|
|
285
293
|
"type": "boolean",
|
|
@@ -126,6 +126,10 @@ const finder = new Finder<DiagnosticItem>(editor, {
|
|
|
126
126
|
groupBy: "file",
|
|
127
127
|
syncWithEditor: true,
|
|
128
128
|
navigateOnCursorMove: true,
|
|
129
|
+
// Diagnostics is a generic "list of locations" UX — route into
|
|
130
|
+
// the shared Utility Dock so it shares space with Quickfix,
|
|
131
|
+
// search-replace results, etc. See issue #1796.
|
|
132
|
+
useUtilityDock: true,
|
|
129
133
|
onClose: () => {
|
|
130
134
|
isOpen = false;
|
|
131
135
|
sourceBufferId = null;
|
|
@@ -40,6 +40,10 @@ const finder = new Finder<ReferenceLocation>(editor, {
|
|
|
40
40
|
},
|
|
41
41
|
preview: true,
|
|
42
42
|
maxResults: 100,
|
|
43
|
+
// Find References is a generic "list of locations" UX — share
|
|
44
|
+
// the Utility Dock with Diagnostics, Quickfix, search-replace
|
|
45
|
+
// results, etc. See issue #1796.
|
|
46
|
+
useUtilityDock: true,
|
|
43
47
|
});
|
|
44
48
|
|
|
45
49
|
// Pending references for the current prompt
|
package/plugins/git_explorer.ts
CHANGED
|
@@ -117,9 +117,14 @@ async function refreshGitExplorerDecorations() {
|
|
|
117
117
|
return;
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
+
// -z gives NUL-terminated, raw (unquoted) paths. Without it git
|
|
121
|
+
// wraps any path containing spaces or special chars in double
|
|
122
|
+
// quotes (e.g. `?? "name copy.txt"`), which the parser would then
|
|
123
|
+
// key the decoration against — meaning the actual on-disk path
|
|
124
|
+
// never matches and the badge never appears next to the file.
|
|
120
125
|
const statusResult = await editor.spawnProcess(
|
|
121
126
|
"git",
|
|
122
|
-
["status", "--porcelain"],
|
|
127
|
+
["status", "--porcelain", "-z"],
|
|
123
128
|
repoRoot
|
|
124
129
|
);
|
|
125
130
|
if (statusResult.exit_code !== 0) {
|
|
@@ -155,6 +160,9 @@ editor.on("after_file_open", () => {
|
|
|
155
160
|
editor.on("after_file_save", () => {
|
|
156
161
|
refreshGitExplorerDecorations();
|
|
157
162
|
});
|
|
163
|
+
editor.on("after_file_explorer_change", () => {
|
|
164
|
+
refreshGitExplorerDecorations();
|
|
165
|
+
});
|
|
158
166
|
editor.on("editor_initialized", () => {
|
|
159
167
|
refreshGitExplorerDecorations();
|
|
160
168
|
});
|
package/plugins/lib/finder.ts
CHANGED
|
@@ -118,6 +118,21 @@ export interface FinderConfig<T> {
|
|
|
118
118
|
|
|
119
119
|
/** Called when the panel or prompt is closed (e.g. via Escape) */
|
|
120
120
|
onClose?: () => void;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* When true, panels created by this Finder are routed into the
|
|
124
|
+
* shared Utility Dock (issue #1796 / Section 2 of
|
|
125
|
+
* `docs/internal/tui-editor-layout-design.md`). The first
|
|
126
|
+
* dock-aware utility creates the dock leaf; subsequent ones swap
|
|
127
|
+
* the dock's active buffer instead of spawning new splits.
|
|
128
|
+
*
|
|
129
|
+
* Defaults to `false` so panels with bespoke layouts (e.g.
|
|
130
|
+
* `theme_editor`'s buffer groups, `pkg`'s side-by-side panes)
|
|
131
|
+
* keep their independent split. Plugins that present a generic
|
|
132
|
+
* "list of locations" UX (Diagnostics, Find References, Live
|
|
133
|
+
* Grep Quickfix) should opt in.
|
|
134
|
+
*/
|
|
135
|
+
useUtilityDock?: boolean;
|
|
121
136
|
}
|
|
122
137
|
|
|
123
138
|
/**
|
|
@@ -128,6 +143,14 @@ export interface PromptOptions<T> {
|
|
|
128
143
|
source: SearchSource<T> | FilterSource<T>;
|
|
129
144
|
/** Initial query value */
|
|
130
145
|
initialQuery?: string;
|
|
146
|
+
/**
|
|
147
|
+
* Render the prompt as a centred floating overlay with an
|
|
148
|
+
* embedded preview pane (issue #1796). When true, the editor
|
|
149
|
+
* draws the input + results + preview inside one floating frame
|
|
150
|
+
* over the editor area; the underlying split tree is not
|
|
151
|
+
* mutated. Defaults to false.
|
|
152
|
+
*/
|
|
153
|
+
floatingOverlay?: boolean;
|
|
131
154
|
}
|
|
132
155
|
|
|
133
156
|
/**
|
|
@@ -277,7 +300,16 @@ export function defaultFuzzyFilter<T>(
|
|
|
277
300
|
// ============================================================================
|
|
278
301
|
|
|
279
302
|
/**
|
|
280
|
-
* Parse a grep-style output line
|
|
303
|
+
* Parse a grep-style output line.
|
|
304
|
+
*
|
|
305
|
+
* Accepts both `file:line:column:content` (ripgrep, ag, git-grep with
|
|
306
|
+
* `--column`, GNU grep with `--column`) and `file:line:content`
|
|
307
|
+
* (POSIX grep, BSD grep, plenty of custom wrappers that omit the
|
|
308
|
+
* column). When the column is missing it defaults to 1.
|
|
309
|
+
*
|
|
310
|
+
* Returns null only if the line lacks even a `file:line:` prefix —
|
|
311
|
+
* pure header lines (ripgrep without `--no-heading`, blank lines)
|
|
312
|
+
* are filtered upstream by the caller's `if (!line.trim()) continue`.
|
|
281
313
|
*/
|
|
282
314
|
export function parseGrepLine(line: string): {
|
|
283
315
|
file: string;
|
|
@@ -285,13 +317,25 @@ export function parseGrepLine(line: string): {
|
|
|
285
317
|
column: number;
|
|
286
318
|
content: string;
|
|
287
319
|
} | null {
|
|
288
|
-
|
|
289
|
-
|
|
320
|
+
// Try the four-field shape first so a content payload that
|
|
321
|
+
// happens to start with digits (e.g. `42 = solve(...)`) doesn't
|
|
322
|
+
// get mistaken for a column number under the three-field path.
|
|
323
|
+
const four = line.match(/^([^:]+):(\d+):(\d+):(.*)$/);
|
|
324
|
+
if (four) {
|
|
290
325
|
return {
|
|
291
|
-
file:
|
|
292
|
-
line: parseInt(
|
|
293
|
-
column: parseInt(
|
|
294
|
-
content:
|
|
326
|
+
file: four[1],
|
|
327
|
+
line: parseInt(four[2], 10),
|
|
328
|
+
column: parseInt(four[3], 10),
|
|
329
|
+
content: four[4],
|
|
330
|
+
};
|
|
331
|
+
}
|
|
332
|
+
const three = line.match(/^([^:]+):(\d+):(.*)$/);
|
|
333
|
+
if (three) {
|
|
334
|
+
return {
|
|
335
|
+
file: three[1],
|
|
336
|
+
line: parseInt(three[2], 10),
|
|
337
|
+
column: 1,
|
|
338
|
+
content: three[3],
|
|
295
339
|
};
|
|
296
340
|
}
|
|
297
341
|
return null;
|
|
@@ -465,20 +509,42 @@ export class Finder<T> {
|
|
|
465
509
|
}
|
|
466
510
|
|
|
467
511
|
// Start the prompt
|
|
512
|
+
const overlay = options.floatingOverlay === true;
|
|
468
513
|
if (options.initialQuery) {
|
|
469
514
|
this.editor.startPromptWithInitial(
|
|
470
515
|
options.title,
|
|
471
516
|
this.config.id,
|
|
472
|
-
options.initialQuery
|
|
517
|
+
options.initialQuery,
|
|
518
|
+
overlay
|
|
473
519
|
);
|
|
474
520
|
} else {
|
|
475
|
-
this.editor.debug(`[Finder] calling startPrompt with title="${options.title}", id="${this.config.id}"`);
|
|
476
|
-
const result = this.editor.startPrompt(options.title, this.config.id);
|
|
521
|
+
this.editor.debug(`[Finder] calling startPrompt with title="${options.title}", id="${this.config.id}", overlay=${overlay}`);
|
|
522
|
+
const result = this.editor.startPrompt(options.title, this.config.id, overlay);
|
|
477
523
|
this.editor.debug(`[Finder] startPrompt returned: ${result}`);
|
|
478
524
|
}
|
|
479
525
|
this.editor.setStatus("Type to search...");
|
|
480
526
|
}
|
|
481
527
|
|
|
528
|
+
/**
|
|
529
|
+
* Re-run the current search against `lastQuery`, bypassing the
|
|
530
|
+
* "skip-if-same-query" dedup. Useful when the *backend* has
|
|
531
|
+
* changed (e.g. user cycled Live Grep providers) and the same
|
|
532
|
+
* query needs to produce different results.
|
|
533
|
+
*
|
|
534
|
+
* No-op for filter-mode sources (results are already correct
|
|
535
|
+
* client-side) and when no prompt is open.
|
|
536
|
+
*/
|
|
537
|
+
async refresh(): Promise<void> {
|
|
538
|
+
if (!this.isPromptMode || !this.currentSource) return;
|
|
539
|
+
if (this.currentSource.mode !== "search") return;
|
|
540
|
+
const query = this.promptState.lastQuery;
|
|
541
|
+
// Reset dedup so runSearch doesn't short-circuit on the
|
|
542
|
+
// unchanged query.
|
|
543
|
+
this.promptState.lastQuery = "";
|
|
544
|
+
if (query.length === 0) return;
|
|
545
|
+
await this.runSearch(query, this.currentSource);
|
|
546
|
+
}
|
|
547
|
+
|
|
482
548
|
/**
|
|
483
549
|
* Show static results in panel
|
|
484
550
|
*/
|
|
@@ -1095,6 +1161,11 @@ export class Finder<T> {
|
|
|
1095
1161
|
ratio,
|
|
1096
1162
|
direction: "horizontal",
|
|
1097
1163
|
panelId: this.config.id,
|
|
1164
|
+
// Per-finder opt-in via `useUtilityDock` — many Finder
|
|
1165
|
+
// consumers (theme_editor's buffer groups, pkg's side-by-
|
|
1166
|
+
// side panes, …) need their own independent splits and
|
|
1167
|
+
// would break if routed into the shared dock.
|
|
1168
|
+
...(this.config.useUtilityDock ? { role: "utility_dock" } : {}),
|
|
1098
1169
|
showLineNumbers: false,
|
|
1099
1170
|
showCursors: true,
|
|
1100
1171
|
editingDisabled: true,
|
package/plugins/lib/fresh.d.ts
CHANGED
|
@@ -821,6 +821,13 @@ type CreateVirtualBufferInSplitOptions = {
|
|
|
821
821
|
* Initial content entries with optional properties
|
|
822
822
|
*/
|
|
823
823
|
entries?: Array<TextPropertyEntry>;
|
|
824
|
+
/**
|
|
825
|
+
* Split role tag. When set to `"utility_dock"`, the dispatcher
|
|
826
|
+
* routes this buffer to the existing dock leaf if one exists,
|
|
827
|
+
* instead of creating a new split. See
|
|
828
|
+
* `docs/internal/tui-editor-layout-design.md` Section 2.
|
|
829
|
+
*/
|
|
830
|
+
role?: string;
|
|
824
831
|
};
|
|
825
832
|
type CreateVirtualBufferOptions = {
|
|
826
833
|
/**
|
|
@@ -1458,6 +1465,11 @@ interface EditorAPI {
|
|
|
1458
1465
|
*/
|
|
1459
1466
|
getBuiltinThemes(): unknown;
|
|
1460
1467
|
/**
|
|
1468
|
+
* Full theme registry (builtins + user themes + packages + bundles).
|
|
1469
|
+
* Keyed by canonical registry key; each value carries `_key` / `_pack`.
|
|
1470
|
+
*/
|
|
1471
|
+
getAllThemes(): unknown;
|
|
1472
|
+
/**
|
|
1461
1473
|
* Delete a custom theme (alias for deleteThemeSync)
|
|
1462
1474
|
*/
|
|
1463
1475
|
deleteTheme(name: string): boolean;
|
|
@@ -1668,9 +1680,15 @@ interface EditorAPI {
|
|
|
1668
1680
|
*/
|
|
1669
1681
|
prompt(label: string, initialValue: string): Promise<string | null>;
|
|
1670
1682
|
/**
|
|
1671
|
-
* Start an interactive prompt
|
|
1683
|
+
* Start an interactive prompt.
|
|
1684
|
+
*
|
|
1685
|
+
* When `floatingOverlay` is true, the editor renders the prompt
|
|
1686
|
+
* and its suggestions inside a centred floating frame instead of
|
|
1687
|
+
* the bottom minibuffer row (issue #1796 — Live Grep). The flag
|
|
1688
|
+
* is rendering-only; confirm/cancel/hooks behave identically to a
|
|
1689
|
+
* non-overlay prompt of the same `promptType`.
|
|
1672
1690
|
*/
|
|
1673
|
-
startPrompt(label: string, promptType: string): boolean;
|
|
1691
|
+
startPrompt(label: string, promptType: string, floatingOverlay?: boolean): boolean;
|
|
1674
1692
|
/**
|
|
1675
1693
|
* Begin a key-capture window for the calling plugin.
|
|
1676
1694
|
*
|
|
@@ -1704,9 +1722,10 @@ interface EditorAPI {
|
|
|
1704
1722
|
*/
|
|
1705
1723
|
getNextKey(): Promise<KeyEventPayload>;
|
|
1706
1724
|
/**
|
|
1707
|
-
* Start a prompt with initial value
|
|
1725
|
+
* Start a prompt with initial value. See `startPrompt` for the
|
|
1726
|
+
* meaning of `floatingOverlay`.
|
|
1708
1727
|
*/
|
|
1709
|
-
startPromptWithInitial(label: string, promptType: string, initialValue: string): boolean;
|
|
1728
|
+
startPromptWithInitial(label: string, promptType: string, initialValue: string, floatingOverlay?: boolean): boolean;
|
|
1710
1729
|
/**
|
|
1711
1730
|
* Set suggestions for the current prompt
|
|
1712
1731
|
*
|
|
@@ -1715,6 +1734,13 @@ interface EditorAPI {
|
|
|
1715
1734
|
setPromptSuggestions(suggestions: PromptSuggestion[]): boolean;
|
|
1716
1735
|
setPromptInputSync(sync: boolean): boolean;
|
|
1717
1736
|
/**
|
|
1737
|
+
* Set the title shown in the floating-overlay prompt's frame
|
|
1738
|
+
* header (issue #1796). Pass `null` or omit the argument to
|
|
1739
|
+
* clear the title and fall back to the default. Has no
|
|
1740
|
+
* visible effect on non-overlay prompts.
|
|
1741
|
+
*/
|
|
1742
|
+
setPromptTitle(title?: string | null): boolean;
|
|
1743
|
+
/**
|
|
1718
1744
|
* Define a buffer mode (takes bindings as array of [key, command] pairs)
|
|
1719
1745
|
*/
|
|
1720
1746
|
defineMode(name: string, bindingsArr: string[][], readOnly?: boolean, allowTextInput?: boolean, inheritNormalBindings?: boolean): boolean;
|
|
@@ -2099,6 +2125,16 @@ interface HookEventMap {
|
|
|
2099
2125
|
path: string;
|
|
2100
2126
|
buffer_id: number;
|
|
2101
2127
|
};
|
|
2128
|
+
/**
|
|
2129
|
+
* Fired by the file explorer after a paste/duplicate/etc. mutates
|
|
2130
|
+
* the filesystem without going through a buffer save. Plugins that
|
|
2131
|
+
* surface FS-derived state (git status badges, etc.) should
|
|
2132
|
+
* subscribe in addition to `after_file_save` to refresh on
|
|
2133
|
+
* explorer-driven changes too.
|
|
2134
|
+
*/
|
|
2135
|
+
after_file_explorer_change: {
|
|
2136
|
+
path: string;
|
|
2137
|
+
};
|
|
2102
2138
|
// ── text edits ───────────────────────────────────────────────────────────
|
|
2103
2139
|
before_insert: {
|
|
2104
2140
|
buffer_id: number;
|
|
@@ -10,7 +10,9 @@
|
|
|
10
10
|
"status.opened_file": "Opened %{file}:%{line}",
|
|
11
11
|
"status.no_file_selected": "No file selected",
|
|
12
12
|
"status.cancelled": "Live grep cancelled",
|
|
13
|
-
"prompt.live_grep": "Live grep: "
|
|
13
|
+
"prompt.live_grep": "Live grep: ",
|
|
14
|
+
"cmd.live_grep_cycle_provider": "Live Grep: Cycle Provider",
|
|
15
|
+
"cmd.live_grep_cycle_provider_desc": "Switch to the next available Live Grep search backend (rg, ag, git-grep, ack, fff, grep)"
|
|
14
16
|
},
|
|
15
17
|
"cs": {
|
|
16
18
|
"cmd.live_grep": "Live Grep (Hledat v souborech)",
|
|
@@ -23,7 +25,9 @@
|
|
|
23
25
|
"status.opened_file": "Otevreno %{file}:%{line}",
|
|
24
26
|
"status.no_file_selected": "Zaden soubor nevybran",
|
|
25
27
|
"status.cancelled": "Live grep zrusen",
|
|
26
|
-
"prompt.live_grep": "Live grep: "
|
|
28
|
+
"prompt.live_grep": "Live grep: ",
|
|
29
|
+
"cmd.live_grep_cycle_provider": "Live Grep: Cycle Provider",
|
|
30
|
+
"cmd.live_grep_cycle_provider_desc": "Switch to the next available Live Grep search backend (rg, ag, git-grep, ack, fff, grep)"
|
|
27
31
|
},
|
|
28
32
|
"de": {
|
|
29
33
|
"cmd.live_grep": "Live Grep (Suche in Dateien)",
|
|
@@ -36,7 +40,9 @@
|
|
|
36
40
|
"status.opened_file": "%{file}:%{line} geoffnet",
|
|
37
41
|
"status.no_file_selected": "Keine Datei ausgewahlt",
|
|
38
42
|
"status.cancelled": "Live Grep abgebrochen",
|
|
39
|
-
"prompt.live_grep": "Live Grep: "
|
|
43
|
+
"prompt.live_grep": "Live Grep: ",
|
|
44
|
+
"cmd.live_grep_cycle_provider": "Live Grep: Cycle Provider",
|
|
45
|
+
"cmd.live_grep_cycle_provider_desc": "Switch to the next available Live Grep search backend (rg, ag, git-grep, ack, fff, grep)"
|
|
40
46
|
},
|
|
41
47
|
"es": {
|
|
42
48
|
"cmd.live_grep": "Grep en Vivo (Buscar en Archivos)",
|
|
@@ -49,7 +55,9 @@
|
|
|
49
55
|
"status.opened_file": "Abierto %{file}:%{line}",
|
|
50
56
|
"status.no_file_selected": "Ningun archivo seleccionado",
|
|
51
57
|
"status.cancelled": "Grep en vivo cancelado",
|
|
52
|
-
"prompt.live_grep": "Grep en vivo: "
|
|
58
|
+
"prompt.live_grep": "Grep en vivo: ",
|
|
59
|
+
"cmd.live_grep_cycle_provider": "Live Grep: Cycle Provider",
|
|
60
|
+
"cmd.live_grep_cycle_provider_desc": "Switch to the next available Live Grep search backend (rg, ag, git-grep, ack, fff, grep)"
|
|
53
61
|
},
|
|
54
62
|
"fr": {
|
|
55
63
|
"cmd.live_grep": "Grep en Direct (Rechercher dans les Fichiers)",
|
|
@@ -62,7 +70,9 @@
|
|
|
62
70
|
"status.opened_file": "Ouvert %{file}:%{line}",
|
|
63
71
|
"status.no_file_selected": "Aucun fichier selectionne",
|
|
64
72
|
"status.cancelled": "Grep en direct annule",
|
|
65
|
-
"prompt.live_grep": "Grep en direct : "
|
|
73
|
+
"prompt.live_grep": "Grep en direct : ",
|
|
74
|
+
"cmd.live_grep_cycle_provider": "Live Grep: Cycle Provider",
|
|
75
|
+
"cmd.live_grep_cycle_provider_desc": "Switch to the next available Live Grep search backend (rg, ag, git-grep, ack, fff, grep)"
|
|
66
76
|
},
|
|
67
77
|
"it": {
|
|
68
78
|
"cmd.live_grep": "Live Grep (Cerca nei file)",
|
|
@@ -75,7 +85,9 @@
|
|
|
75
85
|
"status.opened_file": "Aperto %{file}:%{line}",
|
|
76
86
|
"status.no_file_selected": "Nessun file selezionato",
|
|
77
87
|
"status.cancelled": "Live grep annullato",
|
|
78
|
-
"prompt.live_grep": "Live grep: "
|
|
88
|
+
"prompt.live_grep": "Live grep: ",
|
|
89
|
+
"cmd.live_grep_cycle_provider": "Live Grep: Cycle Provider",
|
|
90
|
+
"cmd.live_grep_cycle_provider_desc": "Switch to the next available Live Grep search backend (rg, ag, git-grep, ack, fff, grep)"
|
|
79
91
|
},
|
|
80
92
|
"ja": {
|
|
81
93
|
"cmd.live_grep": "Live Grep (ファイル内検索)",
|
|
@@ -88,7 +100,9 @@
|
|
|
88
100
|
"status.opened_file": "%{file}:%{line} を開きました",
|
|
89
101
|
"status.no_file_selected": "ファイルが選択されていません",
|
|
90
102
|
"status.cancelled": "Live grep がキャンセルされました",
|
|
91
|
-
"prompt.live_grep": "Live grep: "
|
|
103
|
+
"prompt.live_grep": "Live grep: ",
|
|
104
|
+
"cmd.live_grep_cycle_provider": "Live Grep: Cycle Provider",
|
|
105
|
+
"cmd.live_grep_cycle_provider_desc": "Switch to the next available Live Grep search backend (rg, ag, git-grep, ack, fff, grep)"
|
|
92
106
|
},
|
|
93
107
|
"ko": {
|
|
94
108
|
"cmd.live_grep": "라이브 Grep (파일에서 찾기)",
|
|
@@ -101,7 +115,9 @@
|
|
|
101
115
|
"status.opened_file": "%{file}:%{line} 열림",
|
|
102
116
|
"status.no_file_selected": "선택된 파일 없음",
|
|
103
117
|
"status.cancelled": "라이브 grep 취소됨",
|
|
104
|
-
"prompt.live_grep": "라이브 grep: "
|
|
118
|
+
"prompt.live_grep": "라이브 grep: ",
|
|
119
|
+
"cmd.live_grep_cycle_provider": "Live Grep: Cycle Provider",
|
|
120
|
+
"cmd.live_grep_cycle_provider_desc": "Switch to the next available Live Grep search backend (rg, ag, git-grep, ack, fff, grep)"
|
|
105
121
|
},
|
|
106
122
|
"pt-BR": {
|
|
107
123
|
"cmd.live_grep": "Grep ao Vivo (Buscar em Arquivos)",
|
|
@@ -114,7 +130,9 @@
|
|
|
114
130
|
"status.opened_file": "Aberto %{file}:%{line}",
|
|
115
131
|
"status.no_file_selected": "Nenhum arquivo selecionado",
|
|
116
132
|
"status.cancelled": "Grep ao vivo cancelado",
|
|
117
|
-
"prompt.live_grep": "Grep ao vivo: "
|
|
133
|
+
"prompt.live_grep": "Grep ao vivo: ",
|
|
134
|
+
"cmd.live_grep_cycle_provider": "Live Grep: Cycle Provider",
|
|
135
|
+
"cmd.live_grep_cycle_provider_desc": "Switch to the next available Live Grep search backend (rg, ag, git-grep, ack, fff, grep)"
|
|
118
136
|
},
|
|
119
137
|
"ru": {
|
|
120
138
|
"cmd.live_grep": "Live Grep (Поиск в файлах)",
|
|
@@ -127,7 +145,9 @@
|
|
|
127
145
|
"status.opened_file": "Открыт %{file}:%{line}",
|
|
128
146
|
"status.no_file_selected": "Файл не выбран",
|
|
129
147
|
"status.cancelled": "Live grep отменен",
|
|
130
|
-
"prompt.live_grep": "Live grep: "
|
|
148
|
+
"prompt.live_grep": "Live grep: ",
|
|
149
|
+
"cmd.live_grep_cycle_provider": "Live Grep: Cycle Provider",
|
|
150
|
+
"cmd.live_grep_cycle_provider_desc": "Switch to the next available Live Grep search backend (rg, ag, git-grep, ack, fff, grep)"
|
|
131
151
|
},
|
|
132
152
|
"th": {
|
|
133
153
|
"cmd.live_grep": "Live Grep (ค้นหาในไฟล์)",
|
|
@@ -140,7 +160,9 @@
|
|
|
140
160
|
"status.opened_file": "เปิดแล้ว %{file}:%{line}",
|
|
141
161
|
"status.no_file_selected": "ไม่ได้เลือกไฟล์",
|
|
142
162
|
"status.cancelled": "ยกเลิก Live grep แล้ว",
|
|
143
|
-
"prompt.live_grep": "Live grep: "
|
|
163
|
+
"prompt.live_grep": "Live grep: ",
|
|
164
|
+
"cmd.live_grep_cycle_provider": "Live Grep: Cycle Provider",
|
|
165
|
+
"cmd.live_grep_cycle_provider_desc": "Switch to the next available Live Grep search backend (rg, ag, git-grep, ack, fff, grep)"
|
|
144
166
|
},
|
|
145
167
|
"uk": {
|
|
146
168
|
"cmd.live_grep": "Live Grep (Пошук у файлах)",
|
|
@@ -153,7 +175,9 @@
|
|
|
153
175
|
"status.opened_file": "Відкрито %{file}:%{line}",
|
|
154
176
|
"status.no_file_selected": "Файл не вибрано",
|
|
155
177
|
"status.cancelled": "Live grep скасовано",
|
|
156
|
-
"prompt.live_grep": "Live grep: "
|
|
178
|
+
"prompt.live_grep": "Live grep: ",
|
|
179
|
+
"cmd.live_grep_cycle_provider": "Live Grep: Cycle Provider",
|
|
180
|
+
"cmd.live_grep_cycle_provider_desc": "Switch to the next available Live Grep search backend (rg, ag, git-grep, ack, fff, grep)"
|
|
157
181
|
},
|
|
158
182
|
"vi": {
|
|
159
183
|
"cmd.live_grep": "Live Grep (Tìm trong tệp)",
|
|
@@ -166,7 +190,9 @@
|
|
|
166
190
|
"status.opened_file": "Đã mở %{file}:%{line}",
|
|
167
191
|
"status.no_file_selected": "Chưa chọn tệp",
|
|
168
192
|
"status.cancelled": "Đã hủy live grep",
|
|
169
|
-
"prompt.live_grep": "Live grep: "
|
|
193
|
+
"prompt.live_grep": "Live grep: ",
|
|
194
|
+
"cmd.live_grep_cycle_provider": "Live Grep: Cycle Provider",
|
|
195
|
+
"cmd.live_grep_cycle_provider_desc": "Switch to the next available Live Grep search backend (rg, ag, git-grep, ack, fff, grep)"
|
|
170
196
|
},
|
|
171
197
|
"zh-CN": {
|
|
172
198
|
"cmd.live_grep": "实时 Grep (文件内搜索)",
|
|
@@ -179,6 +205,8 @@
|
|
|
179
205
|
"status.opened_file": "已打开 %{file}:%{line}",
|
|
180
206
|
"status.no_file_selected": "未选择文件",
|
|
181
207
|
"status.cancelled": "实时 grep 已取消",
|
|
182
|
-
"prompt.live_grep": "实时 grep: "
|
|
208
|
+
"prompt.live_grep": "实时 grep: ",
|
|
209
|
+
"cmd.live_grep_cycle_provider": "Live Grep: Cycle Provider",
|
|
210
|
+
"cmd.live_grep_cycle_provider_desc": "Switch to the next available Live Grep search backend (rg, ag, git-grep, ack, fff, grep)"
|
|
183
211
|
}
|
|
184
212
|
}
|