in patched-vscode/src/vs/editor/common/config/editorOptions.ts [5231:5824]
enabled: boolean(input.enabled, this.defaultValue.enabled),
showPasteSelector: stringSet(input.showPasteSelector, this.defaultValue.showPasteSelector, ['afterPaste', 'never']),
};
}
}
//#endregion
const DEFAULT_WINDOWS_FONT_FAMILY = 'Consolas, \'Courier New\', monospace';
const DEFAULT_MAC_FONT_FAMILY = 'Menlo, Monaco, \'Courier New\', monospace';
const DEFAULT_LINUX_FONT_FAMILY = '\'Droid Sans Mono\', \'monospace\', monospace';
/**
* @internal
*/
export const EDITOR_FONT_DEFAULTS = {
fontFamily: (
platform.isMacintosh ? DEFAULT_MAC_FONT_FAMILY : (platform.isLinux ? DEFAULT_LINUX_FONT_FAMILY : DEFAULT_WINDOWS_FONT_FAMILY)
),
fontWeight: 'normal',
fontSize: (
platform.isMacintosh ? 12 : 14
),
lineHeight: 0,
letterSpacing: 0,
};
/**
* @internal
*/
export const editorOptionsRegistry: IEditorOption<EditorOption, any>[] = [];
function register<K extends EditorOption, V>(option: IEditorOption<K, V>): IEditorOption<K, V> {
editorOptionsRegistry[option.id] = option;
return option;
}
export const enum EditorOption {
acceptSuggestionOnCommitCharacter,
acceptSuggestionOnEnter,
accessibilitySupport,
accessibilityPageSize,
ariaLabel,
ariaRequired,
autoClosingBrackets,
autoClosingComments,
screenReaderAnnounceInlineSuggestion,
autoClosingDelete,
autoClosingOvertype,
autoClosingQuotes,
autoIndent,
automaticLayout,
autoSurround,
bracketPairColorization,
guides,
codeLens,
codeLensFontFamily,
codeLensFontSize,
colorDecorators,
colorDecoratorsLimit,
columnSelection,
comments,
contextmenu,
copyWithSyntaxHighlighting,
cursorBlinking,
cursorSmoothCaretAnimation,
cursorStyle,
cursorSurroundingLines,
cursorSurroundingLinesStyle,
cursorWidth,
disableLayerHinting,
disableMonospaceOptimizations,
domReadOnly,
dragAndDrop,
dropIntoEditor,
emptySelectionClipboard,
experimentalWhitespaceRendering,
extraEditorClassName,
fastScrollSensitivity,
find,
fixedOverflowWidgets,
folding,
foldingStrategy,
foldingHighlight,
foldingImportsByDefault,
foldingMaximumRegions,
unfoldOnClickAfterEndOfLine,
fontFamily,
fontInfo,
fontLigatures,
fontSize,
fontWeight,
fontVariations,
formatOnPaste,
formatOnType,
glyphMargin,
gotoLocation,
hideCursorInOverviewRuler,
hover,
inDiffEditor,
inlineSuggest,
inlineEdit,
letterSpacing,
lightbulb,
lineDecorationsWidth,
lineHeight,
lineNumbers,
lineNumbersMinChars,
linkedEditing,
links,
matchBrackets,
minimap,
mouseStyle,
mouseWheelScrollSensitivity,
mouseWheelZoom,
multiCursorMergeOverlapping,
multiCursorModifier,
multiCursorPaste,
multiCursorLimit,
occurrencesHighlight,
overviewRulerBorder,
overviewRulerLanes,
padding,
pasteAs,
parameterHints,
peekWidgetDefaultFocus,
definitionLinkOpensInPeek,
quickSuggestions,
quickSuggestionsDelay,
readOnly,
readOnlyMessage,
renameOnType,
renderControlCharacters,
renderFinalNewline,
renderLineHighlight,
renderLineHighlightOnlyWhenFocus,
renderValidationDecorations,
renderWhitespace,
revealHorizontalRightPadding,
roundedSelection,
rulers,
scrollbar,
scrollBeyondLastColumn,
scrollBeyondLastLine,
scrollPredominantAxis,
selectionClipboard,
selectionHighlight,
selectOnLineNumbers,
showFoldingControls,
showUnused,
snippetSuggestions,
smartSelect,
smoothScrolling,
stickyScroll,
stickyTabStops,
stopRenderingLineAfter,
suggest,
suggestFontSize,
suggestLineHeight,
suggestOnTriggerCharacters,
suggestSelection,
tabCompletion,
tabIndex,
unicodeHighlighting,
unusualLineTerminators,
useShadowDOM,
useTabStops,
wordBreak,
wordSegmenterLocales,
wordSeparators,
wordWrap,
wordWrapBreakAfterCharacters,
wordWrapBreakBeforeCharacters,
wordWrapColumn,
wordWrapOverride1,
wordWrapOverride2,
wrappingIndent,
wrappingStrategy,
showDeprecated,
inlayHints,
// Leave these at the end (because they have dependencies!)
editorClassName,
pixelRatio,
tabFocusMode,
layoutInfo,
wrappingInfo,
defaultColorDecorators,
colorDecoratorsActivatedOn,
inlineCompletionsAccessibilityVerbose
}
export const EditorOptions = {
acceptSuggestionOnCommitCharacter: register(new EditorBooleanOption(
EditorOption.acceptSuggestionOnCommitCharacter, 'acceptSuggestionOnCommitCharacter', true,
{ markdownDescription: nls.localize('acceptSuggestionOnCommitCharacter', "Controls whether suggestions should be accepted on commit characters. For example, in JavaScript, the semi-colon (`;`) can be a commit character that accepts a suggestion and types that character.") }
)),
acceptSuggestionOnEnter: register(new EditorStringEnumOption(
EditorOption.acceptSuggestionOnEnter, 'acceptSuggestionOnEnter',
'on' as 'on' | 'smart' | 'off',
['on', 'smart', 'off'] as const,
{
markdownEnumDescriptions: [
'',
nls.localize('acceptSuggestionOnEnterSmart', "Only accept a suggestion with `Enter` when it makes a textual change."),
''
],
markdownDescription: nls.localize('acceptSuggestionOnEnter', "Controls whether suggestions should be accepted on `Enter`, in addition to `Tab`. Helps to avoid ambiguity between inserting new lines or accepting suggestions.")
}
)),
accessibilitySupport: register(new EditorAccessibilitySupport()),
accessibilityPageSize: register(new EditorIntOption(EditorOption.accessibilityPageSize, 'accessibilityPageSize', 10, 1, Constants.MAX_SAFE_SMALL_INTEGER,
{
description: nls.localize('accessibilityPageSize', "Controls the number of lines in the editor that can be read out by a screen reader at once. When we detect a screen reader we automatically set the default to be 500. Warning: this has a performance implication for numbers larger than the default."),
tags: ['accessibility']
})),
ariaLabel: register(new EditorStringOption(
EditorOption.ariaLabel, 'ariaLabel', nls.localize('editorViewAccessibleLabel', "Editor content")
)),
ariaRequired: register(new EditorBooleanOption(
EditorOption.ariaRequired, 'ariaRequired', false, undefined
)),
screenReaderAnnounceInlineSuggestion: register(new EditorBooleanOption(
EditorOption.screenReaderAnnounceInlineSuggestion, 'screenReaderAnnounceInlineSuggestion', true,
{
description: nls.localize('screenReaderAnnounceInlineSuggestion', "Control whether inline suggestions are announced by a screen reader."),
tags: ['accessibility']
}
)),
autoClosingBrackets: register(new EditorStringEnumOption(
EditorOption.autoClosingBrackets, 'autoClosingBrackets',
'languageDefined' as 'always' | 'languageDefined' | 'beforeWhitespace' | 'never',
['always', 'languageDefined', 'beforeWhitespace', 'never'] as const,
{
enumDescriptions: [
'',
nls.localize('editor.autoClosingBrackets.languageDefined', "Use language configurations to determine when to autoclose brackets."),
nls.localize('editor.autoClosingBrackets.beforeWhitespace', "Autoclose brackets only when the cursor is to the left of whitespace."),
'',
],
description: nls.localize('autoClosingBrackets', "Controls whether the editor should automatically close brackets after the user adds an opening bracket.")
}
)),
autoClosingComments: register(new EditorStringEnumOption(
EditorOption.autoClosingComments, 'autoClosingComments',
'languageDefined' as 'always' | 'languageDefined' | 'beforeWhitespace' | 'never',
['always', 'languageDefined', 'beforeWhitespace', 'never'] as const,
{
enumDescriptions: [
'',
nls.localize('editor.autoClosingComments.languageDefined', "Use language configurations to determine when to autoclose comments."),
nls.localize('editor.autoClosingComments.beforeWhitespace', "Autoclose comments only when the cursor is to the left of whitespace."),
'',
],
description: nls.localize('autoClosingComments', "Controls whether the editor should automatically close comments after the user adds an opening comment.")
}
)),
autoClosingDelete: register(new EditorStringEnumOption(
EditorOption.autoClosingDelete, 'autoClosingDelete',
'auto' as 'always' | 'auto' | 'never',
['always', 'auto', 'never'] as const,
{
enumDescriptions: [
'',
nls.localize('editor.autoClosingDelete.auto', "Remove adjacent closing quotes or brackets only if they were automatically inserted."),
'',
],
description: nls.localize('autoClosingDelete', "Controls whether the editor should remove adjacent closing quotes or brackets when deleting.")
}
)),
autoClosingOvertype: register(new EditorStringEnumOption(
EditorOption.autoClosingOvertype, 'autoClosingOvertype',
'auto' as 'always' | 'auto' | 'never',
['always', 'auto', 'never'] as const,
{
enumDescriptions: [
'',
nls.localize('editor.autoClosingOvertype.auto', "Type over closing quotes or brackets only if they were automatically inserted."),
'',
],
description: nls.localize('autoClosingOvertype', "Controls whether the editor should type over closing quotes or brackets.")
}
)),
autoClosingQuotes: register(new EditorStringEnumOption(
EditorOption.autoClosingQuotes, 'autoClosingQuotes',
'languageDefined' as 'always' | 'languageDefined' | 'beforeWhitespace' | 'never',
['always', 'languageDefined', 'beforeWhitespace', 'never'] as const,
{
enumDescriptions: [
'',
nls.localize('editor.autoClosingQuotes.languageDefined', "Use language configurations to determine when to autoclose quotes."),
nls.localize('editor.autoClosingQuotes.beforeWhitespace', "Autoclose quotes only when the cursor is to the left of whitespace."),
'',
],
description: nls.localize('autoClosingQuotes', "Controls whether the editor should automatically close quotes after the user adds an opening quote.")
}
)),
autoIndent: register(new EditorEnumOption(
EditorOption.autoIndent, 'autoIndent',
EditorAutoIndentStrategy.Full, 'full',
['none', 'keep', 'brackets', 'advanced', 'full'],
_autoIndentFromString,
{
enumDescriptions: [
nls.localize('editor.autoIndent.none', "The editor will not insert indentation automatically."),
nls.localize('editor.autoIndent.keep', "The editor will keep the current line's indentation."),
nls.localize('editor.autoIndent.brackets', "The editor will keep the current line's indentation and honor language defined brackets."),
nls.localize('editor.autoIndent.advanced', "The editor will keep the current line's indentation, honor language defined brackets and invoke special onEnterRules defined by languages."),
nls.localize('editor.autoIndent.full', "The editor will keep the current line's indentation, honor language defined brackets, invoke special onEnterRules defined by languages, and honor indentationRules defined by languages."),
],
description: nls.localize('autoIndent', "Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.")
}
)),
automaticLayout: register(new EditorBooleanOption(
EditorOption.automaticLayout, 'automaticLayout', false,
)),
autoSurround: register(new EditorStringEnumOption(
EditorOption.autoSurround, 'autoSurround',
'languageDefined' as 'languageDefined' | 'quotes' | 'brackets' | 'never',
['languageDefined', 'quotes', 'brackets', 'never'] as const,
{
enumDescriptions: [
nls.localize('editor.autoSurround.languageDefined', "Use language configurations to determine when to automatically surround selections."),
nls.localize('editor.autoSurround.quotes', "Surround with quotes but not brackets."),
nls.localize('editor.autoSurround.brackets', "Surround with brackets but not quotes."),
''
],
description: nls.localize('autoSurround', "Controls whether the editor should automatically surround selections when typing quotes or brackets.")
}
)),
bracketPairColorization: register(new BracketPairColorization()),
bracketPairGuides: register(new GuideOptions()),
stickyTabStops: register(new EditorBooleanOption(
EditorOption.stickyTabStops, 'stickyTabStops', false,
{ description: nls.localize('stickyTabStops', "Emulate selection behavior of tab characters when using spaces for indentation. Selection will stick to tab stops.") }
)),
codeLens: register(new EditorBooleanOption(
EditorOption.codeLens, 'codeLens', true,
{ description: nls.localize('codeLens', "Controls whether the editor shows CodeLens.") }
)),
codeLensFontFamily: register(new EditorStringOption(
EditorOption.codeLensFontFamily, 'codeLensFontFamily', '',
{ description: nls.localize('codeLensFontFamily', "Controls the font family for CodeLens.") }
)),
codeLensFontSize: register(new EditorIntOption(EditorOption.codeLensFontSize, 'codeLensFontSize', 0, 0, 100, {
type: 'number',
default: 0,
minimum: 0,
maximum: 100,
markdownDescription: nls.localize('codeLensFontSize', "Controls the font size in pixels for CodeLens. When set to 0, 90% of `#editor.fontSize#` is used.")
})),
colorDecorators: register(new EditorBooleanOption(
EditorOption.colorDecorators, 'colorDecorators', true,
{ description: nls.localize('colorDecorators', "Controls whether the editor should render the inline color decorators and color picker.") }
)),
colorDecoratorActivatedOn: register(new EditorStringEnumOption(EditorOption.colorDecoratorsActivatedOn, 'colorDecoratorsActivatedOn', 'clickAndHover' as 'clickAndHover' | 'hover' | 'click', ['clickAndHover', 'hover', 'click'] as const, {
enumDescriptions: [
nls.localize('editor.colorDecoratorActivatedOn.clickAndHover', "Make the color picker appear both on click and hover of the color decorator"),
nls.localize('editor.colorDecoratorActivatedOn.hover', "Make the color picker appear on hover of the color decorator"),
nls.localize('editor.colorDecoratorActivatedOn.click', "Make the color picker appear on click of the color decorator")
],
description: nls.localize('colorDecoratorActivatedOn', "Controls the condition to make a color picker appear from a color decorator")
})),
colorDecoratorsLimit: register(new EditorIntOption(
EditorOption.colorDecoratorsLimit, 'colorDecoratorsLimit', 500, 1, 1000000,
{
markdownDescription: nls.localize('colorDecoratorsLimit', "Controls the max number of color decorators that can be rendered in an editor at once.")
}
)),
columnSelection: register(new EditorBooleanOption(
EditorOption.columnSelection, 'columnSelection', false,
{ description: nls.localize('columnSelection', "Enable that the selection with the mouse and keys is doing column selection.") }
)),
comments: register(new EditorComments()),
contextmenu: register(new EditorBooleanOption(
EditorOption.contextmenu, 'contextmenu', true,
)),
copyWithSyntaxHighlighting: register(new EditorBooleanOption(
EditorOption.copyWithSyntaxHighlighting, 'copyWithSyntaxHighlighting', true,
{ description: nls.localize('copyWithSyntaxHighlighting', "Controls whether syntax highlighting should be copied into the clipboard.") }
)),
cursorBlinking: register(new EditorEnumOption(
EditorOption.cursorBlinking, 'cursorBlinking',
TextEditorCursorBlinkingStyle.Blink, 'blink',
['blink', 'smooth', 'phase', 'expand', 'solid'],
_cursorBlinkingStyleFromString,
{ description: nls.localize('cursorBlinking', "Control the cursor animation style.") }
)),
cursorSmoothCaretAnimation: register(new EditorStringEnumOption(
EditorOption.cursorSmoothCaretAnimation, 'cursorSmoothCaretAnimation',
'off' as 'off' | 'explicit' | 'on',
['off', 'explicit', 'on'] as const,
{
enumDescriptions: [
nls.localize('cursorSmoothCaretAnimation.off', "Smooth caret animation is disabled."),
nls.localize('cursorSmoothCaretAnimation.explicit', "Smooth caret animation is enabled only when the user moves the cursor with an explicit gesture."),
nls.localize('cursorSmoothCaretAnimation.on', "Smooth caret animation is always enabled.")
],
description: nls.localize('cursorSmoothCaretAnimation', "Controls whether the smooth caret animation should be enabled.")
}
)),
cursorStyle: register(new EditorEnumOption(
EditorOption.cursorStyle, 'cursorStyle',
TextEditorCursorStyle.Line, 'line',
['line', 'block', 'underline', 'line-thin', 'block-outline', 'underline-thin'],
_cursorStyleFromString,
{ description: nls.localize('cursorStyle', "Controls the cursor style.") }
)),
cursorSurroundingLines: register(new EditorIntOption(
EditorOption.cursorSurroundingLines, 'cursorSurroundingLines',
0, 0, Constants.MAX_SAFE_SMALL_INTEGER,
{ description: nls.localize('cursorSurroundingLines', "Controls the minimal number of visible leading lines (minimum 0) and trailing lines (minimum 1) surrounding the cursor. Known as 'scrollOff' or 'scrollOffset' in some other editors.") }
)),
cursorSurroundingLinesStyle: register(new EditorStringEnumOption(
EditorOption.cursorSurroundingLinesStyle, 'cursorSurroundingLinesStyle',
'default' as 'default' | 'all',
['default', 'all'] as const,
{
enumDescriptions: [
nls.localize('cursorSurroundingLinesStyle.default', "`cursorSurroundingLines` is enforced only when triggered via the keyboard or API."),
nls.localize('cursorSurroundingLinesStyle.all', "`cursorSurroundingLines` is enforced always.")
],
markdownDescription: nls.localize('cursorSurroundingLinesStyle', "Controls when `#editor.cursorSurroundingLines#` should be enforced.")
}
)),
cursorWidth: register(new EditorIntOption(
EditorOption.cursorWidth, 'cursorWidth',
0, 0, Constants.MAX_SAFE_SMALL_INTEGER,
{ markdownDescription: nls.localize('cursorWidth', "Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.") }
)),
disableLayerHinting: register(new EditorBooleanOption(
EditorOption.disableLayerHinting, 'disableLayerHinting', false,
)),
disableMonospaceOptimizations: register(new EditorBooleanOption(
EditorOption.disableMonospaceOptimizations, 'disableMonospaceOptimizations', false
)),
domReadOnly: register(new EditorBooleanOption(
EditorOption.domReadOnly, 'domReadOnly', false,
)),
dragAndDrop: register(new EditorBooleanOption(
EditorOption.dragAndDrop, 'dragAndDrop', true,
{ description: nls.localize('dragAndDrop', "Controls whether the editor should allow moving selections via drag and drop.") }
)),
emptySelectionClipboard: register(new EditorEmptySelectionClipboard()),
dropIntoEditor: register(new EditorDropIntoEditor()),
stickyScroll: register(new EditorStickyScroll()),
experimentalWhitespaceRendering: register(new EditorStringEnumOption(
EditorOption.experimentalWhitespaceRendering, 'experimentalWhitespaceRendering',
'svg' as 'svg' | 'font' | 'off',
['svg', 'font', 'off'] as const,
{
enumDescriptions: [
nls.localize('experimentalWhitespaceRendering.svg', "Use a new rendering method with svgs."),
nls.localize('experimentalWhitespaceRendering.font', "Use a new rendering method with font characters."),
nls.localize('experimentalWhitespaceRendering.off', "Use the stable rendering method."),
],
description: nls.localize('experimentalWhitespaceRendering', "Controls whether whitespace is rendered with a new, experimental method.")
}
)),
extraEditorClassName: register(new EditorStringOption(
EditorOption.extraEditorClassName, 'extraEditorClassName', '',
)),
fastScrollSensitivity: register(new EditorFloatOption(
EditorOption.fastScrollSensitivity, 'fastScrollSensitivity',
5, x => (x <= 0 ? 5 : x),
{ markdownDescription: nls.localize('fastScrollSensitivity', "Scrolling speed multiplier when pressing `Alt`.") }
)),
find: register(new EditorFind()),
fixedOverflowWidgets: register(new EditorBooleanOption(
EditorOption.fixedOverflowWidgets, 'fixedOverflowWidgets', false,
)),
folding: register(new EditorBooleanOption(
EditorOption.folding, 'folding', true,
{ description: nls.localize('folding', "Controls whether the editor has code folding enabled.") }
)),
foldingStrategy: register(new EditorStringEnumOption(
EditorOption.foldingStrategy, 'foldingStrategy',
'auto' as 'auto' | 'indentation',
['auto', 'indentation'] as const,
{
enumDescriptions: [
nls.localize('foldingStrategy.auto', "Use a language-specific folding strategy if available, else the indentation-based one."),
nls.localize('foldingStrategy.indentation', "Use the indentation-based folding strategy."),
],
description: nls.localize('foldingStrategy', "Controls the strategy for computing folding ranges.")
}
)),
foldingHighlight: register(new EditorBooleanOption(
EditorOption.foldingHighlight, 'foldingHighlight', true,
{ description: nls.localize('foldingHighlight', "Controls whether the editor should highlight folded ranges.") }
)),
foldingImportsByDefault: register(new EditorBooleanOption(
EditorOption.foldingImportsByDefault, 'foldingImportsByDefault', false,
{ description: nls.localize('foldingImportsByDefault', "Controls whether the editor automatically collapses import ranges.") }
)),
foldingMaximumRegions: register(new EditorIntOption(
EditorOption.foldingMaximumRegions, 'foldingMaximumRegions',
5000, 10, 65000, // limit must be less than foldingRanges MAX_FOLDING_REGIONS
{ description: nls.localize('foldingMaximumRegions', "The maximum number of foldable regions. Increasing this value may result in the editor becoming less responsive when the current source has a large number of foldable regions.") }
)),
unfoldOnClickAfterEndOfLine: register(new EditorBooleanOption(
EditorOption.unfoldOnClickAfterEndOfLine, 'unfoldOnClickAfterEndOfLine', false,
{ description: nls.localize('unfoldOnClickAfterEndOfLine', "Controls whether clicking on the empty content after a folded line will unfold the line.") }
)),
fontFamily: register(new EditorStringOption(
EditorOption.fontFamily, 'fontFamily', EDITOR_FONT_DEFAULTS.fontFamily,
{ description: nls.localize('fontFamily', "Controls the font family.") }
)),
fontInfo: register(new EditorFontInfo()),
fontLigatures2: register(new EditorFontLigatures()),
fontSize: register(new EditorFontSize()),
fontWeight: register(new EditorFontWeight()),
fontVariations: register(new EditorFontVariations()),
formatOnPaste: register(new EditorBooleanOption(
EditorOption.formatOnPaste, 'formatOnPaste', false,
{ description: nls.localize('formatOnPaste', "Controls whether the editor should automatically format the pasted content. A formatter must be available and the formatter should be able to format a range in a document.") }
)),
formatOnType: register(new EditorBooleanOption(
EditorOption.formatOnType, 'formatOnType', false,
{ description: nls.localize('formatOnType', "Controls whether the editor should automatically format the line after typing.") }
)),
glyphMargin: register(new EditorBooleanOption(
EditorOption.glyphMargin, 'glyphMargin', true,
{ description: nls.localize('glyphMargin', "Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.") }
)),
gotoLocation: register(new EditorGoToLocation()),
hideCursorInOverviewRuler: register(new EditorBooleanOption(
EditorOption.hideCursorInOverviewRuler, 'hideCursorInOverviewRuler', false,
{ description: nls.localize('hideCursorInOverviewRuler', "Controls whether the cursor should be hidden in the overview ruler.") }
)),
hover: register(new EditorHover()),
inDiffEditor: register(new EditorBooleanOption(
EditorOption.inDiffEditor, 'inDiffEditor', false
)),
letterSpacing: register(new EditorFloatOption(
EditorOption.letterSpacing, 'letterSpacing',
EDITOR_FONT_DEFAULTS.letterSpacing, x => EditorFloatOption.clamp(x, -5, 20),
{ description: nls.localize('letterSpacing', "Controls the letter spacing in pixels.") }
)),
lightbulb: register(new EditorLightbulb()),
lineDecorationsWidth: register(new EditorLineDecorationsWidth()),
lineHeight: register(new EditorLineHeight()),
lineNumbers: register(new EditorRenderLineNumbersOption()),
lineNumbersMinChars: register(new EditorIntOption(
EditorOption.lineNumbersMinChars, 'lineNumbersMinChars',
5, 1, 300
)),
linkedEditing: register(new EditorBooleanOption(
EditorOption.linkedEditing, 'linkedEditing', false,
{ description: nls.localize('linkedEditing', "Controls whether the editor has linked editing enabled. Depending on the language, related symbols such as HTML tags, are updated while editing.") }
)),
links: register(new EditorBooleanOption(
EditorOption.links, 'links', true,
{ description: nls.localize('links', "Controls whether the editor should detect links and make them clickable.") }
)),
matchBrackets: register(new EditorStringEnumOption(
EditorOption.matchBrackets, 'matchBrackets',
'always' as 'never' | 'near' | 'always',
['always', 'near', 'never'] as const,
{ description: nls.localize('matchBrackets', "Highlight matching brackets.") }
)),
minimap: register(new EditorMinimap()),
mouseStyle: register(new EditorStringEnumOption(
EditorOption.mouseStyle, 'mouseStyle',
'text' as 'text' | 'default' | 'copy',
['text', 'default', 'copy'] as const,
)),
mouseWheelScrollSensitivity: register(new EditorFloatOption(
EditorOption.mouseWheelScrollSensitivity, 'mouseWheelScrollSensitivity',
1, x => (x === 0 ? 1 : x),
{ markdownDescription: nls.localize('mouseWheelScrollSensitivity', "A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.") }
)),
mouseWheelZoom: register(new EditorBooleanOption(
EditorOption.mouseWheelZoom, 'mouseWheelZoom', false,
{
markdownDescription: platform.isMacintosh
? nls.localize('mouseWheelZoom.mac', "Zoom the font of the editor when using mouse wheel and holding `Cmd`.")
: nls.localize('mouseWheelZoom', "Zoom the font of the editor when using mouse wheel and holding `Ctrl`.")
}
)),
multiCursorMergeOverlapping: register(new EditorBooleanOption(
EditorOption.multiCursorMergeOverlapping, 'multiCursorMergeOverlapping', true,
{ description: nls.localize('multiCursorMergeOverlapping', "Merge multiple cursors when they are overlapping.") }
)),
multiCursorModifier: register(new EditorEnumOption(
EditorOption.multiCursorModifier, 'multiCursorModifier',
'altKey', 'alt',
['ctrlCmd', 'alt'],
_multiCursorModifierFromString,
{
markdownEnumDescriptions: [
nls.localize('multiCursorModifier.ctrlCmd', "Maps to `Control` on Windows and Linux and to `Command` on macOS."),
nls.localize('multiCursorModifier.alt', "Maps to `Alt` on Windows and Linux and to `Option` on macOS.")
],
markdownDescription: nls.localize({