Autocomplete Plugin
Help query: "What does the autocomplete plugin do?" / "How do I use autocomplete in Volt?"
The autocomplete plugin drives insert-mode completion. Providers in the source or-group (LSP, calculator, buffer words, DB query buffers, …) compete; higher-priority providers suppress lower ones when they return results. The snippets provider has no or-group, so its items always merge after LSP.
| Package name | autocomplete |
| Module | user/autocomplete.rs |
What it does
- Trigger a completion popup
- Navigate and accept/cancel candidates
- Order providers so LSP wins in the
sourcegroup when available; snippets always merge
Commands
| Command | Description |
|---|---|
autocomplete.trigger | Triggers autocomplete at the cursor. |
autocomplete.next | Selects the next completion candidate. |
autocomplete.previous | Selects the previous completion candidate. |
autocomplete.accept | Accepts the selected completion; for LSP items also applies additionalTextEdits (imports, usings, includes) and keeps the cursor after the primary insert. |
autocomplete.cancel | Cancels the autocomplete popup. |
Keybindings
| Chord | Command | Scope |
|---|---|---|
Ctrl+Space | autocomplete.trigger | Global (Insert) |
Ctrl+n | autocomplete.next | Autocomplete |
Ctrl+p | autocomplete.previous | Autocomplete |
Ctrl+y | autocomplete.accept | Autocomplete |
Notes
- Accepting an LSP completion resolves the item when the server supports it, inserts the primary text, then applies any
additionalTextEdits(typical import / using / include fixes from servers such as roslyn-language-server). The caret stays after the primary insert. - To add a provider for your own plugin, see Autocomplete providers under User packages.