Hierarchy

  • Completion

Properties

boost?: number

Can be used to adjust how the completion is ranked compared to other options. A positive number moves it up the list, while a negative one moves it down.

commitChars?: string

If this option is selected and the user types a character present in this string, then the option is inserted right before the character is typed.

detail?: string

Optional, short piece of information displayed after the label.

icon?: "function" | "constant" | "keyword" | "namespace" | "property" | string & {} | "class" | "enum" | "interface" | "parameter" | "snippet" | "unit" | "variable"

Name of the icon shown before the label. This name is appended to the class pce-ac-icon-, so i.e. .pce-ac-icon-variable can be used to style icons with the name variable.

The icon element also gets it color set to the CSS variable --pce-ac-icon- followed by the icon name. Use these CSS variables to set different colors for different icons.

prism-code-editor/autocomplete-icons.css adds 13 icons from VSCode: class, constant, enum, function, interface, keyword, namespace, parameter, property, snippet, unit, and variable. You can import your own icons instead.

Defaults to "variable"

insert?: string

Text to insert when the completion is selected. Tabs are replaced with spaces when options.insertSpaces isn't set to false. Line feeds are replaced by the indentation at the current line.

If omitted, the inserted text defaults to label.

label: string

Label of the option. The label is displayed in the option and used to filter and sort options. By default, this is the text inserted when the option is selected.

tabStops?: number[]

Array of ranges. Each even index defines the start of a range. The subsequent index defines the end of that range. The ranges are relative to the start of the inserted text. The first range is selected initially.

If there are multiple ranges, the Tab key can ke used to select the next tab stop. Once the final tab stop is selected or Escape is pressed, the tab stops disappear.

The ranges must not overlap.

If the last range only contains one number, the second defaults to the first.

Generated using TypeDoc