Autocomplete
Syncline Editor has a built-in completion engine covering language keywords, user-defined symbols, snippets, and Emmet. Every aspect is customisable.
Static Completions
Pass fixed keywords, types, or full CompletionItem objects through configuration. These are merged with the built-in language tokens.
Dynamic Completions
Use provideCompletions for context-sensitive results. The callback receives a CompletionContext object (word, line, position) and can return a list or null to fall back to built-ins:
Hover Documentation
Supply provideHover to show inline documentation when a user pauses over an identifier. Return null to use built-in hover:
Built-in Snippets
Common patterns are available out-of-the-box. Tab stops ($1, $2, $0) are navigated with Tab:
Emmet
Emmet abbreviations expand on Tab in HTML, Markdown, and CSS contexts. Disable with { emmet: false }:
CompletionItem Schema
| Field | Type | Required | Description |
|---|---|---|---|
label | string | Yes | Text inserted on accept; also used for prefix matching in the popup. |
kind | 'kw' | 'fn' | 'typ' | 'cls' | 'var' | 'snip' | 'emmet' | Yes | Badge type shown in the popup. 'snip' items with a body expand as snippets; 'emmet' is auto-generated. |
detail | string | No | Short hint shown to the right of the popup row (e.g. type signature). |
description | string | No | Full documentation shown in the side panel when the item is selected. Snippet items without a description show a body preview. |
body | string | No | Snippet template with $1…$N tab stops. Tab/Enter expands it when set. Required for kind: 'snip'. |
language | string | string[] | No | Restrict this item to specific language(s). Omit to show in all languages. |
© 2026 Syncline Editor. All rights reserved.