Interface IEditorConstructionOptions

Configuration options for the editor.

Hierarchy

Properties

acceptSuggestionOnCommitCharacter? acceptSuggestionOnEnter? accessibilityPageSize? accessibilitySupport? ariaLabel? ariaRequired? autoClosingBrackets? autoClosingComments? autoClosingDelete? autoClosingOvertype? autoClosingQuotes? autoIndent? autoSurround? automaticLayout? bracketPairColorization? codeActionsOnSaveTimeout? codeLens? codeLensFontFamily? codeLensFontSize? colorDecorators? colorDecoratorsActivatedOn? colorDecoratorsLimit? columnSelection? comments? contextmenu? copyWithSyntaxHighlighting? cursorBlinking? cursorSmoothCaretAnimation? cursorStyle? cursorSurroundingLines? cursorSurroundingLinesStyle? cursorWidth? defaultColorDecorators? definitionLinkOpensInPeek? dimension? disableLayerHinting? disableMonospaceOptimizations? domReadOnly? dragAndDrop? dropIntoEditor? emptySelectionClipboard? experimentalInlineEdit? experimentalWhitespaceRendering? extraEditorClassName? fastScrollSensitivity? find? fixedOverflowWidgets? folding? foldingHighlight? foldingImportsByDefault? foldingMaximumRegions? foldingStrategy? fontFamily? fontLigatures? fontSize? fontVariations? fontWeight? formatOnPaste? formatOnType? glyphMargin? gotoLocation? guides? hideCursorInOverviewRuler? hover? inDiffEditor? inlayHints? inlineCompletionsAccessibilityVerbose? inlineSuggest? letterSpacing? lightbulb? lineDecorationsWidth? lineHeight? lineNumbers? lineNumbersMinChars? linkedEditing? links? matchBrackets? matchOnWordStartOnly? minimap? mouseStyle? mouseWheelScrollSensitivity? mouseWheelZoom? multiCursorLimit? multiCursorMergeOverlapping? multiCursorModifier? multiCursorPaste? occurrencesHighlight? overflowWidgetsDomNode? overviewRulerBorder? overviewRulerLanes? padding? parameterHints? pasteAs? peekWidgetDefaultFocus? quickSuggestions? quickSuggestionsDelay? readOnly? readOnlyMessage? renameOnType? renderControlCharacters? renderFinalNewline? renderLineHighlight? renderLineHighlightOnlyWhenFocus? renderValidationDecorations? renderWhitespace? revealHorizontalRightPadding? roundedSelection? rulers? screenReaderAnnounceInlineSuggestion? scrollBeyondLastColumn? scrollBeyondLastLine? scrollPredominantAxis? scrollbar? selectOnLineNumbers? selectionClipboard? selectionHighlight? showDeprecated? showFoldingControls? showUnused? smartSelect? smoothScrolling? snippetSuggestions? stickyScroll? stickyTabStops? stopRenderingLineAfter? suggest? suggestFontSize? suggestLineHeight? suggestOnTriggerCharacters? suggestSelection? tabCompletion? tabFocusMode? tabIndex? unfoldOnClickAfterEndOfLine? unicodeHighlight? unusualLineTerminators? useShadowDOM? useTabStops? wordBreak? wordSegmenterLocales? wordSeparators? wordWrap? wordWrapBreakAfterCharacters? wordWrapBreakBeforeCharacters? wordWrapColumn? wordWrapOverride1? wordWrapOverride2? wrappingIndent? wrappingStrategy?

Properties

acceptSuggestionOnCommitCharacter?: boolean

Accept suggestions on provider defined characters. Defaults to true.

acceptSuggestionOnEnter?: "off" | "on" | "smart"

Accept suggestions on ENTER. Defaults to 'on'.

accessibilityPageSize?: number

Controls the number of lines in the editor that can be read out by a screen reader

accessibilitySupport?: "off" | "on" | "auto"

Configure the editor's accessibility support. Defaults to 'auto'. It is best to leave this to 'auto'.

ariaLabel?: string

The aria label for the editor's textarea (when it is focused).

