Skip to content

feat(completion): add compact async completion menu - #188

Merged
fcoury merged 2 commits into
mainfrom
feat/neovim-completion-experience
Aug 13, 2026
Merged

feat(completion): add compact async completion menu#188
fcoury merged 2 commits into
mainfrom
feat/neovim-completion-experience

Conversation

@fcoury

@fcoury fcoury commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Typing completion previously waited for both local and language-server results, then showed a large popup with an automatic preview. That made the menu feel heavier than Neovim's completion flow and left trigger characters such as . filtering an obsolete completion session while typing through an open menu.

This change makes completion immediate and unobtrusive:

  • show matching buffer words immediately, then merge LSP results into the existing menu without resetting the selected candidate
  • render a compact, content-sized fuzzy list with highlighted matches and LSP label descriptions instead of an automatic documentation preview
  • use Neovim-style controls: Ctrl-n/Ctrl-p or arrows to navigate, Tab to accept, Ctrl-e to dismiss, and Enter to insert a newline
  • preserve one-Esc exit to Normal mode, ignore late responses after dismissal, and start a fresh member-completion request on trigger characters
  • default automatic completion to zero debounce while keeping completion.debounce_ms configurable

How to Test

  1. Open a Python file containing an existing torch.manual_seed(...) line and add a blank line below it.
  2. Enter Insert mode and type to. Expect a compact completion menu to appear immediately with buffer candidates; LSP candidates should enrich the same menu without it jumping or reopening.
  3. Continue typing rch.man. Expect a fresh member-completion menu containing manual_seed and related matches, with the typed characters highlighted.
  4. Press Tab, then type (1337). Expect torch.manual_seed(1337); press Esc once and expect Normal mode.
  5. Regression: reopen completion, press Ctrl-e, and wait for any outstanding LSP response. Expect the menu to remain dismissed. Reopen it and press Enter; expect a newline rather than accepting the candidate.

Automated coverage includes focused completion UI/lifecycle tests plus the full Rust suite and warning-as-error Clippy validation.

@fcoury

fcoury commented Aug 13, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: aa95c39555

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/editor.rs Outdated
Comment thread src/ui/completion.rs
@fcoury
fcoury merged commit 21d16ba into main Aug 13, 2026
21 checks passed
@fcoury
fcoury deleted the feat/neovim-completion-experience branch August 13, 2026 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant