Skip to content

IDiffEditorConstructionOptions

原文链接

https://microsoft.github.io/monaco-editor/docs.html#interfaces/editor.IDiffEditorConstructionOptions.html

diff编辑器的配置选项。

ts
interface IDiffEditorConstructionOptions {
    acceptSuggestionOnCommitCharacter?: boolean;
    acceptSuggestionOnEnter?: "off" | "on" | "smart";
    accessibilityPageSize?: number;
    accessibilitySupport?: "off" | "on" | "auto";
    accessibilityVerbose?: boolean;
    ariaLabel?: string;
    ariaRequired?: boolean;
    autoClosingBrackets?: EditorAutoClosingStrategy;
    autoClosingComments?: EditorAutoClosingStrategy;
    autoClosingDelete?: EditorAutoClosingEditStrategy;
    autoClosingOvertype?: EditorAutoClosingEditStrategy;
    autoClosingQuotes?: EditorAutoClosingStrategy;
    autoIndent?: "none" | "advanced" | "full" | "brackets" | "keep";
    autoSurround?: EditorAutoSurroundStrategy;
    automaticLayout?: boolean;
    bracketPairColorization?: IBracketPairColorizationOptions;
    codeActionsOnSaveTimeout?: number;
    codeLens?: boolean;
    codeLensFontFamily?: string;
    codeLensFontSize?: number;
    colorDecorators?: boolean;
    colorDecoratorsActivatedOn?: "clickAndHover" | "click" | "hover";
    colorDecoratorsLimit?: number;
    columnSelection?: boolean;
    comments?: IEditorCommentsOptions;
    contextmenu?: boolean;
    copyWithSyntaxHighlighting?: boolean;
    cursorBlinking?: "blink" | "smooth" | "phase" | "expand" | "solid";
    cursorSmoothCaretAnimation?: "off" | "on" | "explicit";
    cursorStyle?: "line" | "block" | "underline" | "line-thin" | "block-outline" | "underline-thin";
    cursorSurroundingLines?: number;
    cursorSurroundingLinesStyle?: "default" | "all";
    cursorWidth?: number;
    defaultColorDecorators?: boolean;
    definitionLinkOpensInPeek?: boolean;
    diffAlgorithm?: "advanced" | "legacy";
    diffCodeLens?: boolean;
    diffWordWrap?: "off" | "on" | "inherit";
    dimension?: IDimension;
    disableLayerHinting?: boolean;
    disableMonospaceOptimizations?: boolean;
    domReadOnly?: boolean;
    dragAndDrop?: boolean;
    dropIntoEditor?: IDropIntoEditorOptions;
    emptySelectionClipboard?: boolean;
    enableSplitViewResizing?: boolean;
    experimental?: {
        showEmptyDecorations?: boolean;
        showMoves?: boolean;
    };
    experimentalInlineEdit?: IInlineEditOptions;
    experimentalWhitespaceRendering?: "off" | "svg" | "font";
    extraEditorClassName?: string;
    fastScrollSensitivity?: number;
    find?: IEditorFindOptions;
    fixedOverflowWidgets?: boolean;
    folding?: boolean;
    foldingHighlight?: boolean;
    foldingImportsByDefault?: boolean;
    foldingMaximumRegions?: number;
    foldingStrategy?: "auto" | "indentation";
    fontFamily?: string;
    fontLigatures?: string | boolean;
    fontSize?: number;
    fontVariations?: string | boolean;
    fontWeight?: string;
    formatOnPaste?: boolean;
    formatOnType?: boolean;
    glyphMargin?: boolean;
    gotoLocation?: IGotoLocationOptions;
    guides?: IGuidesOptions;
    hideCursorInOverviewRuler?: boolean;
    hideUnchangedRegions?: {
        contextLineCount?: number;
        enabled?: boolean;
        minimumLineCount?: number;
        revealLineCount?: number;
    };
    hover?: IEditorHoverOptions;
    ignoreTrimWhitespace?: boolean;
    inDiffEditor?: boolean;
    inlayHints?: IEditorInlayHintsOptions;
    inlineCompletionsAccessibilityVerbose?: boolean;
    inlineSuggest?: IInlineSuggestOptions;
    isInEmbeddedEditor?: boolean;
    letterSpacing?: number;
    lightbulb?: IEditorLightbulbOptions;
    lineDecorationsWidth?: string | number;
    lineHeight?: number;
    lineNumbers?: LineNumbersType;
    lineNumbersMinChars?: number;
    linkedEditing?: boolean;
    links?: boolean;
    matchBrackets?: "always" | "never" | "near";
    matchOnWordStartOnly?: boolean;
    maxComputationTime?: number;
    maxFileSize?: number;
    minimap?: IEditorMinimapOptions;
    modifiedAriaLabel?: string;
    mouseStyle?: "default" | "text" | "copy";
    mouseWheelScrollSensitivity?: number;
    mouseWheelZoom?: boolean;
    multiCursorLimit?: number;
    multiCursorMergeOverlapping?: boolean;
    multiCursorModifier?: "ctrlCmd" | "alt";
    multiCursorPaste?: "spread" | "full";
    occurrencesHighlight?: "off" | "singleFile" | "multiFile";
    onlyShowAccessibleDiffViewer?: boolean;
    originalAriaLabel?: string;
    originalEditable?: boolean;
    overflowWidgetsDomNode?: HTMLElement;
    overviewRulerBorder?: boolean;
    overviewRulerLanes?: number;
    padding?: IEditorPaddingOptions;
    parameterHints?: IEditorParameterHintOptions;
    pasteAs?: IPasteAsOptions;
    peekWidgetDefaultFocus?: "tree" | "editor";
    quickSuggestions?: boolean | IQuickSuggestionsOptions;
    quickSuggestionsDelay?: number;
    readOnly?: boolean;
    readOnlyMessage?: IMarkdownString;
    renameOnType?: boolean;
    renderControlCharacters?: boolean;
    renderFinalNewline?: "off" | "on" | "dimmed";
    renderGutterMenu?: boolean;
    renderIndicators?: boolean;
    renderLineHighlight?: "all" | "line" | "none" | "gutter";
    renderLineHighlightOnlyWhenFocus?: boolean;
    renderMarginRevertIcon?: boolean;
    renderOverviewRuler?: boolean;
    renderSideBySide?: boolean;
    renderSideBySideInlineBreakpoint?: number;
    renderValidationDecorations?: "off" | "on" | "editable";
    renderWhitespace?: "all" | "none" | "boundary" | "selection" | "trailing";
    revealHorizontalRightPadding?: number;
    roundedSelection?: boolean;
    rulers?: (number | IRulerOption)[];
    screenReaderAnnounceInlineSuggestion?: boolean;
    scrollBeyondLastColumn?: number;
    scrollBeyondLastLine?: boolean;
    scrollPredominantAxis?: boolean;
    scrollbar?: IEditorScrollbarOptions;
    selectOnLineNumbers?: boolean;
    selectionClipboard?: boolean;
    selectionHighlight?: boolean;
    showDeprecated?: boolean;
    showFoldingControls?: "always" | "never" | "mouseover";
    showUnused?: boolean;
    smartSelect?: ISmartSelectOptions;
    smoothScrolling?: boolean;
    snippetSuggestions?: "none" | "top" | "bottom" | "inline";
    splitViewDefaultRatio?: number;
    stickyScroll?: IEditorStickyScrollOptions;
    stickyTabStops?: boolean;
    stopRenderingLineAfter?: number;
    suggest?: ISuggestOptions;
    suggestFontSize?: number;
    suggestLineHeight?: number;
    suggestOnTriggerCharacters?: boolean;
    suggestSelection?: "first" | "recentlyUsed" | "recentlyUsedByPrefix";
    tabCompletion?: "off" | "on" | "onlySnippets";
    tabFocusMode?: boolean;
    tabIndex?: number;
    unfoldOnClickAfterEndOfLine?: boolean;
    unicodeHighlight?: IUnicodeHighlightOptions;
    unusualLineTerminators?: "off" | "auto" | "prompt";
    useInlineViewWhenSpaceIsLimited?: boolean;
    useShadowDOM?: boolean;
    useTabStops?: boolean;
    wordBreak?: "normal" | "keepAll";
    wordSegmenterLocales?: string | string[];
    wordSeparators?: string;
    wordWrap?: "off" | "on" | "wordWrapColumn" | "bounded";
    wordWrapBreakAfterCharacters?: string;
    wordWrapBreakBeforeCharacters?: string;
    wordWrapColumn?: number;
    wordWrapOverride1?: "off" | "on" | "inherit";
    wordWrapOverride2?: "off" | "on" | "inherit";
    wrappingIndent?: "none" | "same" | "indent" | "deepIndent";
    wrappingStrategy?: "simple" | "advanced";
}