ariaRequired?: boolean

Whether the aria-required attribute should be set on the editors textarea.

autoClosingBrackets?: EditorAutoClosingStrategy

Options for auto closing brackets. Defaults to language defined behavior.

autoClosingComments?: EditorAutoClosingStrategy

Options for auto closing comments. Defaults to language defined behavior.

autoClosingDelete?: EditorAutoClosingEditStrategy

Options for pressing backspace near quotes or bracket pairs.

autoClosingOvertype?: EditorAutoClosingEditStrategy

Options for typing over closing quotes or brackets.

autoClosingQuotes?: EditorAutoClosingStrategy

Options for auto closing quotes. Defaults to language defined behavior.

autoIndent?: "none" | "advanced" | "full" | "brackets" | "keep"

Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines. Defaults to advanced.

Options for auto surrounding. Defaults to always allowing auto surrounding.

automaticLayout?: boolean

Enable that the editor will install a ResizeObserver to check if its container dom node size has changed. Defaults to false.

bracketPairColorization?: IBracketPairColorizationOptions

Configures bracket pair colorization (disabled by default).

codeActionsOnSaveTimeout?: number

Timeout for running code actions on save.

codeLens?: boolean

Show code lens Defaults to true.

codeLensFontFamily?: string

Code lens font family. Defaults to editor font family.

codeLensFontSize?: number

Code lens font size. Default to 90% of the editor font size

colorDecorators?: boolean

Enable inline color decorators and color picker rendering.

colorDecoratorsActivatedOn?: "clickAndHover" | "click" | "hover"

Controls what is the condition to spawn a color picker from a color dectorator

colorDecoratorsLimit?: number

Controls the max number of color decorators that can be rendered in an editor at once.

columnSelection?: boolean

Enable that the selection with the mouse and keys is doing column selection. Defaults to false.

Control the behaviour of comments in the editor.

contextmenu?: boolean

Enable custom contextmenu. Defaults to true.

copyWithSyntaxHighlighting?: boolean

Syntax highlighting is copied.

cursorBlinking?: "blink" | "smooth" | "phase" | "expand" | "solid"

Control the cursor animation style, possible values are 'blink', 'smooth', 'phase', 'expand' and 'solid'. Defaults to 'blink'.

cursorSmoothCaretAnimation?: "off" | "on" | "explicit"

Enable smooth caret animation. Defaults to 'off'.

cursorStyle?: "line" | "block" | "underline" | "line-thin" | "block-outline" | "underline-thin"

Control the cursor style, either 'block' or 'line'. Defaults to 'line'.

cursorSurroundingLines?: number

Controls the minimal number of visible leading and trailing lines surrounding the cursor. Defaults to 0.

cursorSurroundingLinesStyle?: "default" | "all"

Controls when cursorSurroundingLines should be enforced Defaults to default, cursorSurroundingLines is not enforced when cursor position is changed by mouse.

cursorWidth?: number

Control the width of the cursor when cursorStyle is set to 'line'

defaultColorDecorators?: boolean

Controls whether to use default color decorations or not using the default document color provider

definitionLinkOpensInPeek?: boolean

Controls whether the definition link opens element in the peek widget. Defaults to false.

dimension?: IDimension

The initial editor dimension (to avoid measuring the container).

disableLayerHinting?: boolean

Disable the use of transform: translate3d(0px, 0px, 0px) for the editor margin and lines layers. The usage of transform: translate3d(0px, 0px, 0px) acts as a hint for browsers to create an extra layer. Defaults to false.

disableMonospaceOptimizations?: boolean

Disable the optimizations for monospace fonts. Defaults to false.

domReadOnly?: boolean

Should the textarea used for input use the DOM readonly attribute. Defaults to false.

dragAndDrop?: boolean

Controls if the editor should allow to move selections via drag and drop. Defaults to false.

dropIntoEditor?: IDropIntoEditorOptions

Controls dropping into the editor from an external source.

When enabled, this shows a preview of the drop location and triggers an onDropIntoEditor event.

emptySelectionClipboard?: boolean

Copying without a selection copies the current line.

