Repository navigation
feat(render): reading column, coloured code blocks, definition lists, stronger headings - #173
Merged
Merged
Conversation
github-merge-queue
Bot
removed this pull request from the merge queue due to a conflict with the base branch
Nov 20, 2026
backnotprop
force-pushed
the
feat/reading-look
branch
from
November 20, 2026 01:43
b630fce to
ce176e1
Compare
… stronger headings Fenced code drops its fences and sits beside a quiet bar, with its language at the top right when there is room. Code with a bundled grammar is coloured by the syntect engine diffs-rs uses (diffs-syntect and diffs-two-face, pure Rust, so Windows too), lazily, for the rows drawn, through new [colors] code-* roles. Unknown languages keep one colour. Cells keep their source bytes, so selections and notes inside code map to the code, never the fences. The document text sits in a centred reading column, 80 columns by default ([ui] doc_width, 0 fills as before); < and > narrow and widen it by eight. Long code lines continue on the next row instead of being clipped. Definition lists render as indented definitions, and level one and two headings get more room, with a rule under level one.
…t code colours readable on white Fenced code inside a list item or a quote drops its fences, sits beside the bar inside the bullet indent or quote bars, and is coloured by language when drawn, read from the source without the container syntax. Its cells keep their source bytes. On the light palette, code no longer uses the pale ANSI hues: inline and plain code is a dark amber (new [colors] code role, light yellow on dark as before), strings and types use darker 256-colour greens and teals. Code laid out by the background layout thread is coloured like the first screen's, and the reading column's width changes reach blocks that arrive late.
backnotprop
force-pushed
the
feat/reading-look
branch
from
November 20, 2026 01:48
ce176e1 to
7ad528d
Compare
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Makes the Markdown document screen easier to read.
Code blocks
diffs-syntectanddiffs-two-face). We depend on those crates directly because diffs-rs itself only builds on Unix. They are pure Rust, so colouring works on Windows too.[colors]roles:code,code-keyword,code-string,code-number,code-function,code-typeandcode-comment. There are defaults for the dark and light palettes, and NO_COLOR is honoured through crossterm as before.[colors] coderole; dark keeps light yellow), and strings, numbers and types use darker 256-colour hues.Reading column
[ui] doc_widthnow defaults to 80 (it was 0). Setting it to 0 fills the pane as before.<and>(new actionsnarrow-columnandwiden-column) narrow and widen the column by eight for the session.t, which misjudged whether the folder tree was showing once the column left spare space.Definition lists render as the term, with each definition indented under it, instead of raw
:lines.Headings: H1 and H2 get a blank row above them. H1 gets a rule under it (
╍) instead of an underline.Tests cover:
Speed: built on #166's background layout. Code blocks the background thread lays out are coloured when drawn, like the first screen's, and
<,>and resizes go through #166's reflow, so blocks that arrive late take the new width.--bench samples/big.md, 5 runs: first screens 3.8-5.0 ms (main 3.6-4.1 ms), rest in background 40-61 ms (main 40-50 ms).--snapshot samples/big.md 120 40wall time, 21 runs: main min 85.6 / median 96.2 ms, this branch min 82.8 / median 96.0 ms. The machine was heavily loaded, so treat these as equal.Overlap with other open work:
keys.rs,app/input.rsandapp/draw.rs(doc search), andcli.rs.