快捷链接

PacceptSuggestionOnCommitCharacter
PacceptSuggestionOnEnter
PaccessibilityPageSize
PaccessibilitySupport
PaccessibilityVerbose
PariaLabel
PariaRequired
PautoClosingBrackets
PautoClosingComments
PautoClosingDelete
PautoClosingOvertype
PautoClosingQuotes
PautoIndent
PautoSurround
PautomaticLayout
PbracketPairColorization
PcodeActionsOnSaveTimeout
PcodeLens
PcodeLensFontFamily
PcodeLensFontSize
PcolorDecorators
PcolorDecoratorsActivatedOn
PcolorDecoratorsLimit
PcolumnSelection
Pcomments
Pcontextmenu
PcopyWithSyntaxHighlighting
PcursorBlinking
PcursorSmoothCaretAnimation
PcursorStyle
PcursorSurroundingLines
PcursorSurroundingLinesStyle
PcursorWidth
PdefaultColorDecorators
PdefinitionLinkOpensInPeek
PdiffAlgorithm
PdiffCodeLens
PdiffWordWrap
Pdimension
PdisableLayerHinting
PdisableMonospaceOptimizations
PdomReadOnly
PdragAndDrop
PdropIntoEditor
PemptySelectionClipboard
PenableSplitViewResizing
Pexperimental
PexperimentalInlineEdit
PexperimentalWhitespaceRendering
PextraEditorClassName
PfastScrollSensitivity
Pfind
PfixedOverflowWidgets
Pfolding
PfoldingHighlight
PfoldingImportsByDefault
PfoldingMaximumRegions
PfoldingStrategy
PfontFamily
PfontLigatures
PfontSize
PfontVariations
PfontWeight
PformatOnPaste
PformatOnType
PglyphMargin
PgotoLocation
Pguides
PhideCursorInOverviewRuler
PhideUnchangedRegions
Phover
PignoreTrimWhitespace
PinDiffEditor
PinlayHints
PinlineCompletionsAccessibilityVerbose
PinlineSuggest
PisInEmbeddedEditor
PletterSpacing
Plightbulb
PlineDecorationsWidth
PlineHeight
PlineNumbers
PlineNumbersMinChars
PlinkedEditing
Plinks
PmatchBrackets
PmatchOnWordStartOnly
PmaxComputationTime
PmaxFileSize
Pminimap
PmodifiedAriaLabel
PmouseStyle
PmouseWheelScrollSensitivity
PmouseWheelZoom
PmultiCursorLimit
PmultiCursorMergeOverlapping
PmultiCursorModifier
PmultiCursorPaste
PoccurrencesHighlight
PonlyShowAccessibleDiffViewer
PoriginalAriaLabel
PoriginalEditable
PoverflowWidgetsDomNode
PoverviewRulerBorder
PoverviewRulerLanes
Ppadding
PparameterHints
PpasteAs
PpeekWidgetDefaultFocus
PquickSuggestions
PquickSuggestionsDelay
PreadOnly
PreadOnlyMessage
PrenameOnType
PrenderControlCharacters
PrenderFinalNewline
PrenderGutterMenu
PrenderIndicators
PrenderLineHighlight
PrenderLineHighlightOnlyWhenFocus
PrenderMarginRevertIcon
PrenderOverviewRuler
PrenderSideBySide
PrenderSideBySideInlineBreakpoint
PrenderValidationDecorations
PrenderWhitespace
PrevealHorizontalRightPadding
ProundedSelection
Prulers
PscreenReaderAnnounceInlineSuggestion
PscrollBeyondLastColumn
PscrollBeyondLastLine
PscrollPredominantAxis
Pscrollbar
PselectOnLineNumbers
PselectionClipboard
PselectionHighlight
PshowDeprecated
PshowFoldingControls
PshowUnused
PsmartSelect
PsmoothScrolling
PsnippetSuggestions
PsplitViewDefaultRatio
PstickyScroll
PstickyTabStops
PstopRenderingLineAfter
Psuggest
PsuggestFontSize
PsuggestLineHeight
PsuggestOnTriggerCharacters
PsuggestSelection
PtabCompletion
PtabFocusMode
PtabIndex
PunfoldOnClickAfterEndOfLine
PunicodeHighlight
PunusualLineTerminators
PuseInlineViewWhenSpaceIsLimited
PuseShadowDOM
PuseTabStops
PwordBreak
PwordSegmenterLocales
PwordSeparators
PwordWrap
PwordWrapBreakAfterCharacters
PwordWrapBreakBeforeCharacters
PwordWrapColumn
PwordWrapOverride1
PwordWrapOverride2
PwrappingIndent
PwrappingStrategy

