Code-overview minimap on the right edge of each editor pane: a scaled-down rendering of the
whole file with the viewport highlighted, click/drag to scroll.
Rewritten 2026-08-31. Three changes from the previous revision: the TUI rendering
technique is now braille (not block-character approximation), the GTK technique is
stated as font scaling rather than "Cairo scaled rendering", and the on/off setting is
a hard requirement with its own acceptance criteria, not a bullet under "Features". The
quadraui-first design is unchanged and is still the point of the issue. The "Key files"
list was also stale — render.rs and the backends moved.
Features
- Click/drag to scroll the main editor
- Syntax-coloured (dominant colour per rendered region)
- Off/on via a
minimap setting — see The setting below
Backends
| backend |
technique |
density |
| GTK |
font scaling — real glyphs via Pango at a scaled-down absolute size (VS Code's minimap.renderCharacters: true), with a colour-bar fallback below the legibility floor |
1 buffer line per ~2–6 px row |
| TUI |
braille — U+2800 dot cells, 2 dots wide × 4 tall per terminal cell |
4 buffer lines per terminal row |
Win-GUI |
out of scope until the Win backend ships in quadraui |
|
Braille replaces the previous "block-character approximation, 1 cell per minimap line". It is
8× denser, and quadraui already has a working dot-packing implementation to lift from
(quadraui/src/tui/chart.rs:158–:245, incl. the BRAILLE_OFFSETS bit table), so this is
cheaper and better than what it replaces.
Design: quadraui-first (platform-neutral) — the whole point of this issue
This feature must not add substantive logic to src/gtk/ or src/tui_main/. All scale
math, line sampling, colour aggregation and dot packing live in quadraui.
-
quadraui prerequisite — quadraui#382 (Minimap primitive + both rasterisers):
Minimap descriptor, Minimap::layout(), Backend::draw_minimap(), sample_lines(),
aggregate_spans(), reserved_width(). Note that aggregate_spans aggregates per
cell, not per line — a braille cell carries one foreground colour across 4 buffer
lines, so per-line colours would force the TUI backend to re-reduce them, which is exactly
the platform-specific arithmetic this design forbids.
-
vimcode side (after the primitive lands and the pin is bumped):
build_minimap_data() in src/render.rs — samples lines, hands syntax spans to
aggregate_spans, builds the Minimap. Returns None when the setting is off.
ScreenLayout (src/render.rs:4239) gains minimap: Option<RenderedMinimap>.
- Editor content width comes from
quadraui::minimap::reserved_width(..) in both
backends — do not compute the reclaimed width twice.
- Each backend calls
backend.draw_minimap(rect, &minimap). Thin wiring only.
- Click/drag routes through the existing
ClickTarget system → standard scroll commands.
The setting (required)
A minimap: bool option, defaulting to on, following the indent_guides precedent
exactly. In src/core/settings.rs that is eight sites — the option plumbing here is a
checklist, and missing one produces an option that works from :set but not from the
settings UI (or vice versa):
| what |
indent_guides reference |
field + #[serde(default = ...)] |
:296 |
default_minimap() |
:339 |
entry in the Default construction |
:788 |
parse_set_option boolean branch (minimap / nominimap) |
:1082 |
:set minimap? query form |
:1342 |
| get-by-key string |
:1475 |
| set-by-key string |
:1589 |
SettingDef { key, label, description, category: "Editor", setting_type: Bool } registry entry |
:2038 |
Both spellings (minimap and nominimap) must work, and the setting must take effect on the
next paint without a restart — the editor reclaims the minimap's width when it is turned off.
Key files
src/render.rs — build_minimap_data(), ScreenLayout.minimap (:4239)
src/core/settings.rs — the eight sites above
src/gtk/mod.rs — thin draw_minimap wiring
src/tui_main/render_impl.rs — thin draw_minimap wiring
Cargo.toml — quadraui rev pin bump (vimcode#691: rev-pinned, not a path dep;
cargo update -p quadraui will not move it)
- quadraui:
primitives/minimap.rs, gtk/minimap.rs, tui/minimap.rs
Acceptance
Blocked on
quadraui#382 (Minimap primitive), then a Cargo.toml pin bump here.
Code-overview minimap on the right edge of each editor pane: a scaled-down rendering of the
whole file with the viewport highlighted, click/drag to scroll.
Features
minimapsetting — see The setting belowBackends
minimap.renderCharacters: true), with a colour-bar fallback below the legibility floorU+2800dot cells, 2 dots wide × 4 tall per terminal cellWin-GUIBraille replaces the previous "block-character approximation, 1 cell per minimap line". It is
8× denser, and quadraui already has a working dot-packing implementation to lift from
(
quadraui/src/tui/chart.rs:158–:245, incl. theBRAILLE_OFFSETSbit table), so this ischeaper and better than what it replaces.
Design: quadraui-first (platform-neutral) — the whole point of this issue
This feature must not add substantive logic to
src/gtk/orsrc/tui_main/. All scalemath, line sampling, colour aggregation and dot packing live in quadraui.
quadraui prerequisite — quadraui#382 (
Minimapprimitive + both rasterisers):Minimapdescriptor,Minimap::layout(),Backend::draw_minimap(),sample_lines(),aggregate_spans(),reserved_width(). Note thataggregate_spansaggregates percell, not per line — a braille cell carries one foreground colour across 4 buffer
lines, so per-line colours would force the TUI backend to re-reduce them, which is exactly
the platform-specific arithmetic this design forbids.
vimcode side (after the primitive lands and the pin is bumped):
build_minimap_data()insrc/render.rs— samples lines, hands syntax spans toaggregate_spans, builds theMinimap. ReturnsNonewhen the setting is off.ScreenLayout(src/render.rs:4239) gainsminimap: Option<RenderedMinimap>.quadraui::minimap::reserved_width(..)in bothbackends — do not compute the reclaimed width twice.
backend.draw_minimap(rect, &minimap). Thin wiring only.ClickTargetsystem → standard scroll commands.The setting (required)
A
minimap: booloption, defaulting to on, following theindent_guidesprecedentexactly. In
src/core/settings.rsthat is eight sites — the option plumbing here is achecklist, and missing one produces an option that works from
:setbut not from thesettings UI (or vice versa):
indent_guidesreference#[serde(default = ...)]:296default_minimap():339Defaultconstruction:788parse_set_optionboolean branch (minimap/nominimap):1082:set minimap?query form:1342:1475:1589SettingDef { key, label, description, category: "Editor", setting_type: Bool }registry entry:2038Both spellings (
minimapandnominimap) must work, and the setting must take effect on thenext paint without a restart — the editor reclaims the minimap's width when it is turned off.
Key files
src/render.rs—build_minimap_data(),ScreenLayout.minimap(:4239)src/core/settings.rs— the eight sites abovesrc/gtk/mod.rs— thindraw_minimapwiringsrc/tui_main/render_impl.rs— thindraw_minimapwiringCargo.toml— quadraui rev pin bump (vimcode#691: rev-pinned, not a path dep;cargo update -p quadrauiwill not move it)primitives/minimap.rs,gtk/minimap.rs,tui/minimap.rsAcceptance
:set nominimaphides it and the editor text area widens by exactly the reserved width;:set minimaprestores both — asserted, not eyeballed:set minimap?reportsminimap/nominimapsrc/tui_main/snapshots/) covering a file with a distinctiveindentation shape, showing braille glyphs — the snapshot is what pins that the dot grid
is not transposed
src/gtk/testing.rsthat the minimap column is painted andthat its width matches
reserved_widthbackends
grep -rn 'minimap' src/gtk/ src/tui_main/returns onlydraw_minimapcall sites and rect plumbing — no sampling, no scale arithmetic, no dotpacking, no colour aggregation. If a reviewer finds any of those outside quadraui, that
is a
request-changesregardless of whether it works.Blocked on
quadraui#382 (Minimap primitive), then a
Cargo.tomlpin bump here.