Completion
data class Completion(val label: String, val displayLabel: String? = null, val detail: String? = null, val info: String? = null, val type: String? = null, val boost: Int = 0, val apply: String? = null, val applyFn: (CompletionApplyContext) -> Unit? = null, val section: CompletionSection? = null, val sortText: String? = null)
A single completion option.
Parameters
label
The text to insert (and the primary display text).
displayLabel
Optional alternative display text.
detail
Optional short description shown next to the label.
info
Optional longer documentation string.
type
Optional type indicator (e.g. "function", "variable", "keyword").
boost
Priority boost (higher = shown earlier).
apply
Optional custom apply text (overrides label).
section
Optional grouping section.
sortText
Optional explicit sort key (e.g. an LSP server's CompletionItem.sortText). When present it breaks ties between options of equal score, compared lexicographically (ascending), letting a server order items as it prefers even when their labels would sort differently. When absent, ties fall back to label ordering.