acceptSuggestionOnCommitCharacter

  • 类型: boolean
  • 描述: 接受有关提供程序定义的字符的建议。默认为true。

acceptSuggestionOnEnter

  • 类型: "off" | "on" | "smart"
  • 描述: 接受有关 enter回车 的建议。默认为“on”。

accessibilityPageSize

  • 类型: number
  • 描述: 控制编辑器中屏幕阅读器可以读取的行数

accessibilitySupport

  • 类型: "auto" | "on" | "off"
  • 描述: 配置编辑器的辅助功能支持。默认为“auto”。最好将此项留给“auto”。

accessibilityVerbose

  • 类型: boolean
  • 描述: diff编辑器aria标签是否应该冗长。

ariaLabel

  • 类型: string
  • 描述: 编辑器文本区域的咏叹调标签(当它被聚焦时)。

ariaRequired

  • 类型: boolean
  • 描述: 是否应在编辑器文本区域上设置aria-required属性。

autoClosingBrackets

autoClosingComments

autoClosingDelete

autoClosingOvertype

autoClosingQuotes

autoIndent

  • 类型: "none" | "advanced" | "full" | "brackets" | "keep"
  • 描述:控制当用户键入、粘贴、移动或缩进行时,编辑器是否应自动调整缩进。默认为高级。

