Cluster of UX refinements + one real bug:
Bar chrome:
- Shrunk both bars from 3 rows to 2 rows. dapui's own pane borders act
as the visual separation between the bar and the main content area,
so the inner-facing separator lines on each bar were redundant.
Top bar: sep / content (no bottom line)
Bottom bar: content / sep (no top line)
- Sidebar/Console sizing recalculated: 2-row bars instead of 3 frees
up 2 extra rows for content.
Smarter legend:
- (R)estart is now conditionally rendered — only shown when a dap
session is active. When there's no session, "restart" is meaningless
(there's nothing to restart), so the button hides and the remaining
controls re-center around the smaller set.
Console clear on start/restart:
- New config.opts.clear_console_on_start (default true). Fires on
dap.listeners.before.event_initialized — wipes the Console buffer
so output from a previous run doesn't linger when a new session
begins.
Registers default-collapsed:
- dapui's own scopes component auto-collapses any scope the adapter
marks `expensive = true` (see dapui/components/scopes.lua:22-24).
codelldb (Rust/C++) doesn't mark Registers expensive even though it
dumps hundreds of entries. We intercept the scopes response via
dap.listeners.before.scopes and inject `expensive = true` on any
scope name in config.opts.collapsed_scopes (default `{"Registers"}`).
Reuses dapui's existing collapse mechanism, so no monkey-patching.
Re-entry layout fix:
- The Console "balloon" bug on second ,dd toggle was dapui caching
first-call layout dimensions. ensure_dapui() now re-runs dapui.setup
with freshly computed layouts on EVERY M.enter, so the 25% / 25% /
25% / 25% sidebar split and 15%-of-available Console all recompute
against current terminal + current bar heights.
- Bars are now opened BEFORE dapui.open() so dapui's layout algorithm
sees the reduced available space from the start rather than computing
against full screen and then getting squished.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>