turbo-editors/turbo-corepublic Fork 0
main
Commits
Clone
git clone https://git.rickub.com/turbo-editors/turbo-core.git
git clone ssh://git@rickub.com/turbo-editors/turbo-core.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

🛟 Updated. 28d5985 · on main · k33g · 9h ago
2026-09-02-code-navigation.md · 44 lines · 4.0 KBmarkdown
Blame HistoryOpen raw

Handoff — 2026-09-02 — code navigation, diagnostics, and better editing

State

Done and verified, on feature/code-navigation in all three repositories. Nothing is committed.

turbo-core now asks the language server nine questions instead of one, and shows what it sends unasked:

Where What
lsp References, Implementation, TypeDefinition beside Definition, sharing one decoder; DocumentSymbols, WorkspaceSymbols, Symbol, SymbolKind
app a Code menu with eight items; chooseLocation; SymbolInFile, SymbolInProject, ShowProblems; AllDiagnostics
editor Severity, SetMarks, and the gutter glyph in the diagnostic.* theme keys

Then ticket 19 was stacked on the same branch: double-click to select a word, Ctrl-N to insert a line above, Ctrl-Y to delete one — and redo moved to Ctrl-R, because Ctrl-Y was it. buffer gained InsertLineAbove, DeleteLine and SelectWord; editor gained click.go and an injectable clock.

Suite green (16 packages), gate PASS 0/0/0 at complexity 1802. Docs complete in EN and FR in all three. Verified against a real gopls in a pty.

In flight

Nothing half-done.

Next steps

  1. Review, commit, merge.
  2. Release v0.4.0 — a large amount of new public API, so a minor bump. It carries both the Code menu and ticket 19, including the Ctrl-YCtrl-R key change, which is the one thing in it a user will notice without being told.
  3. In each editor: go get codeberg.org/turbo-editors/turbo-core@v0.4.0 && go mod tidy && make check. Until then both build against v0.3.0; the Code menu simply is not in them yet.

Open questions / blockers

  • None. The next things on the list, in the order I would take them: workspace/symbol and documentSymbol are done, so what remains is rename — which needs WorkspaceEdit machinery (apply edits across files, some unopened, as one undo) and unlocks codeAction and formatting after it.

Watch out for

  • gopls is now installed in this sandbox (~/go/bin/gopls, via go install). It was not before, and the end-to-end runs need it. rust-analyzer is still absent.
  • Diagnostics are keyed by absolute path, on all three sides — read, write and delete. diagnosticKey does it. Removing it from any one of them reintroduces a bug that no unit test catches unless the test opens its file by a relative path.
  • Open a file that does not compile, in a pty, before believing anything about diagnostics. They are the only feature whose failure looks exactly like success: no error to show and no error findable are the same blank gutter.
  • The two symbol shapes are told apart by selectionRange. Not by children, which is optional — that mistake reads the nested shape as flat and loses every position, silently.
  • A test that passes vacuously. MarkNone has no glyph, so drawing it emits NUL, which a simulated screen shows as a blank — the drawing looks right whether or not the guard exists. That test asserts on markOf instead. Look for the same shape elsewhere.
  • Ctrl-Shift-O is not a key a terminal can deliver. Neither is any other Ctrl-Shift-letter. Check before putting one in a menu.
  • The × glyph and its siblings are single-width characters chosen because the gutter has exactly one column. A wider glyph would push the text.
  • Clicks are counted only when no drag is in progress. tcell sends Button1 for every event of a drag as well as for a press; counting those turns a slow drag into a double click halfway through. There is a test named for it.
  • DeleteLine's one-line case is defensive, not load-bearing. Removing it changes no behaviour — the range it would otherwise build starts on line −1 and clamp pulls it back to 0. It is kept for saying what it means, and a comment says so, but do not expect a test to catch its removal.
  • Ctrl-Shift-<letter> is never available. That is twice now: Ctrl-Shift-O for a symbol search, Ctrl-Shift-Z for redo. Check before putting one in a menu.
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Handoff — 2026-09-02 — code navigation, diagnostics, and better editing