autoSurround

automaticLayout

  • 类型: boolean
  • 描述:控制编辑器是否应自动调整其大小以适应其内容。默认为false。

bracketPairColorization

codeActionsOnSaveTimeout

  • 类型: number
  • 描述:代码操作保存超时(毫秒)。

codeLens

  • 类型: boolean
  • 描述:控制编辑器是否应显示代码 lens。默认为true。

codeLensFontFamily

  • 类型: string
  • 描述:代码 lens 字体。

codeLensFontSize

  • 类型: number
  • 描述:代码 lens 字体大小。

colorDecorators

  • 类型: boolean
  • 描述:启用内联颜色装饰器和颜色选择器渲染。

colorDecoratorsActivatedOn

  • 类型: "clickAndHover" | "click" | "hover"
  • 描述:代码 lens 激活方式。

colorDecoratorsLimit

  • 类型: number
  • 描述:控制编辑器中可以同时渲染的颜色装饰器的最大数量。

columnSelection

  • 类型: boolean
  • 描述:启用多列选择。

comments

contextmenu

  • 类型: boolean
  • 描述:控制编辑器是否应显示上下文菜单。默认为true。

copyWithSyntaxHighlighting

  • 类型: boolean
  • 描述:复制时是否应保留语法高亮.

cursorBlinking

  • 类型: "blink" | "smooth" | "phase" | "expand" | "solid"
  • 描述:控制光标闪烁的样式。默认为“blink”。

cursorSmoothCaretAnimation

  • 类型: "off" | "on" | "explicit"
  • 描述:控制光标是否应闪烁。

cursorStyle

  • 类型: "line" | "block" | "underline" | "line-thin" | "block-outline" | "underline-thin"
  • 描述:控制光标样式。默认为 line。

