You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow-up cleanup on the indentation-guides feature from code review:
- Reuse indent-based folding (find_fold_range_at_byte) for active-mode
block detection instead of hand-coded {([:/} delimiter heuristics, so a
guide spans exactly the rows the matching fold would hide. Probe with the
cursor's line-start byte so a cursor past a block's last-line indent still
resolves its enclosing block.
- Compute all-mode guide columns with a monotonic indentation-staircase
scanner walked once over the viewport: O(n) instead of O(n^2), and two
depth-bounded reused buffers instead of a per-frame Vec<Vec<usize>>. The
scan is skipped entirely unless mode is `all`.
- Draw guides continuously through whitespace-only lines (matching active
mode) rather than leaving a one-row gap.
- Reuse indent_folding::slice_indent for indent measurement, deleting the
two bespoke indent helpers.
- Drop the two hardcoded settings-ordering functions; settings sort
alphabetically like the rest.
- Drop the unrelated humanizeSchemaName refactor from theme_editor.ts.
- Rename the config key indentation_guides -> indentation_guide and
regenerate config-schema.json.
Give CellPassInput/CellPass a second lifetime so the per-row guide-column
slice can borrow the reused buffer independently of the render-wide
lifetime. Active-mode tests rewritten for the new pure-indent model; adds
unit + e2e coverage for guides through blank lines.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: crates/fresh-editor/plugins/config-schema.json
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -79,7 +79,7 @@
79
79
"terminal_auto_title": true,
80
80
"cursor_style": "default",
81
81
"rulers": [],
82
-
"indentation_guides": "none",
82
+
"indentation_guide": "none",
83
83
"indentation_guide_glyph": "▏",
84
84
"whitespace_show": true,
85
85
"whitespace_spaces_leading": false,
@@ -581,7 +581,7 @@
581
581
"default": [],
582
582
"x-section": "Display"
583
583
},
584
-
"indentation_guides": {
584
+
"indentation_guide": {
585
585
"description": "Vertical indentation guide rendering mode.\nGuides are drawn at indentation levels derived from the active buffer's\ntab size. They replace existing leading whitespace cells visually only;\nbuffer text, cursor positions, and mouse mappings are unchanged.\nModes:\n- `none`: disable indentation guides.\n- `all`: draw every indentation level in leading whitespace.\n- `active`: draw only the innermost guide for the cursor's current\n indentation block.\nDefault: none",
0 commit comments