Configuration

Full reference for every option accepted by createEditor(). Every field is optional — sensible defaults are applied for all options.

Updating at Runtime

Any option can be changed after creation. Config changes are applied incrementally — only the affected subsystems are rebuilt:

runtime-config.ts

// Toggle features after creation — no reload needed
editor.updateConfig({ wordWrap: true, showMinimap: false });

// Switch language (rebuilds highlighting + completions)
editor.updateConfig({ language: 'css' });

// Change font
editor.updateConfig({
  fontFamily: "'Fira Code', monospace",
  fontSize: 14,
  lineHeight: 24,
});

// Enter read-only mode
editor.updateConfig({ readOnly: true });

// Override token colours on top of the current theme
editor.updateConfig({
  tokenColors: { keyword: '#ff79c6', string: '#f1fa8c' },
});

Document

OptionTypeDefaultDescription
valuestring | string[]''

Initial document content. String or pre-split string[].

languageLanguage'typescript'

Syntax highlighting language. Values: 'typescript' | 'javascript' | 'css' | 'json' | 'markdown'.

Display

OptionTypeDefaultDescription
showGutterbooleantrue

Show/hide the line-number gutter.

showMinimapbooleantrue

Show/hide the canvas minimap panel.

showStatusBarbooleantrue

Show/hide the bottom status bar.

showIndentGuidesbooleantrue

Faint vertical lines at each indentation level.

highlightActiveLinebooleantrue

Background tint on the active line and gutter cell.

wordHighlightbooleantrue

Highlight all other occurrences of the word under the cursor.

renderWhitespace'none' | 'boundary' | 'all''none'

Spaces render as ·, tabs as →. 'boundary' = leading/trailing only.

Typography

OptionTypeDefaultDescription
fontFamilystring'JetBrains Mono', monospace

CSS font-family for all code text.

fontSizenumber13

Font size in pixels.

lineHeightnumber22

Row height in pixels. All scroll and minimap calculations derive from this.

Cursor

OptionTypeDefaultDescription
cursorStyle'line' | 'block' | 'underline''line'

Visual cursor shape.

cursorBlinkRatenumber1050

Blink period in ms. Set to 999999 to disable blinking.

Layout

OptionTypeDefaultDescription
gutterWidthnumber60

Gutter width in pixels.

minimapWidthnumber120

Minimap panel width in pixels.

wordWrapbooleanfalse

Soft-wrap long lines. Toggle at runtime with Alt+Z.

wrapColumnnumber80

Column at which soft-wrap breaks when wordWrap is true.

Editing

OptionTypeDefaultDescription
tabSizenumber2

Spaces per Tab press.

insertSpacesbooleantrue

Insert spaces on Tab; false inserts a literal tab character.

maxUndoHistorynumber300

Maximum undo snapshots retained.

undoBatchMsnumber700

Keystrokes within this window are grouped into one undo step. 0 = per-keystroke.

readOnlybooleanfalse

Block all edits. Navigation, selection, and copy still work.

autoClosePairsRecord<string,string>{ '(':')', '[':']', ... }

Characters that auto-close. Pass {} to disable entirely.

lineCommentTokenstring''

Prefix for Ctrl+/ toggle comment. Auto-detects from language when empty.

wordSeparatorsstring''

Extra characters treated as word boundaries for double-click and Ctrl+←/→.

Features

OptionTypeDefaultDescription
bracketMatchingbooleantrue

Highlight matching ()[] {} pair at the cursor.

codeFoldingbooleantrue

Gutter fold button for collapsible {} blocks.

emmetbooleantrue

Emmet abbreviation expansion via Tab.

snippetExpansionbooleantrue

Tab-expand built-in and custom snippets.

autocompletebooleantrue

Show the autocomplete popup while typing.

autocompletePrefixLengthnumber2

Minimum characters typed before the popup appears.

multiCursorbooleantrue

Alt+Click and Ctrl+D multi-cursor.

findbooleantrue

Enable the find bar (Ctrl+F).

findReplacebooleantrue

Enable find-and-replace (Ctrl+H).

hoverbooleantrue

Show a documentation tooltip when the pointer rests on a known identifier.

wordSelectionbooleantrue

Double-click selects the word under the cursor.

Autocomplete & Syntax

OptionTypeDefaultDescription
extraKeywordsstring[][]

Words highlighted as keywords and added to autocomplete.

extraTypesstring[][]

Words highlighted as types and added to autocomplete.

completionsCompletionItem[][]

Unified completions array — symbols, snippets, DSL items.

replaceBuiltinsbooleanfalse

When true, completions replaces the built-in language keywords/types entirely.

provideCompletions(ctx) => CompletionItem[] | nullundefined

Dynamic callback — called on every popup open.

provideHover(ctx) => HoverDoc | nullundefined

Dynamic hover callback for custom identifier docs.

maxCompletionsnumber14

Maximum items shown in the autocomplete popup.

Theme & Token Colors

OptionTypeDefaultDescription
themestring | ThemeDefinition'' (VR Dark)

Built-in theme ID or a full ThemeDefinition object.

tokenColorsTokenColors{}

Per-token colour overrides layered on top of the active theme.

Callbacks

OptionTypeDefaultDescription
onChange(value: string) => voidundefined

Fired after every content change (keystroke, paste, undo, setValue).

onCursorChange(pos: CursorPosition) => voidundefined

Fired when the cursor moves.

onSelectionChange(sel: Selection | null) => voidundefined

Fired when the selection changes or clears.

onFocus() => voidundefined

Fired when the editor gains keyboard focus.

onBlur() => voidundefined

Fired when the editor loses keyboard focus.

Syncline Editor

© 2026 Syncline Editor. All rights reserved.