cursorSurroundingLines

  • 类型: number
  • 描述:控制光标周围行的数量。

cursorSurroundingLinesStyle

  • 类型: "default" | "all"
  • 描述:控制光标周围行的样式。默认为“default”。

cursorWidth

  • 类型: number
  • 描述:当cursorStyle设置为“line”时控制光标的宽度

defaultColorDecorators

  • 类型: boolean
  • 描述:启用内联颜色装饰器和颜色选择器渲染。

definitionLinkOpensInPeek

  • 类型: boolean
  • 描述:是否应在编辑器中打开定义链接。默认为false。

diffAlgorithm

  • 类型: "advanced" | "legacy"
  • 描述:控制编辑器是否应使用高级算法来计算差异。默认为“advanced”。

diffCodeLens

  • 类型: boolean
  • 描述:控制编辑器是否应显示定义链接。默认为false。

diffWordWrap

  • 类型: "off" | "on" | "inherit"
  • 描述:控制差异编辑器的包装。

dimension

  • 类型: IDimension
  • 描述:初始编辑器尺寸(以避免测量容器)。

disableLayerHinting

  • 类型: boolean
  • 描述:控制编辑器是否应禁用层提示。默认为false。

disableMonospaceOptimizations

  • 类型: boolean
  • 描述:控制编辑器是否应禁用 monospace 优化。默认为false。

domReadOnly

  • 类型: boolean
  • 描述:控制编辑器是否应禁用 DOM 读取。默认为false。

dragAndDrop

  • 类型: boolean
  • 描述:控制编辑器是否应禁用拖放。默认为false。

dropIntoEditor

emptySelectionClipboard

  • 类型: boolean
  • 描述:在没有选择的情况下复制会复制当前行。

enableSplitViewResizing

  • 类型: boolean
  • 描述:控制编辑器是否应允许调整视图。默认为true。

experimental

  • 类型: { showEmptyDecorations?: boolean; showMoves?: boolean;}
  • 描述:启用实验性功能。

experimentalInlineEdit

experimentalWhitespaceRendering

  • 类型: "off" | "svg" | "font"
  • 描述:启用实验性空白呈现。默认为“svg”。

extraEditorClassName

  • 类型: string
  • 描述:编辑器类名。

fastScrollSensitivity

  • 类型: number
  • 描述:按下Alt键时的快速滚动倍速,默认为5。

find

fixedOverflowWidgets

  • 类型: boolean
  • 描述:将溢出小部件显示为已修复。默认为false。

folding

  • 类型: boolean
  • 描述:控制编辑器是否应显示折叠。默认为true。

foldingHighlight

  • 类型: boolean
  • 描述:控制编辑器是否应显示折叠高亮。默认为true。

foldingImportsByDefault

  • 类型: boolean
  • 描述:控制编辑器是否应折叠导入。默认为false。

foldingMaximumRegions

  • 类型: number
  • 描述:控制编辑器中可以折叠的最大区域数。

foldingStrategy

  • 类型: "auto" | "indentation"
  • 描述:选择折叠策略。'auto使用为当前文档贡献的策略,indentation使用基于缩进的折叠策略。默认为“auto”。

fontFamily

  • 类型: string
  • 描述:编辑器字体。

fontLigatures

  • 类型: boolean | string
  • 描述:启用字体变体。

fontSize

  • 类型: number
  • 描述:编辑器字体大小。

fontVariations

  • 类型: string
  • 描述:启用字体变体。默认为false。

fontWeight

  • 类型: string
  • 描述:编辑器字体粗细。

formatOnPaste

  • 类型: boolean
  • 描述:粘贴时是否应格式化。默认为false。

formatOnType

  • 类型: boolean
  • 描述:对类型启用格式。默认为false。

glyphMargin

  • 类型: boolean
  • 描述:控制编辑器是否应显示光标。默认为false。

gotoLocation

guides

hideCursorInOverviewRuler

  • 类型: boolean
  • 描述:控制编辑器是否应隐藏光标。默认为false。

hideUnchangedRegions

  • 类型: { contextLineCount?: number; enabled?: boolean; minimumLineCount?: number; revealLineCount?: number; }