experimentalInlineEdit?: IInlineEditOptions
experimentalWhitespaceRendering?: "off" | "svg" | "font"

Enable experimental whitespace rendering. Defaults to 'svg'.

extraEditorClassName?: string

Class name to be added to the editor.

fastScrollSensitivity?: number

FastScrolling mulitplier speed when pressing Alt Defaults to 5.

Control the behavior of the find widget.

fixedOverflowWidgets?: boolean

Display overflow widgets as fixed. Defaults to false.

folding?: boolean

Enable code folding. Defaults to true.

foldingHighlight?: boolean

Enable highlight for folded regions. Defaults to true.

foldingImportsByDefault?: boolean

Auto fold imports folding regions. Defaults to true.

foldingMaximumRegions?: number

Maximum number of foldable regions. Defaults to 5000.

foldingStrategy?: "auto" | "indentation"

Selects the folding strategy. 'auto' uses the strategies contributed for the current document, 'indentation' uses the indentation based folding strategy. Defaults to 'auto'.

fontFamily?: string

The font family

fontLigatures?: string | boolean

Enable font ligatures. Defaults to false.

fontSize?: number

The font size

fontVariations?: string | boolean

Enable font variations. Defaults to false.

fontWeight?: string

The font weight

formatOnPaste?: boolean

Enable format on paste. Defaults to false.

formatOnType?: boolean

Enable format on type. Defaults to false.

glyphMargin?: boolean

Enable the rendering of the glyph margin. Defaults to true in vscode and to false in monaco-editor.

gotoLocation?: IGotoLocationOptions

Controls the behavior of editor guides.

hideCursorInOverviewRuler?: boolean

Should the cursor be hidden in the overview ruler. Defaults to false.

Configure the editor's hover.

inDiffEditor?: boolean

This editor is used inside a diff editor.

Control the behavior and rendering of the inline hints.

inlineCompletionsAccessibilityVerbose?: boolean

Controls whether the accessibility hint should be provided to screen reader users when an inline completion is shown.

inlineSuggest?: IInlineSuggestOptions
letterSpacing?: number

The letter spacing

Control the behavior and rendering of the code action lightbulb.

lineDecorationsWidth?: string | number

The width reserved for line decorations (in px). Line decorations are placed between line numbers and the editor content. You can pass in a string in the format floating point followed by "ch". e.g. 1.3ch. Defaults to 10.

lineHeight?: number

The line height

lineNumbers?: LineNumbersType

Control the rendering of line numbers. If it is a function, it will be invoked when rendering a line number and the return value will be rendered. Otherwise, if it is a truthy, line numbers will be rendered normally (equivalent of using an identity function). Otherwise, line numbers will not be rendered. Defaults to on.

lineNumbersMinChars?: number

Control the width of line numbers, by reserving horizontal space for rendering at least an amount of digits. Defaults to 5.

linkedEditing?: boolean

Enable linked editing. Defaults to false.

links?: boolean

Enable detecting links and making them clickable. Defaults to true.

matchBrackets?: "always" | "never" | "near"

Enable highlighting of matching brackets. Defaults to 'always'.

matchOnWordStartOnly?: boolean

Controls whether suggestions allow matches in the middle of the word instead of only at the beginning

Control the behavior and rendering of the minimap.

mouseStyle?: "default" | "text" | "copy"

Control the mouse pointer style, either 'text' or 'default' or 'copy' Defaults to 'text'

mouseWheelScrollSensitivity?: number

A multiplier to be used on the deltaX and deltaY of mouse wheel scroll events. Defaults to 1.

mouseWheelZoom?: boolean

Zoom the font in the editor when using the mouse wheel in combination with holding Ctrl. Defaults to false.

multiCursorLimit?: number

Controls the max number of text cursors that can be in an active editor at once.

multiCursorMergeOverlapping?: boolean

Merge overlapping selections. Defaults to true

multiCursorModifier?: "ctrlCmd" | "alt"

The modifier to be used to add multiple cursors with the mouse. Defaults to 'alt'

multiCursorPaste?: "spread" | "full"