## State

Done and verified, on `feature/code-navigation` in all three repositories. Nothing is committed.

turbo-core now asks the language server nine questions instead of one, and shows what it sends unasked:

| Where | What |
| --- | --- |
| `lsp` | `References`, `Implementation`, `TypeDefinition` beside `Definition`, sharing one decoder; `DocumentSymbols`, `WorkspaceSymbols`, `Symbol`, `SymbolKind` |
| `app` | a **Code** menu with eight items; `chooseLocation`; `SymbolInFile`, `SymbolInProject`, `ShowProblems`; `AllDiagnostics` |
| `editor` | `Severity`, `SetMarks`, and the gutter glyph in the `diagnostic.*` theme keys |

Then **ticket 19** was stacked on the same branch: double-click to select a word, `Ctrl-N` to insert a line above, `Ctrl-Y` to delete one — and **redo moved to `Ctrl-R`**, because `Ctrl-Y` was it. `buffer` gained `InsertLineAbove`, `DeleteLine` and `SelectWord`; `editor` gained `click.go` and an injectable clock.

Suite green (16 packages), gate **PASS 0/0/0** at complexity 1802. Docs complete in EN and FR in all three. Verified against a real gopls in a pty.

## In flight

Nothing half-done.

## Next steps

1. Review, commit, merge.
2. **Release v0.4.0** — a large amount of new public API, so a minor bump. It carries both the Code menu and ticket 19, including the `Ctrl-Y``Ctrl-R` key change, which is the one thing in it a user will notice without being told.
3. In each editor: `go get codeberg.org/turbo-editors/turbo-core@v0.4.0 && go mod tidy && make check`. Until then both build against v0.3.0; the Code menu simply is not in them yet.

## Open questions / blockers

- None. The next things on the list, in the order I would take them: `workspace/symbol` and `documentSymbol` are done, so what remains is **rename** — which needs `WorkspaceEdit` machinery (apply edits across files, some unopened, as one undo) and unlocks `codeAction` and `formatting` after it.

## Watch out for

- **gopls is now installed in this sandbox** (`~/go/bin/gopls`, via `go install`). It was not before, and the end-to-end runs need it. rust-analyzer is still absent.
- **Diagnostics are keyed by absolute path, on all three sides** — read, write and delete. `diagnosticKey` does it. Removing it from any one of them reintroduces a bug that no unit test catches unless the test opens its file by a *relative* path.
- **Open a file that does not compile, in a pty, before believing anything about diagnostics.** They are the only feature whose failure looks exactly like success: no error to show and no error findable are the same blank gutter.
- **The two symbol shapes are told apart by `selectionRange`.** Not by `children`, which is optional — that mistake reads the nested shape as flat and loses every position, silently.
- **A test that passes vacuously.** `MarkNone` has no glyph, so drawing it emits NUL, which a simulated screen shows as a blank — the drawing looks right whether or not the guard exists. That test asserts on `markOf` instead. Look for the same shape elsewhere.
- **`Ctrl-Shift-O` is not a key a terminal can deliver.** Neither is any other Ctrl-Shift-letter. Check before putting one in a menu.
- The `×` glyph and its siblings are single-width characters chosen because the gutter has exactly one column. A wider glyph would push the text.
- **Clicks are counted only when no drag is in progress.** tcell sends `Button1` for every event of a drag as well as for a press; counting those turns a slow drag into a double click halfway through. There is a test named for it.
- **`DeleteLine`'s one-line case is defensive, not load-bearing.** Removing it changes no behaviour — the range it would otherwise build starts on line −1 and `clamp` pulls it back to 0. It is kept for saying what it means, and a comment says so, but do not expect a test to catch its removal.
- **`Ctrl-Shift-<letter>` is never available.** That is twice now: `Ctrl-Shift-O` for a symbol search, `Ctrl-Shift-Z` for redo. Check before putting one in a menu.