hover

ignoreTrimWhitespace

  • 类型: boolean
  • 描述:控制编辑器是否应忽略缩进。默认为true。

inDiffEditor

  • 类型: boolean
  • 描述:控制编辑器是否应显示差异编辑器。默认为false。

inlayHints

inlineCompletionsAccessibilityVerbose

  • 类型: boolean
  • 描述:控制在显示内联完成时是否应向屏幕阅读器用户提供辅助功能提示。

inlineSuggest

isInEmbeddedEditor

  • 类型: boolean
  • 描述:控制编辑器是否应显示嵌入编辑器。默认为false。

letterSpacing

  • 类型: number
  • 描述:编辑器字符间距。

lightbulb

lineDecorationsWidth

  • 类型: number | string
  • 描述:编辑器行装饰器宽度。

lineHeight

  • 类型: number
  • 描述:编辑器行高。

lineNumbers

lineNumbersMinChars

  • 类型: number
  • 描述:编辑器行号最小字符数。

linkedEditing

  • 类型: boolean
  • 描述:控制编辑器是否应显示链接编辑。默认为false。
  • 类型: boolean
  • 描述:控制编辑器是否应显示链接。默认为false。

matchBrackets

  • 类型: "always" | "never" | "near"
  • 描述:控制编辑器是否应显示匹配括号。默认为“always”。

matchOnWordStartOnly

  • 类型: boolean
  • 描述:控制建议是否允许在单词中间而不是仅在开头进行匹配

maxComputationTime

  • 类型: number
  • 描述:超时(以毫秒为单位),在此之后将取消差异计算。默认值为5000。

maxFileSize

  • 类型: number
  • 描述:支持的最大文件大小(MB)。默认为50。

minimap

modifiedAriaLabel

  • 类型: string
  • 描述:Aria标签修改编辑器。

mouseStyle

  • 类型: "default" | "text" | "copy"
  • 描述:控制鼠标指针样式,“text”或“default”或“copy” 默认为“text”

mouseWheelScrollSensitivity

  • 类型: number
  • 描述:鼠标滚轮滚动速度。

mouseWheelZoom

  • 类型: boolean
  • 描述:控制编辑器是否应缩放鼠标滚轮。默认为false。

multiCursorLimit

  • 类型: number
  • 描述:控制一次可以在活动编辑器中使用的文本光标的最大数量。

multiCursorMergeOverlapping

  • 类型: boolean
  • 描述:控制编辑器是否应合并重叠的文本光标。默认为true。

multiCursorModifier

  • 类型: "ctrlCmd" | "alt"
  • 描述:用于使用鼠标添加多个光标的修改器。默认为“alt”

multiCursorPaste

  • 类型: "spread" | "full"
  • 描述:配置粘贴行数等于光标数的文本时的行为。默认为“spread”。

occurrencesHighlight

  • 类型: "off" | "singleFile" | "multiFile"
  • 描述:启用语义出现高亮显示。默认为“singleFile”off禁用突出显示“singleFile”触发当前文档中的突出显示“multiFile”触发有效打开文档中的高亮显示

onlyShowAccessibleDiffViewer

  • 类型: boolean
  • 描述:如果diff编辑器应该只显示差异审查模式。

originalAriaLabel

  • 类型: string
  • 描述:Aria标签原始编辑器。

originalEditable

  • 类型: boolean
  • 描述:控制编辑器是否应显示原始编辑器。默认为false。

overflowWidgetsDomNode

  • 类型: HTMLElement
  • 描述:用于放置悬停提示和悬停提示的DOM节点。

overviewRulerBorder

  • 类型: boolean
  • 描述:控制编辑器是否应显示缩略图。默认为false。

overviewRulerLanes

  • 类型: number
  • 描述:编辑器缩略图行数。

padding

parameterHints

pasteAs

  • 类型: IPasteAsOptions
  • 描述:控制对更改内容粘贴到编辑器的方式的支持。

peekWidgetDefaultFocus

  • 类型: "tree" | "editor"
  • 描述:控制默认情况下是否将内联编辑器集中在peek小部件中。默认为false。

quickSuggestions