Configure the behaviour when pasting a text with the line count equal to the cursor count. Defaults to 'spread'.

occurrencesHighlight?: "off" | "singleFile" | "multiFile"

Enable semantic occurrences highlight. Defaults to 'singleFile'. 'off' disables occurrence highlighting 'singleFile' triggers occurrence highlighting in the current document 'multiFile' triggers occurrence highlighting across valid open documents

overflowWidgetsDomNode?: HTMLElement

Place overflow widgets inside an external DOM node. Defaults to an internal DOM node.

overviewRulerBorder?: boolean

Controls if a border should be drawn around the overview ruler. Defaults to true.

overviewRulerLanes?: number

The number of vertical lanes the overview ruler should render. Defaults to 3.

Controls the spacing around the editor.

Parameter hint options.

pasteAs?: IPasteAsOptions

Controls support for changing how content is pasted into the editor.

peekWidgetDefaultFocus?: "tree" | "editor"

Controls whether to focus the inline editor in the peek widget by default. Defaults to false.

quickSuggestions?: boolean | IQuickSuggestionsOptions

Enable quick suggestions (shadow suggestions) Defaults to true.

quickSuggestionsDelay?: number

Quick suggestions show delay (in ms) Defaults to 10 (ms)

readOnly?: boolean

Should the editor be read only. See also domReadOnly. Defaults to false.

readOnlyMessage?: IMarkdownString

The message to display when the editor is readonly.

renameOnType?: boolean

deprecated, use linkedEditing instead

renderControlCharacters?: boolean

Enable rendering of control characters. Defaults to true.

renderFinalNewline?: "off" | "on" | "dimmed"

Render last line number when the file ends with a newline. Defaults to 'on' for Windows and macOS and 'dimmed' for Linux.

renderLineHighlight?: "all" | "line" | "none" | "gutter"

Enable rendering of current line highlight. Defaults to all.

renderLineHighlightOnlyWhenFocus?: boolean

Control if the current line highlight should be rendered only the editor is focused. Defaults to false.

renderValidationDecorations?: "off" | "on" | "editable"

Should the editor render validation decorations. Defaults to editable.

renderWhitespace?: "all" | "none" | "boundary" | "selection" | "trailing"

Enable rendering of whitespace. Defaults to 'selection'.

revealHorizontalRightPadding?: number

When revealing the cursor, a virtual padding (px) is added to the cursor, turning it into a rectangle. This virtual padding ensures that the cursor gets revealed before hitting the edge of the viewport. Defaults to 30 (px).

roundedSelection?: boolean

Render the editor selection with rounded borders. Defaults to true.

rulers?: (number | IRulerOption)[]

Render vertical lines at the specified columns. Defaults to empty array.

screenReaderAnnounceInlineSuggestion?: boolean

Control whether a screen reader announces inline suggestion content immediately.

scrollBeyondLastColumn?: number

Enable that scrolling can go beyond the last column by a number of columns. Defaults to 5.

scrollBeyondLastLine?: boolean

Enable that scrolling can go one screen size after the last line. Defaults to true.

scrollPredominantAxis?: boolean

Enable that the editor scrolls only the predominant axis. Prevents horizontal drift when scrolling vertically on a trackpad. Defaults to true.

Control the behavior and rendering of the scrollbars.

selectOnLineNumbers?: boolean

Should the corresponding line be selected when clicking on the line number? Defaults to true.

selectionClipboard?: boolean

Enable Linux primary clipboard. Defaults to true.

selectionHighlight?: boolean

Enable selection highlight. Defaults to true.

showDeprecated?: boolean

Controls strikethrough deprecated variables.

showFoldingControls?: "always" | "never" | "mouseover"

Controls whether the fold actions in the gutter stay always visible or hide unless the mouse is over the gutter. Defaults to 'mouseover'.

showUnused?: boolean

Controls fading out of unused variables.

smartSelect?: ISmartSelectOptions

Smart select options.

smoothScrolling?: boolean

Enable that the editor animates scrolling to a position. Defaults to false.

snippetSuggestions?: "none" | "top" | "bottom" | "inline"

