Completions
Completions come from the language server for the file you are editing, and optionally from words already in the buffer. Tyrn also offers model-powered inline suggestions, which are covered in Autocomplete.
Use completions
The menu opens as you type. To open it yourself, press ctrl-space. ctrl-shift-space opens a menu of words from the buffer only.
| Task | Keybinding |
|---|---|
| Open completions | ctrl-space |
| Open word completions | ctrl-shift-space |
| Next, previous item | down or ctrl-n, up or ctrl-p |
| Accept | enter or tab |
| Accept and replace the text after the cursor | shift-enter |
Turn completions off or tune them
{ // Stop the menu from opening while you type. You can still open it with ctrl-space. "show_completions_on_input": false, "completions": { // "enabled", "fallback" (default) or "disabled" "words": "fallback", "words_min_length": 3, // Set to false to use only word completions. "lsp": true, // Milliseconds to wait for a language server. 0 waits indefinitely. "lsp_fetch_timeout_ms": 0, // "insert", "replace", "replace_subsequence" or "replace_suffix" (default) "lsp_insert_mode": "replace_suffix" }}completions.words controls whether words from the document join the list. "fallback" uses them only when the language server errors or times out. Markdown and plain text turn word completions off by default.
| Setting | Default | What it does |
|---|---|---|
show_completion_documentation |
true |
Shows documentation beside items |
completion_menu_item_kind |
"off" |
"symbol" adds a one-letter badge for the item kind |
completion_detail_alignment |
"left" |
Aligns detail text left or right |
snippet_sort_order |
"inline" |
Where snippets sort: "top", "inline", "bottom" or "none" |
auto_signature_help |
false |
Shows the method signature while you type arguments |
Snippets appear in the menu too. See Snippets.
Language servers
Which language server provides completions is a per-language choice. Most common languages work without setup. See Languages and Configuring languages.