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 and shown in the popup. |
kind | 'keyword' | 'type' | 'function' | 'variable' | 'constant' | 'module' | 'snippet' | 'property' | No | Icon and sort priority. |
detail | string | No | Small secondary label shown on the right (type signature etc.). |
documentation | string | No | Longer description shown in the side panel. |
insertText | string | No | Text to insert when accepted. Defaults to label. Supports $1…$N tab stops. |
filterText | string | No | Alternative string used to match the prefix. Defaults to label. |
sortText | string | No | Lexicographic sort key. Defaults to label. |
© 2026 Syncline Editor. All rights reserved.