quickSuggestionsDelay

  • 类型: number
  • 描述:快速建议显示延迟(毫秒)。

readOnly

  • 类型: boolean
  • 描述:控制编辑器是否应显示只读。默认为false。

readOnlyMessage

  • 类型: IMarkdownString
  • 描述:控制编辑器是否应显示只读消息。默认为false。

renameOnType

  • 类型: boolean
  • 描述:控制编辑器是否应显示重命名。默认为false。

renderControlCharacters

  • 类型: boolean
  • 描述:启用控制字符的呈现。默认为true。

renderFinalNewline

  • 类型: "off" | "on" | "dimmed"
  • 描述:当文件以换行符结束时,渲染最后一个行号。Windows和macOS的默认值为“on”,Linux的默认值则为“暗显”。

renderGutterMenu

  • 类型: boolean
  • 描述:控制编辑器是否应显示行号

renderIndicators

  • 类型: boolean
  • 描述:渲染添加/删除更改的+/-指示符。默认为true。

renderLineHighlight

  • 类型: "all" | "line" | "none" | "gutter"
  • 描述:启用当前线高亮显示的渲染。默认为 ‘all’。

renderLineHighlightOnlyWhenFocus

  • 类型: boolean
  • 描述:控制是否应仅在编辑器聚焦时渲染当前行高光。默认为false。

renderMarginRevertIcon

  • 类型: boolean
  • 描述:控制编辑器是否应显示撤消图标

renderOverviewRuler

  • 类型: boolean
  • 描述:是diff编辑器应该呈现概览标尺默认值为true

renderSideBySide

  • 类型: boolean
  • 描述:在两个并排的编辑器中呈现差异。默认为true。

renderSideBySideInlineBreakpoint

  • 类型: number
  • 描述:如果启用renderSideBySide,设置useInlineViewWhenSpaceIsLimited,并且diff编辑器的宽度小于renderSideBySideInlineBreakpoint,则使用内联视图。

renderValidationDecorations

  • 类型: "off" | "on" | "editable"
  • 描述:控制编辑器是否应显示验证装饰。默认为“editable”。

renderWhitespace

  • 类型: "all" | "none" | "boundary" | "selection" | "trailing"
  • 描述:启用空白的呈现。默认为“selection”。

revealHorizontalRightPadding

  • 类型: number
  • 描述:当显示光标时,会向光标添加一个虚拟填充(px),将其变成一个矩形。此虚拟填充可确保光标在碰到视口边缘之前显示出来。默认值为30(px)。

roundedSelection

  • 类型: boolean
  • 描述:控制编辑器是否应显示当前行高亮显示。默认为true。

rulers

  • 类型: (number | IRulerOption)[]
  • 描述:编辑器中显示的行数。

screenReaderAnnounceInlineSuggestion

  • 类型: boolean
  • 描述:控制屏幕阅读器是否立即公布内联建议内容。

scrollBeyondLastColumn

  • 类型: number
  • 描述:启用滚动可以超出最后一列若干列。默认值为5。

scrollBeyondLastLine

  • 类型: boolean
  • 描述:启用滚动可以超出最后一行。默认为true。

scrollPredominantAxis

  • 类型: boolean
  • 描述:控制编辑器是否应滚动到主轴。默认为true。

scrollbar

selectOnLineNumbers

  • 类型: boolean
  • 描述:单击行号时是否应选择相应的行,默认为true。

selectionClipboard

  • 类型: boolean
  • 描述:启用复制到剪贴板。默认为true。

selectionHighlight

  • 类型: boolean
  • 描述:启用选择高亮。默认为true。

showDeprecated

  • 类型: boolean
  • 描述:控制编辑器是否应显示弃用。默认为true。

showFoldingControls

  • 类型: "always" | "never" | "mouseover"
  • 描述:控制边沟中的折叠动作是始终可见还是隐藏,除非鼠标位于边沟上。默认为“mouseover”。

showUnused

  • 类型: boolean
  • 描述:控制未使用变量的淡出。

smartSelect

smoothScrolling

  • 类型: boolean
  • 描述:控制编辑器是否应平滑滚动。

