Class EditorOptions
java.lang.Object
org.primefaces.json.JSONObject
com.github.blutorange.primefaces.config.monacoeditor.EditorOptions
- All Implemented Interfaces:
Serializable
public class EditorOptions extends org.primefaces.json.JSONObject implements Serializable
- See Also:
- Serialized Form
-
Field Summary
-
Constructor Summary
Constructors Constructor Description EditorOptions()
-
Method Summary
Methods inherited from class org.primefaces.json.JSONObject
accumulate, append, doubleToString, get, getBigDecimal, getBigInteger, getBoolean, getDouble, getEnum, getInt, getJSONArray, getJSONObject, getLong, getNames, getNames, getString, has, increment, isNull, keys, keySet, length, names, numberToString, opt, optBigDecimal, optBigInteger, optBoolean, optBoolean, optDouble, optDouble, optEnum, optEnum, optInt, optInt, optJSONArray, optJSONObject, optLong, optLong, optString, optString, put, put, put, put, put, put, put, putOnce, putOpt, quote, quote, remove, similar, stringToValue, testValidity, toJSONArray, toString, toString, valueToString, wrap, write
-
Constructor Details
-
EditorOptions
public EditorOptions()
-
-
Method Details
-
getComments
- Returns:
- Control the behaviour of comments in the editor.
-
setComments
- Parameters:
comments
- Control the behaviour of comments in the editor.- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
getDimension
- Returns:
- The initial editor dimension (to avoid measuring the container).
-
setDimension
- Parameters:
dimension
- The initial editor dimension (to avoid measuring the container).- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
getFind
- Returns:
- Control the behavior of the find widget.
-
setFind
- Parameters:
find
- Control the behavior of the find widget.- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
getGotoLocation
-
setGotoLocation
-
getHover
- Returns:
- Configure the editor's hover.
-
setHover
- Parameters:
hover
- Configure the editor's hover.- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
getLightbulb
- Returns:
- Control the behavior and rendering of the code action lightbulb.
-
setLightbulb
- Parameters:
lightbulb
- Control the behavior and rendering of the code action lightbulb.- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
getMinimap
-
setMinimap
-
isParameterHints
-
setParameterHints
-
getQuickSuggestions
- Returns:
- Enable quick suggestions (shadow suggestions) Defaults to true
-
setQuickSuggestions
- Parameters:
quickSuggestions
- Enable quick suggestions (shadow suggestions) Defaults to true- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
getScrollbar
- Returns:
- Control the behavior and rendering of the scrollbars.
-
setScrollbar
- Parameters:
scrollbar
- Control the behavior and rendering of the scrollbars.- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
getSuggest
- Returns:
- Suggest options.
-
setSuggest
- Parameters:
suggest
- Suggest options.- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
getAutoClosingOvertype
- Returns:
- Options for typing over closing quotes or brackets.
-
setAutoClosingOvertype
- Parameters:
autoClosingOvertype
- Options for typing over closing quotes or brackets.- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
setAutoClosingOvertype
-
getAutoIndent
- Returns:
- Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines. Defaults to
advanced
.
-
setAutoIndent
- Parameters:
autoIndent
- Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines. Defaults toadvanced
.- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
setAutoIndent
-
getAcceptSuggestionOnEnter
- Returns:
- Accept suggestions on ENTER. Defaults to
on
.
-
setAcceptSuggestionOnEnter
- Parameters:
acceptSuggestionOnEnter
- Accept suggestions on ENTER. Defaults toon
.- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
setAcceptSuggestionOnEnter
-
getAccessibilitySupport
- Returns:
- Configure the editor's accessibility support. Defaults to
auto
. It is best to leave this toauto
.
-
setAccessibilitySupport
- Parameters:
accessibilitySupport
- Configure the editor's accessibility support. Defaults toauto
. It is best to leave this toauto
.- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
setAccessibilitySupport
-
isAutoClosingBrackets
- Returns:
- Options for auto closing brackets. Defaults to language defined behavior.
-
setAutoClosingBrackets
- Parameters:
autoClosingBrackets
- Options for auto closing brackets. Defaults to language defined behavior.- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
getAutoClosingQuotes
- Returns:
- Options for auto closing quotes. Defaults to language defined behavior.
-
setAutoClosingQuotes
- Parameters:
autoClosingQuotes
- Options for auto closing quotes. Defaults to language defined behavior.- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
setAutoClosingQuotes
-
getAutoSurround
- Returns:
- Options for auto surrounding. Defaults to always allowing auto surrounding.
-
setAutoSurround
- Parameters:
autoSurround
- Options for auto surrounding. Defaults to always allowing auto surrounding.- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
setAutoSurround
-
getCursorBlinking
- Returns:
- Control the cursor animation style, possible values are
blink
,smooth
,phase
,expand
andsolid
. Defaults toblink
.
-
setCursorBlinking
- Parameters:
cursorBlinking
- Control the cursor animation style, possible values areblink
,smooth
,phase
,expand
andsolid
. Defaults toblink
.- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
setCursorBlinking
-
getCursorStyle
- Returns:
- Control the cursor style, either
block
orline
. Defaults toline
.
-
setCursorStyle
- Parameters:
cursorStyle
- Control the cursor style, eitherblock
orline
. Defaults toline
.- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
setCursorStyle
-
getCursorSurroundingLinesStyle
- Returns:
- Controls when
cursorSurroundingLines
should be enforced Defaults todefault
,cursorSurroundingLines
is not enforced when cursor position is changed by mouse.
-
setCursorSurroundingLinesStyle
public EditorOptions setCursorSurroundingLinesStyle(ECursorSurroundingLinesStyle cursorSurroundingLinesStyle)- Parameters:
cursorSurroundingLinesStyle
- Controls whencursorSurroundingLines
should be enforced Defaults todefault
,cursorSurroundingLines
is not enforced when cursor position is changed by mouse.- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
setCursorSurroundingLinesStyle
-
getFoldingStrategy
- Returns:
- Selects the folding strategy. 'auto' uses the strategies contributed for the current document, 'indentation' uses the indentation based folding strategy. Defaults to 'auto'.
-
setFoldingStrategy
- Parameters:
foldingStrategy
- Selects the folding strategy. 'auto' uses the strategies contributed for the current document, 'indentation' uses the indentation based folding strategy. Defaults to 'auto'.- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
setFoldingStrategy
-
getFontWeight
- Returns:
- The font weight
-
setFontWeight
- Parameters:
fontWeight
- The font weight- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
setFontWeight
-
getLanguage
-
setLanguage
- Parameters:
language
- The initial language of the auto created model in the editor. To not create automatically a model, usemodel: null
.- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
setLanguage
-
getLineNumbers
- Returns:
- 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 truey, line numbers will be rendered normally (equivalent of using an identity function). Otherwise, line numbers will not be rendered. Defaults to
on
.
-
setLineNumbers
- Parameters:
lineNumbers
- 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 truey, line numbers will be rendered normally (equivalent of using an identity function). Otherwise, line numbers will not be rendered. Defaults toon
.- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
setLineNumbers
-
getMatchBrackets
- Returns:
- Enable highlighting of matching brackets. Defaults to
always
.
-
setMatchBrackets
- Parameters:
matchBrackets
- Enable highlighting of matching brackets. Defaults toalways
.- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
setMatchBrackets
-
getMouseStyle
- Returns:
- Control the mouse pointer style, either 'text' or 'default' or 'copy' Defaults to
text
-
setMouseStyle
- Parameters:
mouseStyle
- Control the mouse pointer style, either 'text' or 'default' or 'copy' Defaults totext
- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
setMouseStyle
-
getMultiCursorModifier
- Returns:
- The modifier to be used to add multiple cursors with the mouse. Defaults to
alt
-
setMultiCursorModifier
- Parameters:
multiCursorModifier
- The modifier to be used to add multiple cursors with the mouse. Defaults toalt
- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
setMultiCursorModifier
-
getMultiCursorPaste
- Returns:
- Configure the behaviour when pasting a text with the line count equal to the cursor count. Defaults to
spread
.
-
setMultiCursorPaste
- Parameters:
multiCursorPaste
- Configure the behaviour when pasting a text with the line count equal to the cursor count. Defaults tospread
.- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
setMultiCursorPaste
-
getPeekWidgetDefaultFocus
- Returns:
- Controls whether to focus the inline editor in the peek widget by default. Defaults to
false
.
-
setPeekWidgetDefaultFocus
- Parameters:
peekWidgetDefaultFocus
- Controls whether to focus the inline editor in the peek widget by default. Defaults tofalse
.- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
setPeekWidgetDefaultFocus
-
getRenderLineHighlight
- Returns:
- Enable rendering of current line highlight. Defaults to
all
.
-
setRenderLineHighlight
- Parameters:
renderLineHighlight
- Enable rendering of current line highlight. Defaults toall
.- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
setRenderLineHighlight
-
getRenderValidationDecorations
- Returns:
- Should the editor render validation decorations. Defaults to
editable
.
-
setRenderValidationDecorations
public EditorOptions setRenderValidationDecorations(ERenderValidationDecorations renderValidationDecorations)- Parameters:
renderValidationDecorations
- Should the editor render validation decorations. Defaults toeditable
.- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
setRenderValidationDecorations
-
getRenderWhitespace
- Returns:
- Enable rendering of whitespace. Defaults to
none
.
-
setRenderWhitespace
- Parameters:
renderWhitespace
- Enable rendering of whitespace. Defaults tonone
.- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
setRenderWhitespace
-
getShowFoldingControls
- Returns:
- Controls whether the fold actions in the gutter stay always visible or hide unless the mouse is over the gutter. Defaults to
mouseover
.
-
setShowFoldingControls
- Parameters:
showFoldingControls
- Controls whether the fold actions in the gutter stay always visible or hide unless the mouse is over the gutter. Defaults tomouseover
.- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
setShowFoldingControls
-
getSnippetSuggestions
- Returns:
- Enable snippet suggestions. Defaults to 'inline'.
-
setSnippetSuggestions
- Parameters:
snippetSuggestions
- Enable snippet suggestions. Defaults to 'inline'.- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
setSnippetSuggestions
-
getSuggestSelection
- Returns:
- Keep peek editors open even when double clicking their content or when hitting Escape. Defaults to
false
.
-
setSuggestSelection
- Parameters:
suggestSelection
- Keep peek editors open even when double clicking their content or when hitting Escape. Defaults tofalse
.- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
setSuggestSelection
-
getTabCompletion
- Returns:
- Enable tab completion.
-
setTabCompletion
- Parameters:
tabCompletion
- Enable tab completion.- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
setTabCompletion
-
getTheme
- Returns:
- Initial theme to be used for rendering. The current out-of-the-box available themes are: 'vs' (default), 'vs-dark', 'hc-black'. You can create custom themes via
monaco.editor.defineTheme
. To switch a theme, usemonaco.editor.setTheme
-
setTheme
- Parameters:
theme
- Initial theme to be used for rendering. The current out-of-the-box available themes are: 'vs' (default), 'vs-dark', 'hc-black'. You can create custom themes viamonaco.editor.defineTheme
. To switch a theme, usemonaco.editor.setTheme
- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
setTheme
-
getWordWrap
- Returns:
- Control the wrapping of the editor. When
wordWrap
=off
, the lines will never wrap. WhenwordWrap
=on
, the lines will wrap at the viewport width. WhenwordWrap
=wordWrapColumn
, the lines will wrap atwordWrapColumn
. WhenwordWrap
=bounded
, the lines will wrap atmin(viewport width, wordWrapColumn)
. Defaults tooff
.
-
setWordWrap
- Parameters:
wordWrap
- Control the wrapping of the editor. WhenwordWrap
=off
, the lines will never wrap. WhenwordWrap
=on
, the lines will wrap at the viewport width. WhenwordWrap
=wordWrapColumn
, the lines will wrap atwordWrapColumn
. WhenwordWrap
=bounded
, the lines will wrap atmin(viewport width, wordWrapColumn)
. Defaults tooff
.- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
setWordWrap
-
getWrappingIndent
- Returns:
- Control indentation of wrapped lines. Can be:
none
,same
,indent
ordeepIndent
. Defaults tosame
in vscode and tonone
in monaco-editor.
-
setWrappingIndent
- Parameters:
wrappingIndent
- Control indentation of wrapped lines. Can be:none
,same
,indent
ordeepIndent
. Defaults tosame
in vscode and tonone
in monaco-editor.- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
setWrappingIndent
-
getWrappingStrategy
- Returns:
- Controls the wrapping strategy to use. Defaults to
simple
.
-
setWrappingStrategy
- Parameters:
wrappingStrategy
- Controls the wrapping strategy to use. Defaults tosimple
.- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
setWrappingStrategy
-
getRulers
public org.primefaces.json.JSONArray getRulers()- Returns:
- Render vertical lines at the specified columns. Defaults to empty array.
-
setRulers
- Parameters:
rulers
- Render vertical lines at the specified columns. Defaults to empty array.- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
addRuler
-
setRulers
-
isAcceptSuggestionOnCommitCharacter
- Returns:
- Accept suggestions on provider defined characters. Defaults to true .
-
setAcceptSuggestionOnCommitCharacter
public EditorOptions setAcceptSuggestionOnCommitCharacter(Boolean acceptSuggestionOnCommitCharacter)- Parameters:
acceptSuggestionOnCommitCharacter
- Accept suggestions on provider defined characters. Defaults to true .- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
isAutomaticLayout
- Returns:
- Enable that the editor will install an interval to check if its container dom node size has changed. Enabling this might have a severe performance impact. Defaults to
false
.
-
setAutomaticLayout
- Parameters:
automaticLayout
- Enable that the editor will install an interval to check if its container dom node size has changed. Enabling this might have a severe performance impact. Defaults tofalse
.- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
isCodeLens
- Returns:
- Show code lens Defaults to true .
-
setCodeLens
- Parameters:
codeLens
- Show code lens Defaults to true .- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
isColorDecorators
- Returns:
- Enable inline color decorators and color picker rendering.
-
setColorDecorators
- Parameters:
colorDecorators
- Enable inline color decorators and color picker rendering.- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
isContextmenu
- Returns:
- Enable custom contextmenu. Defaults to true .
-
setContextmenu
- Parameters:
contextmenu
- Enable custom contextmenu. Defaults to true .- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
isCopyWithSyntaxHighlighting
- Returns:
- Syntax highlighting is copied.
-
setCopyWithSyntaxHighlighting
- Parameters:
copyWithSyntaxHighlighting
- Syntax highlighting is copied.- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
isCursorSmoothCaretAnimation
- Returns:
- Enable smooth caret animation. Defaults to
false
.
-
setCursorSmoothCaretAnimation
- Parameters:
cursorSmoothCaretAnimation
- Enable smooth caret animation. Defaults tofalse
.- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
isDetectIndentation
- Returns:
- Controls whether
tabSize
andinsertSpaces
will be automatically detected when a file is opened based on the file contents. Defaults to true .
-
setDetectIndentation
- Parameters:
detectIndentation
- Controls whethertabSize
andinsertSpaces
will be automatically detected when a file is opened based on the file contents. Defaults to true .- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
isDisableLayerHinting
- Returns:
- 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
.
-
setDisableLayerHinting
- Parameters:
disableLayerHinting
- 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 tofalse
.- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
isDisableMonospaceOptimizations
- Returns:
- Disable the optimizations for monospace fonts. Defaults to
false
.
-
setDisableMonospaceOptimizations
- Parameters:
disableMonospaceOptimizations
- Disable the optimizations for monospace fonts. Defaults tofalse
.- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
isDragAndDrop
- Returns:
- Controls if the editor should allow to move selections via drag and drop. Defaults to
false
.
-
setDragAndDrop
- Parameters:
dragAndDrop
- Controls if the editor should allow to move selections via drag and drop. Defaults tofalse
.- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
isEmptySelectionClipboard
- Returns:
- Copying without a selection copies the current line
-
setEmptySelectionClipboard
- Parameters:
emptySelectionClipboard
- Copying without a selection copies the current line- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
isFixedOverflowWidgets
- Returns:
- Display overflow widgets as
fixed
. Defaults tofalse
-
setFixedOverflowWidgets
- Parameters:
fixedOverflowWidgets
- Display overflow widgets asfixed
. Defaults tofalse
- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
isFolding
- Returns:
- Enable code folding. Defaults to true
-
setFolding
- Parameters:
folding
- Enable code folding. Defaults to true- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
isFoldingHighlight
- Returns:
- Enable highlight for folded regions. Defaults to true
-
setFoldingHighlight
- Parameters:
foldingHighlight
- Enable highlight for folded regions. Defaults to true- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
isFontLigatures
- Returns:
- Enable font ligatures. Defaults to
false
-
setFontLigatures
- Parameters:
fontLigatures
- Enable font ligatures. Defaults tofalse
- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
isFormatOnPaste
- Returns:
- Enable format on paste. Defaults to
false
-
setFormatOnPaste
- Parameters:
formatOnPaste
- Enable format on paste. Defaults tofalse
- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
isFormatOnType
- Returns:
- Enable format on type. Defaults to
false
-
setFormatOnType
- Parameters:
formatOnType
- Enable format on type. Defaults tofalse
- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
isGlyphMargin
- Returns:
- Enable the rendering of the glyph margin. Defaults to true in vscode and to
false
in monaco-editor
-
setGlyphMargin
- Parameters:
glyphMargin
- Enable the rendering of the glyph margin. Defaults to true in vscode and tofalse
in monaco-editor- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
isHideCursorInOverviewRuler
- Returns:
- Should the cursor be hidden in the overview ruler. Defaults to
false
-
setHideCursorInOverviewRuler
- Parameters:
hideCursorInOverviewRuler
- Should the cursor be hidden in the overview ruler. Defaults tofalse
- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
isHighlightActiveIndentGuide
- Returns:
- Enable highlighting of the active indent guide. Defaults to true
-
setHighlightActiveIndentGuide
- Parameters:
highlightActiveIndentGuide
- Enable highlighting of the active indent guide. Defaults to true- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
isInsertSpaces
- Returns:
- Insert spaces when pressing
Tab
. This setting is overridden based on the file contents whendetectIndentation
is on. Defaults to true
-
setInsertSpaces
- Parameters:
insertSpaces
- Insert spaces when pressingTab
. This setting is overridden based on the file contents whendetectIndentation
is on. Defaults to true- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
isLargeFileOptimizations
- Returns:
- Special handling for large files to disable certain memory intensive features. Defaults to true
-
setLargeFileOptimizations
- Parameters:
largeFileOptimizations
- Special handling for large files to disable certain memory intensive features. Defaults to true- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
isLinks
- Returns:
- Enable detecting links and making them clickable. Defaults to true
-
setLinks
- Parameters:
links
- Enable detecting links and making them clickable. Defaults to true- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
isMouseWheelZoom
- Returns:
- Zoom the font in the editor when using the mouse wheel in combination with holding Ctrl. Defaults to
false
-
setMouseWheelZoom
- Parameters:
mouseWheelZoom
- Zoom the font in the editor when using the mouse wheel in combination with holding Ctrl. Defaults tofalse
- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
isMultiCursorMergeOverlapping
- Returns:
- Merge overlapping selections. Defaults to true
-
setMultiCursorMergeOverlapping
- Parameters:
multiCursorMergeOverlapping
- Merge overlapping selections. Defaults to true- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
isOccurrencesHighlight
- Returns:
- Enable semantic occurrences highlight. Defaults to true
-
setOccurrencesHighlight
- Parameters:
occurrencesHighlight
- Enable semantic occurrences highlight. Defaults to true- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
isOverviewRulerBorder
- Returns:
- Controls if a border should be drawn around the overview ruler. Defaults to true
-
setOverviewRulerBorder
- Parameters:
overviewRulerBorder
- Controls if a border should be drawn around the overview ruler. Defaults to true- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
isReadOnly
- Returns:
- Should the editor be read only. Defaults to
false
-
setReadOnly
- Parameters:
readOnly
- Should the editor be read only. Defaults tofalse
- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
isRenderControlCharacters
- Returns:
- Enable rendering of control characters. Defaults to
false
-
setRenderControlCharacters
- Parameters:
renderControlCharacters
- Enable rendering of control characters. Defaults tofalse
- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
isRenderFinalNewline
- Returns:
- Render last line number when the file ends with a newline. Defaults to true
-
setRenderFinalNewline
- Parameters:
renderFinalNewline
- Render last line number when the file ends with a newline. Defaults to true- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
isRenderIndentGuides
- Returns:
- Enable rendering of indent guides. Defaults to true
-
setRenderIndentGuides
- Parameters:
renderIndentGuides
- Enable rendering of indent guides. Defaults to true- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
isRoundedSelection
- Returns:
- Render the editor selection with rounded borders. Defaults to true
-
setRoundedSelection
- Parameters:
roundedSelection
- Render the editor selection with rounded borders. Defaults to true- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
isScrollBeyondLastLine
- Returns:
- Enable that scrolling can go one screen size after the last line. Defaults to true
-
setScrollBeyondLastLine
- Parameters:
scrollBeyondLastLine
- Enable that scrolling can go one screen size after the last line. Defaults to true- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
isSelectOnLineNumbers
- Returns:
- Should the corresponding line be selected when clicking on the line number? Defaults to true
-
setSelectOnLineNumbers
- Parameters:
selectOnLineNumbers
- Should the corresponding line be selected when clicking on the line number? Defaults to true- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
isSelectionClipboard
- Returns:
- Enable Linux primary clipboard. Defaults to true
-
setSelectionClipboard
- Parameters:
selectionClipboard
- Enable Linux primary clipboard. Defaults to true- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
isSelectionHighlight
- Returns:
- Enable selection highlight. Defaults to true
-
setSelectionHighlight
- Parameters:
selectionHighlight
- Enable selection highlight. Defaults to true- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
isShowUnused
- Returns:
- Controls fading out of unused variables
-
setShowUnused
- Parameters:
showUnused
- Controls fading out of unused variables- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
isSmoothScrolling
- Returns:
- Enable that the editor animates scrolling to a position. Defaults to
false
-
setSmoothScrolling
- Parameters:
smoothScrolling
- Enable that the editor animates scrolling to a position. Defaults tofalse
- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
isStablePeek
- Returns:
- Keep peek editors open even when double clicking their content or when hitting Escape. Defaults to
false
-
setStablePeek
- Parameters:
stablePeek
- Keep peek editors open even when double clicking their content or when hitting Escape. Defaults tofalse
- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
isSuggestOnTriggerCharacters
- Returns:
- Enable the suggestion box to pop-up on trigger characters. Defaults to true
-
setSuggestOnTriggerCharacters
- Parameters:
suggestOnTriggerCharacters
- Enable the suggestion box to pop-up on trigger characters. Defaults to true- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
isTrimAutoWhitespace
- Returns:
- Remove trailing auto inserted whitespace. Defaults to true .
-
setTrimAutoWhitespace
- Parameters:
trimAutoWhitespace
- Remove trailing auto inserted whitespace. Defaults to true .- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
isUseTabStops
- Returns:
- Inserting and deleting whitespace follows tab stops.
-
setUseTabStops
- Parameters:
useTabStops
- Inserting and deleting whitespace follows tab stops.- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
isWordBasedSuggestions
- Returns:
- Controls whether completions should be computed based on words in the document. Defaults to true .
-
setWordBasedSuggestions
- Parameters:
wordBasedSuggestions
- Controls whether completions should be computed based on words in the document. Defaults to true .- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
isWordWrapMinified
- Returns:
- Force word wrapping when the text appears to be of a minified/generated file. Defaults to
true
.
-
setWordWrapMinified
- Parameters:
wordWrapMinified
- Force word wrapping when the text appears to be of a minified/generated file. Defaults totrue
.- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
getAccessibilityPageSize
- Returns:
- Controls the number of lines in the editor that can be read out by a screen reader
-
setAccessibilityPageSize
- Parameters:
accessibilityPageSize
- Controls the number of lines in the editor that can be read out by a screen reader- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
getCodeActionsOnSaveTimeout
- Returns:
- Timeout for running code actions on save.
-
setCodeActionsOnSaveTimeout
- Parameters:
codeActionsOnSaveTimeout
- Timeout for running code actions on save.- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
getCursorSurroundingLines
- Returns:
- Controls the minimal number of visible leading and trailing lines surrounding the cursor. Defaults to
0
.
-
setCursorSurroundingLines
- Parameters:
cursorSurroundingLines
- Controls the minimal number of visible leading and trailing lines surrounding the cursor. Defaults to0
.- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
getCursorWidth
- Returns:
- Control the width of the cursor when cursorStyle is set to
line
-
setCursorWidth
- Parameters:
cursorWidth
- Control the width of the cursor when cursorStyle is set toline
- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
getFastScrollSensitivity
- Returns:
- FastScrolling mulitplier speed when pressing
Alt
Defaults to5
.
-
setFastScrollSensitivity
- Parameters:
fastScrollSensitivity
- FastScrolling mulitplier speed when pressingAlt
Defaults to5
.- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
getFontSize
- Returns:
- The font size
-
setFontSize
- Parameters:
fontSize
- The font size- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
getLetterSpacing
- Returns:
- The letter spacing
-
setLetterSpacing
- Parameters:
letterSpacing
- The letter spacing- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
getLineHeight
- Returns:
- The line height
-
setLineHeight
- Parameters:
lineHeight
- The line height- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
getLineNumbersMinChars
- Returns:
- 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 truey, line numbers will be rendered normally (equivalent of using an identity function). Otherwise, line numbers will not be rendered. Defaults to
on
.
-
setLineNumbersMinChars
- Parameters:
lineNumbersMinChars
- 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 truey, line numbers will be rendered normally (equivalent of using an identity function). Otherwise, line numbers will not be rendered. Defaults toon
.- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
getMaxTokenizationLineLength
- Returns:
- Lines above this length will not be tokenized for performance reasons. Defaults to
20000
.
-
setMaxTokenizationLineLength
- Parameters:
maxTokenizationLineLength
- Lines above this length will not be tokenized for performance reasons. Defaults to20000
.- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
getMouseWheelScrollSensitivity
- Returns:
- A multiplier to be used on the
deltaX
anddeltaY
of mouse wheel scroll events. Defaults to1
.
-
setMouseWheelScrollSensitivity
- Parameters:
mouseWheelScrollSensitivity
- A multiplier to be used on thedeltaX
anddeltaY
of mouse wheel scroll events. Defaults to1
.- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
getOverviewRulerLanes
- Returns:
- The number of vertical lanes the overview ruler should render. Defaults to
3
.
-
setOverviewRulerLanes
- Parameters:
overviewRulerLanes
- The number of vertical lanes the overview ruler should render. Defaults to3
.- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
getQuickSuggestionsDelay
- Returns:
- Quick suggestions show delay (in ms) Defaults to
10
(ms)
-
setQuickSuggestionsDelay
- Parameters:
quickSuggestionsDelay
- Quick suggestions show delay (in ms) Defaults to10
(ms)- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
getRevealHorizontalRightPadding
- Returns:
- 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).
-
setRevealHorizontalRightPadding
- Parameters:
revealHorizontalRightPadding
- 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 to30
(px).- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
getScrollBeyondLastColumn
- Returns:
- Enable that scrolling can go beyond the last column by a number of columns. Defaults to
5
.
-
setScrollBeyondLastColumn
- Parameters:
scrollBeyondLastColumn
- Enable that scrolling can go beyond the last column by a number of columns. Defaults to5
.- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
getStopRenderingLineAfter
- Returns:
- Performance guard: Stop rendering a line after x characters. Defaults to
10000
. Use-1
to never stop rendering
-
setStopRenderingLineAfter
- Parameters:
stopRenderingLineAfter
- Performance guard: Stop rendering a line after x characters. Defaults to10000
. Use-1
to never stop rendering- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
getSuggestFontSize
- Returns:
- The font size for the suggest widget. Defaults to the editor font size.
-
setSuggestFontSize
- Parameters:
suggestFontSize
- The font size for the suggest widget. Defaults to the editor font size.- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
getSuggestLineHeight
- Returns:
- The line height for the suggest widget. Defaults to the editor line height.
-
setSuggestLineHeight
- Parameters:
suggestLineHeight
- The line height for the suggest widget. Defaults to the editor line height.- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
getTabSize
- Returns:
- The number of spaces a tab is equal to. This setting is overridden based on the file contents when
detectIndentation
is on. Defaults to4
.
-
setTabSize
- Parameters:
tabSize
- The number of spaces a tab is equal to. This setting is overridden based on the file contents whendetectIndentation
is on. Defaults to4
.- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
getWordWrapColumn
- Returns:
- Control the wrapping of the editor. When
wordWrap
=off
, the lines will never wrap. WhenwordWrap
=on
, the lines will wrap at the viewport width. WhenwordWrap
=wordWrapColumn
, the lines will wrap at wordWrapColumn. WhenwordWrap
=bounded
, the lines will wrap at min(viewport width, wordWrapColumn). Defaults to80
.
-
setWordWrapColumn
- Parameters:
wordWrapColumn
- Control the wrapping of the editor. WhenwordWrap
=off
, the lines will never wrap. WhenwordWrap
=on
, the lines will wrap at the viewport width. WhenwordWrap
=wordWrapColumn
, the lines will wrap at wordWrapColumn. WhenwordWrap
=bounded
, the lines will wrap at min(viewport width, wordWrapColumn). Defaults to80
.- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
getLineDecorationsWidth
- Returns:
- 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.
-
setLineDecorationsWidth
- Parameters:
lineDecorationsWidth
- 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 bych
. e.g. 1.3ch. Defaults to 10.- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
setLineDecorationsWidth
-
getAccessibilityHelpUrl
- Returns:
- An URL to open when Ctrl+H (Windows and Linux) or Cmd+H (OSX) is pressed in the accessibility help dialog in the editor.
-
setAccessibilityHelpUrl
- Parameters:
accessibilityHelpUrl
- An URL to open when Ctrl+H (Windows and Linux) or Cmd+H (OSX) is pressed in the accessibility help dialog in the editor.- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
getAriaLabel
- Returns:
- The aria label for the editor's textarea (when it is focused).
-
setAriaLabel
- Parameters:
ariaLabel
- The aria label for the editor's textarea (when it is focused).- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
getExtraEditorClassName
- Returns:
- Class name to be added to the editor.
-
setExtraEditorClassName
- Parameters:
extraEditorClassName
- Class name to be added to the editor.- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
getFontFamily
- Returns:
- The font family
-
setFontFamily
- Parameters:
fontFamily
- The font family- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
getWordSeparators
- Returns:
- A string containing the word separators used when doing word navigation. Defaults to `~!@#$%^&*()-=+[{]}|;:'",.<>/?
-
setWordSeparators
- Parameters:
wordSeparators
- A string containing the word separators used when doing word navigation. Defaults to `~!@#$%^&*()-=+[{]}|;:'",.<>/?- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
getWordWrapBreakAfterCharacters
- Returns:
- Configure word wrapping characters. A break will be introduced after these characters. Defaults to ' })]?|/&.,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」'.
-
setWordWrapBreakAfterCharacters
- Parameters:
wordWrapBreakAfterCharacters
- Configure word wrapping characters. A break will be introduced after these characters. Defaults to ' })]?|/&.,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」'.- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
getWordWrapBreakBeforeCharacters
- Returns:
- Configure word wrapping characters. A break will be introduced before these characters. Defaults to '([{‘“〈《「『【〔([{「£¥$£¥++'.
-
setWordWrapBreakBeforeCharacters
- Parameters:
wordWrapBreakBeforeCharacters
- Configure word wrapping characters. A break will be introduced before these characters. Defaults to '([{‘“〈《「『【〔([{「£¥$£¥++'.- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-