Completion: opens by itself, fuzzy, words, index !483

merged merged by cmc on 2026-11-26 05:35 UTC · krz/orgstar:m4-completion into main

Discussion

cmc 2026-11-26 05:00 UTC

Closes #139, #140, #141, #143.

  • #139: completion-auto (preset/on/off), completion-auto-delay (ms, 400) and completion-auto-prefix (2) in config.toml and Settings (Mac Editing tab, iOS Settings ▸ Completion). preset keeps Doom on and Emacs/Mac off. Timing is CompletionAuto (pure). The iOS editor gets a completion list (hardware keyboard keys and taps) and Complete at Point.
  • #140: completion-style (preset/prefix/fuzzy); preset is fuzzy in Doom (corfu + orderless), prefix in Emacs and Mac (completion-styles basic/partial-completion). Scoring is the palette's FuzzyMatch, moved from OrgApp to OrgCore (rank stays in OrgApp).
  • #141: Expand Word (editor.dabbrev-expand: Emacs M-/, Mac F5, cycles on repeat) and Complete Word (editor.dabbrev-completion: Emacs C-M-/, Doom insert C-n; -previous: Doom insert C-p, as +corfu/dabbrev-or-next/last). Buffer before then after the caret, other open buffers, then the index. completion-words adds words to the automatic list. 15 oracle cases against dabbrev-expand.
  • #143: [[id: completes every heading and file node (buffer at once, index off the main actor), creating an ID in the target heading here or in its file; [[denote: completes Denote notes; property values from _ALL, the buffer and the index.

Tests: CompletionListTests (OrgCore, incl. oracle), CompletionQueriesTests (OrgIndex), CompletionSourcesTests (OrgApp, ID created in another file), CompletionPopupTests (editor). swift test, both Xcode builds green. Gates typing p95 unchanged (1 MB 11.4→11.8 ms, table 4.8→5.3, drawers 10.0→10.1, 10 MB 118→121) under load 8–9; the 1 MB open gate misses before and after under that load.

Not checked on a device or simulator: the iOS list (simulators were assigned elsewhere); built only.

Keyboard shortcuts

Global

⌘K
Command palette & jump
/
Focus search
?
Show this help
g d
Dashboard
g e
Explore repositories
g n
Notifications

Repository & editor

t
Find file in repository
y
Copy immutable SHA permalink
g c
Code tab
g i
Issues tab
g m
Merge requests tab
g b
Builds tab
⌘↵
Submit active form