Enable snippet suggestions. Default to 'true'.

Control the behavior of sticky scroll options

stickyTabStops?: boolean

Emulate selection behaviour of tab characters when using spaces for indentation. This means selection will stick to tab stops.

stopRenderingLineAfter?: number

Performance guard: Stop rendering a line after x characters. Defaults to 10000. Use -1 to never stop rendering

suggest?: ISuggestOptions

Suggest options.

suggestFontSize?: number

The font size for the suggest widget. Defaults to the editor font size.

suggestLineHeight?: number

The line height for the suggest widget. Defaults to the editor line height.

suggestOnTriggerCharacters?: boolean

Enable the suggestion box to pop-up on trigger characters. Defaults to true.

suggestSelection?: "first" | "recentlyUsed" | "recentlyUsedByPrefix"

The history mode for suggestions.

tabCompletion?: "off" | "on" | "onlySnippets"

Enable tab completion.

tabFocusMode?: boolean

Controls whether the editor / terminal receives tabs or defers them to the workbench for navigation.

tabIndex?: number

The tabindex property of the editor's textarea

unfoldOnClickAfterEndOfLine?: boolean

Controls whether clicking on the empty content after a folded line will unfold the line. Defaults to false.

unicodeHighlight?: IUnicodeHighlightOptions

Controls the behavior of the unicode highlight feature (by default, ambiguous and invisible characters are highlighted).

unusualLineTerminators?: "off" | "auto" | "prompt"

Remove unusual line terminators like LINE SEPARATOR (LS), PARAGRAPH SEPARATOR (PS). Defaults to 'prompt'.

useShadowDOM?: boolean

Control if the editor should use shadow DOM.

useTabStops?: boolean

Inserting and deleting whitespace follows tab stops.

wordBreak?: "normal" | "keepAll"

Sets whether line breaks appear wherever the text would otherwise overflow its content box. When wordBreak = 'normal', Use the default line break rule. When wordBreak = 'keepAll', Word breaks should not be used for Chinese/Japanese/Korean (CJK) text. Non-CJK text behavior is the same as for normal.

wordSegmenterLocales?: string | string[]

Locales used for segmenting lines into words when doing word related navigations or operations.

Specify the BCP 47 language tag of the word you wish to recognize (e.g., ja, zh-CN, zh-Hant-TW, etc.). Defaults to empty array

wordSeparators?: string

A string containing the word separators used when doing word navigation. Defaults to `~!@#$%^&*()-=+[{]}\|;:'",.<>/?

wordWrap?: "off" | "on" | "wordWrapColumn" | "bounded"

Control the wrapping of the editor. When wordWrap = "off", the lines will never wrap. When wordWrap = "on", the lines will wrap at the viewport width. When wordWrap = "wordWrapColumn", the lines will wrap at wordWrapColumn. When wordWrap = "bounded", the lines will wrap at min(viewport width, wordWrapColumn). Defaults to "off".

wordWrapBreakAfterCharacters?: string

Configure word wrapping characters. A break will be introduced after these characters.

wordWrapBreakBeforeCharacters?: string

Configure word wrapping characters. A break will be introduced before these characters.

wordWrapColumn?: number

Control the wrapping of the editor. When wordWrap = "off", the lines will never wrap. When wordWrap = "on", the lines will wrap at the viewport width. When wordWrap = "wordWrapColumn", the lines will wrap at wordWrapColumn. When wordWrap = "bounded", the lines will wrap at min(viewport width, wordWrapColumn). Defaults to 80.

wordWrapOverride1?: "off" | "on" | "inherit"

Override the wordWrap setting.

wordWrapOverride2?: "off" | "on" | "inherit"

Override the wordWrapOverride1 setting.

wrappingIndent?: "none" | "same" | "indent" | "deepIndent"

Control indentation of wrapped lines. Can be: 'none', 'same', 'indent' or 'deepIndent'. Defaults to 'same' in vscode and to 'none' in monaco-editor.

wrappingStrategy?: "simple" | "advanced"

Controls the wrapping strategy to use. Defaults to 'simple'.