snippetSuggestions

  • 类型: "none" | "top" | "bottom" | "inline"
  • 描述:启用代码段建议。

splitViewDefaultRatio

  • 类型: number
  • 描述:编辑器中显示的行数。

stickyScroll

stickyTabStops

  • 类型: boolean
  • 描述:当使用空格进行缩进时,模拟制表符的选择行为。这意味着选择将停留在制表位。

stopRenderingLineAfter

  • 类型: number
  • 描述:控制编辑器是否应停止渲染行。默认为10000。

suggest

suggestFontSize

  • 类型: number
  • 描述:控制编辑器是否应显示建议。

suggestLineHeight

  • 类型: number
  • 描述:建议小部件的行高度。默认为编辑器的行高度。

suggestOnTriggerCharacters

  • 类型: boolean
  • 描述:启用建议框以在触发字符上弹出。默认为true。

suggestSelection

  • 类型: "first" | "recentlyUsed" | "recentlyUsedByPrefix"
  • 描述:建议的历史模式。

tabCompletion

  • 类型: "off" | "on" | "onlySnippets"
  • 描述:启用选项卡完成。

tabFocusMode

  • 类型: boolean
  • 描述:控制编辑器/终端是接收选项卡还是将选项卡推迟到工作台进行导航。

tabIndex

  • 类型: number
  • 描述:编辑器的文本区域的tabindex属性

unfoldOnClickAfterEndOfLine

  • 类型: boolean
  • 描述:控制在折叠线之后单击空内容是否会展开该线。默认为false。

unicodeHighlight

  • 类型: IUnicodeHighlightOptions
  • 描述:控制unicode高亮显示功能的行为(默认情况下,会高亮显示不明确和不可见的字符)。

unusualLineTerminators

  • 类型: "off" | "auto" | "prompt"
  • 描述:拆除不常见的线路终端,如线路分离器(LS)、段落分离器(PS)。默认为“提示”。

useInlineViewWhenSpaceIsLimited

  • 类型: boolean
  • 描述:启用内联视图。

useShadowDOM

  • 类型: boolean
  • 描述:启用Shadow DOM。

useTabStops

  • 类型: boolean
  • 描述:启用制表符。

wordBreak

  • 类型: "normal" | "keepAll"
  • 描述:设置是否在文本溢出其内容框的任何位置显示换行符。当wordBreak='normal'时,使用默认换行规则。当wordBreak='keepAll'时,中文/日语/韩语(CJK)文本不应使用断字符。非CJK文本行为与正常情况相同。

wordSegmenterLocales

  • 类型: string | string[]
  • 描述:设置wordSegmenter支持的语言列表。

wordSeparators

  • 类型: string
  • 描述:设置单词分隔符。

wordWrap

  • 类型: "off" | "on" | "wordWrapColumn" | "bounded"
  • 描述:控制编辑器的换行。当wordWrap=“off”时,行将永远不会换行。当wordWrap=“on”时,线条将按视口宽度进行换行。当wordWrap=“wordWrapColumn”时,行将在wordWrapVolume处换行。当wordWrap=“bounded”时,线条将以最小值换行(视口宽度,wordWrapColumn)。默认为“关闭”。

wordWrapBreakAfterCharacters

  • 类型: string
  • 描述:配置换行字符。在这些字符之后将引入一个break。

wordWrapBreakBeforeCharacters

  • 类型: string
  • 描述:配置换行字符。在这些字符之前将引入一个break。

wordWrapColumn

  • 类型: number
  • 描述:控制编辑器换行。默认为80。

wordWrapOverride1

  • 类型: "off" | "on" | "inherit"
  • 描述:覆盖wordWrap设置。

wordWrapOverride2

  • 类型: "off" | "on" | "inherit"
  • 描述:覆盖 wordWrapOverride1 设置。

wrappingIndent

  • 类型: "none" | "same" | "indent" | "deepIndent"
  • 描述:控制换行的缩进。可以是:“none”、“same”、“indent”或“deepIndent”。在vscode中默认为“same”,在monaco编辑器中则默认为“none”。

wrappingStrategy

  • 类型: "simple" | "advanced"
  • 描述:控制要使用的包装策略。默认为“simple”。