mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-07 17:23:56 -05:00
Merge from vscode a5cf1da01d5db3d2557132be8d30f89c38019f6c (#8525)
* Merge from vscode a5cf1da01d5db3d2557132be8d30f89c38019f6c * remove files we don't want * fix hygiene * update distro * update distro * fix hygiene * fix strict nulls * distro * distro * fix tests * fix tests * add another edit * fix viewlet icon * fix azure dialog * fix some padding * fix more padding issues
This commit is contained in:
@@ -10,9 +10,9 @@ import { FontInfo } from 'vs/editor/common/config/fontInfo';
|
||||
import { Constants } from 'vs/base/common/uint';
|
||||
import { USUAL_WORD_SEPARATORS } from 'vs/editor/common/model/wordHelper';
|
||||
import { AccessibilitySupport } from 'vs/platform/accessibility/common/accessibility';
|
||||
import { isObject } from 'vs/base/common/types';
|
||||
import { IConfigurationPropertySchema } from 'vs/platform/configuration/common/configurationRegistry';
|
||||
import { IDimension } from 'vs/editor/common/editorCommon';
|
||||
import { IJSONSchema } from 'vs/base/common/jsonSchema';
|
||||
|
||||
//#region typed options
|
||||
|
||||
@@ -31,6 +31,18 @@ export type EditorAutoSurroundStrategy = 'languageDefined' | 'quotes' | 'bracket
|
||||
*/
|
||||
export type EditorAutoClosingOvertypeStrategy = 'always' | 'auto' | 'never';
|
||||
|
||||
/**
|
||||
* Configuration options for auto indentation in the editor
|
||||
* @internal
|
||||
*/
|
||||
export const enum EditorAutoIndentStrategy {
|
||||
None = 0,
|
||||
Keep = 1,
|
||||
Brackets = 2,
|
||||
Advanced = 3,
|
||||
Full = 4
|
||||
}
|
||||
|
||||
/**
|
||||
* Configuration options for the editor.
|
||||
*/
|
||||
@@ -71,6 +83,12 @@ export interface IEditorOptions {
|
||||
* Defaults to 0.
|
||||
*/
|
||||
cursorSurroundingLines?: number;
|
||||
/**
|
||||
* Controls when `cursorSurroundingLines` should be enforced
|
||||
* Defaults to `default`, `cursorSurroundingLines` is not enforced when cursor position is changed
|
||||
* by mouse.
|
||||
*/
|
||||
cursorSurroundingLinesStyle?: 'default' | 'all';
|
||||
/**
|
||||
* Render last line number when the file ends with a newline.
|
||||
* Defaults to true.
|
||||
@@ -137,7 +155,7 @@ export interface IEditorOptions {
|
||||
fixedOverflowWidgets?: boolean;
|
||||
/**
|
||||
* The number of vertical lanes the overview ruler should render.
|
||||
* Defaults to 2.
|
||||
* Defaults to 3.
|
||||
*/
|
||||
overviewRulerLanes?: number;
|
||||
/**
|
||||
@@ -180,8 +198,8 @@ export interface IEditorOptions {
|
||||
*/
|
||||
fontLigatures?: boolean | string;
|
||||
/**
|
||||
* Disable the use of `will-change` for the editor margin and lines layers.
|
||||
* The usage of `will-change` acts as a hint for browsers to create an extra layer.
|
||||
* 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.
|
||||
*/
|
||||
disableLayerHinting?: boolean;
|
||||
@@ -313,6 +331,10 @@ export interface IEditorOptions {
|
||||
* Defaults to 'auto'. It is best to leave this to 'auto'.
|
||||
*/
|
||||
accessibilitySupport?: 'auto' | 'off' | 'on';
|
||||
/**
|
||||
* Controls the number of lines in the editor that can be read out by a screen reader
|
||||
*/
|
||||
accessibilityPageSize?: number;
|
||||
/**
|
||||
* Suggest options.
|
||||
*/
|
||||
@@ -358,7 +380,7 @@ export interface IEditorOptions {
|
||||
* Enable auto indentation adjustment.
|
||||
* Defaults to false.
|
||||
*/
|
||||
autoIndent?: boolean;
|
||||
autoIndent?: 'none' | 'keep' | 'brackets' | 'advanced' | 'full';
|
||||
/**
|
||||
* Enable format on type.
|
||||
* Defaults to false.
|
||||
@@ -524,6 +546,12 @@ export interface IEditorConstructionOptions extends IEditorOptions {
|
||||
dimension?: IDimension;
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* The width of the minimap gutter, in pixels.
|
||||
*/
|
||||
export const MINIMAP_GUTTER_WIDTH = 8;
|
||||
|
||||
/**
|
||||
* Configuration options for the diff editor.
|
||||
*/
|
||||
@@ -909,6 +937,20 @@ class EditorEnumOption<K1 extends EditorOption, T extends string, V> extends Bas
|
||||
|
||||
//#endregion
|
||||
|
||||
//#region autoIndent
|
||||
|
||||
function _autoIndentFromString(autoIndent: 'none' | 'keep' | 'brackets' | 'advanced' | 'full'): EditorAutoIndentStrategy {
|
||||
switch (autoIndent) {
|
||||
case 'none': return EditorAutoIndentStrategy.None;
|
||||
case 'keep': return EditorAutoIndentStrategy.Keep;
|
||||
case 'brackets': return EditorAutoIndentStrategy.Brackets;
|
||||
case 'advanced': return EditorAutoIndentStrategy.Advanced;
|
||||
case 'full': return EditorAutoIndentStrategy.Full;
|
||||
}
|
||||
}
|
||||
|
||||
//#endregion
|
||||
|
||||
//#region accessibilitySupport
|
||||
|
||||
class EditorAccessibilitySupport extends BaseEditorOption<EditorOption.accessibilitySupport, AccessibilitySupport> {
|
||||
@@ -1109,9 +1151,9 @@ export interface IEditorFindOptions {
|
||||
*/
|
||||
seedSearchStringFromSelection?: boolean;
|
||||
/**
|
||||
* Controls if Find in Selection flag is turned on when multiple lines of text are selected in the editor.
|
||||
* Controls if Find in Selection flag is turned on in the editor.
|
||||
*/
|
||||
autoFindInSelection?: boolean;
|
||||
autoFindInSelection?: 'never' | 'always' | 'multiline';
|
||||
/*
|
||||
* Controls whether the Find Widget should add extra lines on top of the editor.
|
||||
*/
|
||||
@@ -1130,7 +1172,7 @@ class EditorFind extends BaseEditorOption<EditorOption.find, EditorFindOptions>
|
||||
constructor() {
|
||||
const defaults: EditorFindOptions = {
|
||||
seedSearchStringFromSelection: true,
|
||||
autoFindInSelection: false,
|
||||
autoFindInSelection: 'never',
|
||||
globalFindClipboard: false,
|
||||
addExtraSpaceOnTop: true
|
||||
};
|
||||
@@ -1143,8 +1185,14 @@ class EditorFind extends BaseEditorOption<EditorOption.find, EditorFindOptions>
|
||||
description: nls.localize('find.seedSearchStringFromSelection', "Controls whether the search string in the Find Widget is seeded from the editor selection.")
|
||||
},
|
||||
'editor.find.autoFindInSelection': {
|
||||
type: 'boolean',
|
||||
type: 'string',
|
||||
enum: ['never', 'always', 'multiline'],
|
||||
default: defaults.autoFindInSelection,
|
||||
enumDescriptions: [
|
||||
nls.localize('editor.find.autoFindInSelection.never', 'Never turn on Find in selection automatically (default)'),
|
||||
nls.localize('editor.find.autoFindInSelection.always', 'Always turn on Find in selection automatically'),
|
||||
nls.localize('editor.find.autoFindInSelection.multiline', 'Turn on Find in selection automatically when multiple lines of content are selected.')
|
||||
],
|
||||
description: nls.localize('find.autoFindInSelection', "Controls whether the find operation is carried out on selected text or the entire file in the editor.")
|
||||
},
|
||||
'editor.find.globalFindClipboard': {
|
||||
@@ -1169,7 +1217,9 @@ class EditorFind extends BaseEditorOption<EditorOption.find, EditorFindOptions>
|
||||
const input = _input as IEditorFindOptions;
|
||||
return {
|
||||
seedSearchStringFromSelection: EditorBooleanOption.boolean(input.seedSearchStringFromSelection, this.defaultValue.seedSearchStringFromSelection),
|
||||
autoFindInSelection: EditorBooleanOption.boolean(input.autoFindInSelection, this.defaultValue.autoFindInSelection),
|
||||
autoFindInSelection: typeof _input.autoFindInSelection === 'boolean'
|
||||
? (_input.autoFindInSelection ? 'always' : 'never')
|
||||
: EditorStringEnumOption.stringSet<'never' | 'always' | 'multiline'>(input.autoFindInSelection, this.defaultValue.autoFindInSelection, ['never', 'always', 'multiline']),
|
||||
globalFindClipboard: EditorBooleanOption.boolean(input.globalFindClipboard, this.defaultValue.globalFindClipboard),
|
||||
addExtraSpaceOnTop: EditorBooleanOption.boolean(input.addExtraSpaceOnTop, this.defaultValue.addExtraSpaceOnTop)
|
||||
};
|
||||
@@ -1202,6 +1252,7 @@ export class EditorFontLigatures extends BaseEditorOption<EditorOption.fontLigat
|
||||
description: nls.localize('fontFeatureSettings', "Explicit font-feature-settings.")
|
||||
}
|
||||
],
|
||||
description: nls.localize('fontLigaturesGeneral', "Configures font ligatures."),
|
||||
default: false
|
||||
}
|
||||
);
|
||||
@@ -1253,6 +1304,8 @@ class EditorFontSize extends SimpleEditorOption<EditorOption.fontSize, number> {
|
||||
EditorOption.fontSize, 'fontSize', EDITOR_FONT_DEFAULTS.fontSize,
|
||||
{
|
||||
type: 'number',
|
||||
minimum: 6,
|
||||
maximum: 100,
|
||||
default: EDITOR_FONT_DEFAULTS.fontSize,
|
||||
description: nls.localize('fontSize', "Controls the font size in pixels.")
|
||||
}
|
||||
@@ -1264,7 +1317,7 @@ class EditorFontSize extends SimpleEditorOption<EditorOption.fontSize, number> {
|
||||
if (r === 0) {
|
||||
return EDITOR_FONT_DEFAULTS.fontSize;
|
||||
}
|
||||
return EditorFloatOption.clamp(r, 8, 100);
|
||||
return EditorFloatOption.clamp(r, 6, 100);
|
||||
}
|
||||
public compute(env: IEnvironmentalOptions, options: IComputedEditorOptions, value: number): number {
|
||||
// The final fontSize respects the editor zoom level.
|
||||
@@ -1277,14 +1330,26 @@ class EditorFontSize extends SimpleEditorOption<EditorOption.fontSize, number> {
|
||||
|
||||
//#region gotoLocation
|
||||
|
||||
export type GoToLocationValues = 'peek' | 'gotoAndPeek' | 'goto';
|
||||
|
||||
/**
|
||||
* Configuration options for go to location
|
||||
*/
|
||||
export interface IGotoLocationOptions {
|
||||
/**
|
||||
* Control how goto-command work when having multiple results.
|
||||
*/
|
||||
multiple?: 'peek' | 'gotoAndPeek' | 'goto';
|
||||
|
||||
multiple?: GoToLocationValues;
|
||||
|
||||
multipleDefinitions?: GoToLocationValues;
|
||||
multipleTypeDefinitions?: GoToLocationValues;
|
||||
multipleDeclarations?: GoToLocationValues;
|
||||
multipleImplementations?: GoToLocationValues;
|
||||
multipleReferences?: GoToLocationValues;
|
||||
|
||||
alternativeDefinitionCommand?: string;
|
||||
alternativeTypeDefinitionCommand?: string;
|
||||
alternativeDeclarationCommand?: string;
|
||||
alternativeImplementationCommand?: string;
|
||||
alternativeReferenceCommand?: string;
|
||||
}
|
||||
|
||||
export type GoToLocationOptions = Readonly<Required<IGotoLocationOptions>>;
|
||||
@@ -1292,20 +1357,79 @@ export type GoToLocationOptions = Readonly<Required<IGotoLocationOptions>>;
|
||||
class EditorGoToLocation extends BaseEditorOption<EditorOption.gotoLocation, GoToLocationOptions> {
|
||||
|
||||
constructor() {
|
||||
const defaults: GoToLocationOptions = { multiple: 'peek' };
|
||||
const defaults: GoToLocationOptions = {
|
||||
multiple: 'peek',
|
||||
multipleDefinitions: 'peek',
|
||||
multipleTypeDefinitions: 'peek',
|
||||
multipleDeclarations: 'peek',
|
||||
multipleImplementations: 'peek',
|
||||
multipleReferences: 'peek',
|
||||
alternativeDefinitionCommand: 'editor.action.goToReferences',
|
||||
alternativeTypeDefinitionCommand: 'editor.action.goToReferences',
|
||||
alternativeDeclarationCommand: 'editor.action.goToReferences',
|
||||
alternativeImplementationCommand: '',
|
||||
alternativeReferenceCommand: '',
|
||||
};
|
||||
const jsonSubset: IJSONSchema = {
|
||||
type: 'string',
|
||||
enum: ['peek', 'gotoAndPeek', 'goto'],
|
||||
default: defaults.multiple,
|
||||
enumDescriptions: [
|
||||
nls.localize('editor.gotoLocation.multiple.peek', 'Show peek view of the results (default)'),
|
||||
nls.localize('editor.gotoLocation.multiple.gotoAndPeek', 'Go to the primary result and show a peek view'),
|
||||
nls.localize('editor.gotoLocation.multiple.goto', 'Go to the primary result and enable peek-less navigation to others')
|
||||
]
|
||||
};
|
||||
super(
|
||||
EditorOption.gotoLocation, 'gotoLocation', defaults,
|
||||
{
|
||||
'editor.gotoLocation.multiple': {
|
||||
description: nls.localize('editor.gotoLocation.multiple', "Controls the behavior of 'Go To' commands, like Go To Definition, when multiple target locations exist."),
|
||||
deprecationMessage: nls.localize('editor.gotoLocation.multiple.deprecated', "This setting is deprecated, please use separate settings like 'editor.editor.gotoLocation.multipleDefinitions' or 'editor.editor.gotoLocation.multipleImplementations' instead."),
|
||||
},
|
||||
'editor.gotoLocation.multipleDefinitions': {
|
||||
description: nls.localize('editor.editor.gotoLocation.multipleDefinitions', "Controls the behavior the 'Go to Definition'-command when multiple target locations exist."),
|
||||
...jsonSubset,
|
||||
},
|
||||
'editor.gotoLocation.multipleTypeDefinitions': {
|
||||
description: nls.localize('editor.editor.gotoLocation.multipleTypeDefinitions', "Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist."),
|
||||
...jsonSubset,
|
||||
},
|
||||
'editor.gotoLocation.multipleDeclarations': {
|
||||
description: nls.localize('editor.editor.gotoLocation.multipleDeclarations', "Controls the behavior the 'Go to Declaration'-command when multiple target locations exist."),
|
||||
...jsonSubset,
|
||||
},
|
||||
'editor.gotoLocation.multipleImplementations': {
|
||||
description: nls.localize('editor.editor.gotoLocation.multipleImplemenattions', "Controls the behavior the 'Go to Implementations'-command when multiple target locations exist."),
|
||||
...jsonSubset,
|
||||
},
|
||||
'editor.gotoLocation.multipleReferences': {
|
||||
description: nls.localize('editor.editor.gotoLocation.multipleReferences', "Controls the behavior the 'Go to References'-command when multiple target locations exist."),
|
||||
...jsonSubset,
|
||||
},
|
||||
'editor.gotoLocation.alternativeDefinitionCommand': {
|
||||
type: 'string',
|
||||
enum: ['peek', 'gotoAndPeek', 'goto'],
|
||||
default: defaults.multiple,
|
||||
enumDescriptions: [
|
||||
nls.localize('editor.gotoLocation.multiple.peek', 'Show peek view of the results (default)'),
|
||||
nls.localize('editor.gotoLocation.multiple.gotoAndPeek', 'Go to the primary result and show a peek view'),
|
||||
nls.localize('editor.gotoLocation.multiple.goto', 'Go to the primary result and enable peek-less navigation to others')
|
||||
]
|
||||
default: defaults.alternativeDefinitionCommand,
|
||||
description: nls.localize('alternativeDefinitionCommand', "Alternative command id that is being executed when the result of 'Go to Definition' is the current location.")
|
||||
},
|
||||
'editor.gotoLocation.alternativeTypeDefinitionCommand': {
|
||||
type: 'string',
|
||||
default: defaults.alternativeTypeDefinitionCommand,
|
||||
description: nls.localize('alternativeTypeDefinitionCommand', "Alternative command id that is being executed when the result of 'Go to Type Definition' is the current location.")
|
||||
},
|
||||
'editor.gotoLocation.alternativeDeclarationCommand': {
|
||||
type: 'string',
|
||||
default: defaults.alternativeDeclarationCommand,
|
||||
description: nls.localize('alternativeDeclarationCommand', "Alternative command id that is being executed when the result of 'Go to Declaration' is the current location.")
|
||||
},
|
||||
'editor.gotoLocation.alternativeImplementationCommand': {
|
||||
type: 'string',
|
||||
default: defaults.alternativeImplementationCommand,
|
||||
description: nls.localize('alternativeImplementationCommand', "Alternative command id that is being executed when the result of 'Go to Implementation' is the current location.")
|
||||
},
|
||||
'editor.gotoLocation.alternativeReferenceCommand': {
|
||||
type: 'string',
|
||||
default: defaults.alternativeReferenceCommand,
|
||||
description: nls.localize('alternativeReferenceCommand', "Alternative command id that is being executed when the result of 'Go to Reference' is the current location.")
|
||||
},
|
||||
}
|
||||
);
|
||||
@@ -1317,7 +1441,17 @@ class EditorGoToLocation extends BaseEditorOption<EditorOption.gotoLocation, GoT
|
||||
}
|
||||
const input = _input as IGotoLocationOptions;
|
||||
return {
|
||||
multiple: EditorStringEnumOption.stringSet<'peek' | 'gotoAndPeek' | 'goto'>(input.multiple, this.defaultValue.multiple, ['peek', 'gotoAndPeek', 'goto'])
|
||||
multiple: EditorStringEnumOption.stringSet<GoToLocationValues>(input.multiple, this.defaultValue.multiple!, ['peek', 'gotoAndPeek', 'goto']),
|
||||
multipleDefinitions: input.multipleDefinitions ?? EditorStringEnumOption.stringSet<GoToLocationValues>(input.multipleDefinitions, 'peek', ['peek', 'gotoAndPeek', 'goto']),
|
||||
multipleTypeDefinitions: input.multipleTypeDefinitions ?? EditorStringEnumOption.stringSet<GoToLocationValues>(input.multipleTypeDefinitions, 'peek', ['peek', 'gotoAndPeek', 'goto']),
|
||||
multipleDeclarations: input.multipleDeclarations ?? EditorStringEnumOption.stringSet<GoToLocationValues>(input.multipleDeclarations, 'peek', ['peek', 'gotoAndPeek', 'goto']),
|
||||
multipleImplementations: input.multipleImplementations ?? EditorStringEnumOption.stringSet<GoToLocationValues>(input.multipleImplementations, 'peek', ['peek', 'gotoAndPeek', 'goto']),
|
||||
multipleReferences: input.multipleReferences ?? EditorStringEnumOption.stringSet<GoToLocationValues>(input.multipleReferences, 'peek', ['peek', 'gotoAndPeek', 'goto']),
|
||||
alternativeDefinitionCommand: EditorStringOption.string(input.alternativeDefinitionCommand, this.defaultValue.alternativeDefinitionCommand),
|
||||
alternativeTypeDefinitionCommand: EditorStringOption.string(input.alternativeTypeDefinitionCommand, this.defaultValue.alternativeTypeDefinitionCommand),
|
||||
alternativeDeclarationCommand: EditorStringOption.string(input.alternativeDeclarationCommand, this.defaultValue.alternativeDeclarationCommand),
|
||||
alternativeImplementationCommand: EditorStringOption.string(input.alternativeImplementationCommand, this.defaultValue.alternativeImplementationCommand),
|
||||
alternativeReferenceCommand: EditorStringOption.string(input.alternativeReferenceCommand, this.defaultValue.alternativeReferenceCommand),
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -1646,7 +1780,7 @@ export class EditorLayoutInfoComputer extends ComputedEditorOption<EditorOption.
|
||||
// (typicalHalfwidthCharacterWidth + minimapCharWidth) * minimapWidth = (remainingWidth - verticalScrollbarWidth - 2) * minimapCharWidth
|
||||
// minimapWidth = ((remainingWidth - verticalScrollbarWidth - 2) * minimapCharWidth) / (typicalHalfwidthCharacterWidth + minimapCharWidth)
|
||||
|
||||
minimapWidth = Math.max(0, Math.floor(((remainingWidth - verticalScrollbarWidth - 2) * minimapCharWidth) / (typicalHalfwidthCharacterWidth + minimapCharWidth)));
|
||||
minimapWidth = Math.max(0, Math.floor(((remainingWidth - verticalScrollbarWidth - 2) * minimapCharWidth) / (typicalHalfwidthCharacterWidth + minimapCharWidth))) + MINIMAP_GUTTER_WIDTH;
|
||||
let minimapColumns = minimapWidth / minimapCharWidth;
|
||||
if (minimapColumns > minimapMaxColumn) {
|
||||
minimapWidth = Math.floor(minimapMaxColumn * minimapCharWidth);
|
||||
@@ -2295,7 +2429,11 @@ export interface ISuggestOptions {
|
||||
/**
|
||||
* Overwrite word ends on accept. Default to false.
|
||||
*/
|
||||
overwriteOnAccept?: boolean;
|
||||
insertMode?: 'insert' | 'replace';
|
||||
/**
|
||||
* Show a highlight when suggestion replaces or keep text after the cursor. Defaults to false.
|
||||
*/
|
||||
insertHighlight?: boolean;
|
||||
/**
|
||||
* Enable graceful matching. Defaults to true.
|
||||
*/
|
||||
@@ -2321,9 +2459,105 @@ export interface ISuggestOptions {
|
||||
*/
|
||||
maxVisibleSuggestions?: number;
|
||||
/**
|
||||
* Names of suggestion types to filter.
|
||||
* Show method-suggestions.
|
||||
*/
|
||||
filteredTypes?: Record<string, boolean>;
|
||||
showMethods?: boolean;
|
||||
/**
|
||||
* Show function-suggestions.
|
||||
*/
|
||||
showFunctions?: boolean;
|
||||
/**
|
||||
* Show constructor-suggestions.
|
||||
*/
|
||||
showConstructors?: boolean;
|
||||
/**
|
||||
* Show field-suggestions.
|
||||
*/
|
||||
showFields?: boolean;
|
||||
/**
|
||||
* Show variable-suggestions.
|
||||
*/
|
||||
showVariables?: boolean;
|
||||
/**
|
||||
* Show class-suggestions.
|
||||
*/
|
||||
showClasses?: boolean;
|
||||
/**
|
||||
* Show struct-suggestions.
|
||||
*/
|
||||
showStructs?: boolean;
|
||||
/**
|
||||
* Show interface-suggestions.
|
||||
*/
|
||||
showInterfaces?: boolean;
|
||||
/**
|
||||
* Show module-suggestions.
|
||||
*/
|
||||
showModules?: boolean;
|
||||
/**
|
||||
* Show property-suggestions.
|
||||
*/
|
||||
showProperties?: boolean;
|
||||
/**
|
||||
* Show event-suggestions.
|
||||
*/
|
||||
showEvents?: boolean;
|
||||
/**
|
||||
* Show operator-suggestions.
|
||||
*/
|
||||
showOperators?: boolean;
|
||||
/**
|
||||
* Show unit-suggestions.
|
||||
*/
|
||||
showUnits?: boolean;
|
||||
/**
|
||||
* Show value-suggestions.
|
||||
*/
|
||||
showValues?: boolean;
|
||||
/**
|
||||
* Show constant-suggestions.
|
||||
*/
|
||||
showConstants?: boolean;
|
||||
/**
|
||||
* Show enum-suggestions.
|
||||
*/
|
||||
showEnums?: boolean;
|
||||
/**
|
||||
* Show enumMember-suggestions.
|
||||
*/
|
||||
showEnumMembers?: boolean;
|
||||
/**
|
||||
* Show keyword-suggestions.
|
||||
*/
|
||||
showKeywords?: boolean;
|
||||
/**
|
||||
* Show text-suggestions.
|
||||
*/
|
||||
showWords?: boolean;
|
||||
/**
|
||||
* Show color-suggestions.
|
||||
*/
|
||||
showColors?: boolean;
|
||||
/**
|
||||
* Show file-suggestions.
|
||||
*/
|
||||
showFiles?: boolean;
|
||||
/**
|
||||
* Show reference-suggestions.
|
||||
*/
|
||||
showReferences?: boolean;
|
||||
/**
|
||||
* Show folder-suggestions.
|
||||
*/
|
||||
showFolders?: boolean;
|
||||
/**
|
||||
* Show typeParameter-suggestions.
|
||||
*/
|
||||
showTypeParameters?: boolean;
|
||||
/**
|
||||
* Show snippet-suggestions.
|
||||
*/
|
||||
showSnippets?: boolean;
|
||||
}
|
||||
|
||||
export type InternalSuggestOptions = Readonly<Required<ISuggestOptions>>;
|
||||
@@ -2332,22 +2566,57 @@ class EditorSuggest extends BaseEditorOption<EditorOption.suggest, InternalSugge
|
||||
|
||||
constructor() {
|
||||
const defaults: InternalSuggestOptions = {
|
||||
overwriteOnAccept: false,
|
||||
insertMode: 'insert',
|
||||
insertHighlight: false,
|
||||
filterGraceful: true,
|
||||
snippetsPreventQuickSuggestions: true,
|
||||
localityBonus: false,
|
||||
shareSuggestSelections: false,
|
||||
showIcons: true,
|
||||
maxVisibleSuggestions: 12,
|
||||
filteredTypes: Object.create(null)
|
||||
showMethods: true,
|
||||
showFunctions: true,
|
||||
showConstructors: true,
|
||||
showFields: true,
|
||||
showVariables: true,
|
||||
showClasses: true,
|
||||
showStructs: true,
|
||||
showInterfaces: true,
|
||||
showModules: true,
|
||||
showProperties: true,
|
||||
showEvents: true,
|
||||
showOperators: true,
|
||||
showUnits: true,
|
||||
showValues: true,
|
||||
showConstants: true,
|
||||
showEnums: true,
|
||||
showEnumMembers: true,
|
||||
showKeywords: true,
|
||||
showWords: true,
|
||||
showColors: true,
|
||||
showFiles: true,
|
||||
showReferences: true,
|
||||
showFolders: true,
|
||||
showTypeParameters: true,
|
||||
showSnippets: true,
|
||||
};
|
||||
super(
|
||||
EditorOption.suggest, 'suggest', defaults,
|
||||
{
|
||||
'editor.suggest.overwriteOnAccept': {
|
||||
'editor.suggest.insertMode': {
|
||||
type: 'string',
|
||||
enum: ['insert', 'replace'],
|
||||
enumDescriptions: [
|
||||
nls.localize('suggest.insertMode.insert', "Insert suggestion without overwriting text right of the cursor."),
|
||||
nls.localize('suggest.insertMode.replace', "Insert suggestion and overwrite text right of the cursor."),
|
||||
],
|
||||
default: defaults.insertMode,
|
||||
description: nls.localize('suggest.insertMode', "Controls whether words are overwritten when accepting completions. Note that this depends on extensions opting into this feature.")
|
||||
},
|
||||
'editor.suggest.insertHighlight': {
|
||||
type: 'boolean',
|
||||
default: defaults.overwriteOnAccept,
|
||||
description: nls.localize('suggest.overwriteOnAccept', "Controls whether words are overwritten when accepting completions.")
|
||||
default: defaults.insertHighlight,
|
||||
description: nls.localize('suggest.insertHighlight', "Controls whether unexpected text modifications while accepting completions should be highlighted, e.g `insertMode` is `replace` but the completion only supports `insert`.")
|
||||
},
|
||||
'editor.suggest.filterGraceful': {
|
||||
type: 'boolean',
|
||||
@@ -2381,135 +2650,139 @@ class EditorSuggest extends BaseEditorOption<EditorOption.suggest, InternalSugge
|
||||
maximum: 15,
|
||||
description: nls.localize('suggest.maxVisibleSuggestions', "Controls how many suggestions IntelliSense will show before showing a scrollbar (maximum 15).")
|
||||
},
|
||||
'editor.suggest.filteredTypes.method': {
|
||||
type: 'boolean',
|
||||
default: true,
|
||||
markdownDescription: nls.localize('suggest.filtered.method', "When set to `false` IntelliSense never shows `method` suggestions.")
|
||||
'editor.suggest.filteredTypes': {
|
||||
type: 'object',
|
||||
deprecationMessage: nls.localize('deprecated', "This setting is deprecated, please use separate settings like 'editor.suggest.showKeywords' or 'editor.suggest.showSnippets' instead.")
|
||||
},
|
||||
'editor.suggest.filteredTypes.function': {
|
||||
'editor.suggest.showMethods': {
|
||||
type: 'boolean',
|
||||
default: true,
|
||||
markdownDescription: nls.localize('suggest.filtered.function', "When set to `false` IntelliSense never shows `function` suggestions.")
|
||||
markdownDescription: nls.localize('editor.suggest.showMethods', "When enabled IntelliSense shows `method`-suggestions.")
|
||||
},
|
||||
'editor.suggest.filteredTypes.constructor': {
|
||||
'editor.suggest.showFunctions': {
|
||||
type: 'boolean',
|
||||
default: true,
|
||||
markdownDescription: nls.localize('suggest.filtered.constructor', "When set to `false` IntelliSense never shows `constructor` suggestions.")
|
||||
markdownDescription: nls.localize('editor.suggest.showFunctions', "When enabled IntelliSense shows `function`-suggestions.")
|
||||
},
|
||||
'editor.suggest.filteredTypes.field': {
|
||||
'editor.suggest.showConstructors': {
|
||||
type: 'boolean',
|
||||
default: true,
|
||||
markdownDescription: nls.localize('suggest.filtered.field', "When set to `false` IntelliSense never shows `field` suggestions.")
|
||||
markdownDescription: nls.localize('editor.suggest.showConstructors', "When enabled IntelliSense shows `constructor`-suggestions.")
|
||||
},
|
||||
'editor.suggest.filteredTypes.variable': {
|
||||
'editor.suggest.showFields': {
|
||||
type: 'boolean',
|
||||
default: true,
|
||||
markdownDescription: nls.localize('suggest.filtered.variable', "When set to `false` IntelliSense never shows `variable` suggestions.")
|
||||
markdownDescription: nls.localize('editor.suggest.showFields', "When enabled IntelliSense shows `field`-suggestions.")
|
||||
},
|
||||
'editor.suggest.filteredTypes.class': {
|
||||
'editor.suggest.showVariables': {
|
||||
type: 'boolean',
|
||||
default: true,
|
||||
markdownDescription: nls.localize('suggest.filtered.class', "When set to `false` IntelliSense never shows `class` suggestions.")
|
||||
markdownDescription: nls.localize('editor.suggest.showVariables', "When enabled IntelliSense shows `variable`-suggestions.")
|
||||
},
|
||||
'editor.suggest.filteredTypes.struct': {
|
||||
'editor.suggest.showClasses': {
|
||||
type: 'boolean',
|
||||
default: true,
|
||||
markdownDescription: nls.localize('suggest.filtered.struct', "When set to `false` IntelliSense never shows `struct` suggestions.")
|
||||
markdownDescription: nls.localize('editor.suggest.showClasss', "When enabled IntelliSense shows `class`-suggestions.")
|
||||
},
|
||||
'editor.suggest.filteredTypes.interface': {
|
||||
'editor.suggest.showStructs': {
|
||||
type: 'boolean',
|
||||
default: true,
|
||||
markdownDescription: nls.localize('suggest.filtered.interface', "When set to `false` IntelliSense never shows `interface` suggestions.")
|
||||
markdownDescription: nls.localize('editor.suggest.showStructs', "When enabled IntelliSense shows `struct`-suggestions.")
|
||||
},
|
||||
'editor.suggest.filteredTypes.module': {
|
||||
'editor.suggest.showInterfaces': {
|
||||
type: 'boolean',
|
||||
default: true,
|
||||
markdownDescription: nls.localize('suggest.filtered.module', "When set to `false` IntelliSense never shows `module` suggestions.")
|
||||
markdownDescription: nls.localize('editor.suggest.showInterfaces', "When enabled IntelliSense shows `interface`-suggestions.")
|
||||
},
|
||||
'editor.suggest.filteredTypes.property': {
|
||||
'editor.suggest.showModules': {
|
||||
type: 'boolean',
|
||||
default: true,
|
||||
markdownDescription: nls.localize('suggest.filtered.property', "When set to `false` IntelliSense never shows `property` suggestions.")
|
||||
markdownDescription: nls.localize('editor.suggest.showModules', "When enabled IntelliSense shows `module`-suggestions.")
|
||||
},
|
||||
'editor.suggest.filteredTypes.event': {
|
||||
'editor.suggest.showProperties': {
|
||||
type: 'boolean',
|
||||
default: true,
|
||||
markdownDescription: nls.localize('suggest.filtered.event', "When set to `false` IntelliSense never shows `event` suggestions.")
|
||||
markdownDescription: nls.localize('editor.suggest.showPropertys', "When enabled IntelliSense shows `property`-suggestions.")
|
||||
},
|
||||
'editor.suggest.filteredTypes.operator': {
|
||||
'editor.suggest.showEvents': {
|
||||
type: 'boolean',
|
||||
default: true,
|
||||
markdownDescription: nls.localize('suggest.filtered.operator', "When set to `false` IntelliSense never shows `operator` suggestions.")
|
||||
markdownDescription: nls.localize('editor.suggest.showEvents', "When enabled IntelliSense shows `event`-suggestions.")
|
||||
},
|
||||
'editor.suggest.filteredTypes.unit': {
|
||||
'editor.suggest.showOperators': {
|
||||
type: 'boolean',
|
||||
default: true,
|
||||
markdownDescription: nls.localize('suggest.filtered.unit', "When set to `false` IntelliSense never shows `unit` suggestions.")
|
||||
markdownDescription: nls.localize('editor.suggest.showOperators', "When enabled IntelliSense shows `operator`-suggestions.")
|
||||
},
|
||||
'editor.suggest.filteredTypes.value': {
|
||||
'editor.suggest.showUnits': {
|
||||
type: 'boolean',
|
||||
default: true,
|
||||
markdownDescription: nls.localize('suggest.filtered.value', "When set to `false` IntelliSense never shows `value` suggestions.")
|
||||
markdownDescription: nls.localize('editor.suggest.showUnits', "When enabled IntelliSense shows `unit`-suggestions.")
|
||||
},
|
||||
'editor.suggest.filteredTypes.constant': {
|
||||
'editor.suggest.showValues': {
|
||||
type: 'boolean',
|
||||
default: true,
|
||||
markdownDescription: nls.localize('suggest.filtered.constant', "When set to `false` IntelliSense never shows `constant` suggestions.")
|
||||
markdownDescription: nls.localize('editor.suggest.showValues', "When enabled IntelliSense shows `value`-suggestions.")
|
||||
},
|
||||
'editor.suggest.filteredTypes.enum': {
|
||||
'editor.suggest.showConstants': {
|
||||
type: 'boolean',
|
||||
default: true,
|
||||
markdownDescription: nls.localize('suggest.filtered.enum', "When set to `false` IntelliSense never shows `enum` suggestions.")
|
||||
markdownDescription: nls.localize('editor.suggest.showConstants', "When enabled IntelliSense shows `constant`-suggestions.")
|
||||
},
|
||||
'editor.suggest.filteredTypes.enumMember': {
|
||||
'editor.suggest.showEnums': {
|
||||
type: 'boolean',
|
||||
default: true,
|
||||
markdownDescription: nls.localize('suggest.filtered.enumMember', "When set to `false` IntelliSense never shows `enumMember` suggestions.")
|
||||
markdownDescription: nls.localize('editor.suggest.showEnums', "When enabled IntelliSense shows `enum`-suggestions.")
|
||||
},
|
||||
'editor.suggest.filteredTypes.keyword': {
|
||||
'editor.suggest.showEnumMembers': {
|
||||
type: 'boolean',
|
||||
default: true,
|
||||
markdownDescription: nls.localize('suggest.filtered.keyword', "When set to `false` IntelliSense never shows `keyword` suggestions.")
|
||||
markdownDescription: nls.localize('editor.suggest.showEnumMembers', "When enabled IntelliSense shows `enumMember`-suggestions.")
|
||||
},
|
||||
'editor.suggest.filteredTypes.text': {
|
||||
'editor.suggest.showKeywords': {
|
||||
type: 'boolean',
|
||||
default: true,
|
||||
markdownDescription: nls.localize('suggest.filtered.text', "When set to `false` IntelliSense never shows `text` suggestions.")
|
||||
markdownDescription: nls.localize('editor.suggest.showKeywords', "When enabled IntelliSense shows `keyword`-suggestions.")
|
||||
},
|
||||
'editor.suggest.filteredTypes.color': {
|
||||
'editor.suggest.showWords': {
|
||||
type: 'boolean',
|
||||
default: true,
|
||||
markdownDescription: nls.localize('suggest.filtered.color', "When set to `false` IntelliSense never shows `color` suggestions.")
|
||||
markdownDescription: nls.localize('editor.suggest.showTexts', "When enabled IntelliSense shows `text`-suggestions.")
|
||||
},
|
||||
'editor.suggest.filteredTypes.file': {
|
||||
'editor.suggest.showColors': {
|
||||
type: 'boolean',
|
||||
default: true,
|
||||
markdownDescription: nls.localize('suggest.filtered.file', "When set to `false` IntelliSense never shows `file` suggestions.")
|
||||
markdownDescription: nls.localize('editor.suggest.showColors', "When enabled IntelliSense shows `color`-suggestions.")
|
||||
},
|
||||
'editor.suggest.filteredTypes.reference': {
|
||||
'editor.suggest.showFiles': {
|
||||
type: 'boolean',
|
||||
default: true,
|
||||
markdownDescription: nls.localize('suggest.filtered.reference', "When set to `false` IntelliSense never shows `reference` suggestions.")
|
||||
markdownDescription: nls.localize('editor.suggest.showFiles', "When enabled IntelliSense shows `file`-suggestions.")
|
||||
},
|
||||
'editor.suggest.filteredTypes.customcolor': {
|
||||
'editor.suggest.showReferences': {
|
||||
type: 'boolean',
|
||||
default: true,
|
||||
markdownDescription: nls.localize('suggest.filtered.customcolor', "When set to `false` IntelliSense never shows `customcolor` suggestions.")
|
||||
markdownDescription: nls.localize('editor.suggest.showReferences', "When enabled IntelliSense shows `reference`-suggestions.")
|
||||
},
|
||||
'editor.suggest.filteredTypes.folder': {
|
||||
'editor.suggest.showCustomcolors': {
|
||||
type: 'boolean',
|
||||
default: true,
|
||||
markdownDescription: nls.localize('suggest.filtered.folder', "When set to `false` IntelliSense never shows `folder` suggestions.")
|
||||
markdownDescription: nls.localize('editor.suggest.showCustomcolors', "When enabled IntelliSense shows `customcolor`-suggestions.")
|
||||
},
|
||||
'editor.suggest.filteredTypes.typeParameter': {
|
||||
'editor.suggest.showFolders': {
|
||||
type: 'boolean',
|
||||
default: true,
|
||||
markdownDescription: nls.localize('suggest.filtered.typeParameter', "When set to `false` IntelliSense never shows `typeParameter` suggestions.")
|
||||
markdownDescription: nls.localize('editor.suggest.showFolders', "When enabled IntelliSense shows `folder`-suggestions.")
|
||||
},
|
||||
'editor.suggest.filteredTypes.snippet': {
|
||||
'editor.suggest.showTypeParameters': {
|
||||
type: 'boolean',
|
||||
default: true,
|
||||
markdownDescription: nls.localize('suggest.filtered.snippet', "When set to `false` IntelliSense never shows `snippet` suggestions.")
|
||||
markdownDescription: nls.localize('editor.suggest.showTypeParameters', "When enabled IntelliSense shows `typeParameter`-suggestions.")
|
||||
},
|
||||
'editor.suggest.showSnippets': {
|
||||
type: 'boolean',
|
||||
default: true,
|
||||
markdownDescription: nls.localize('editor.suggest.showSnippets', "When enabled IntelliSense shows `snippet`-suggestions.")
|
||||
},
|
||||
}
|
||||
);
|
||||
@@ -2521,14 +2794,39 @@ class EditorSuggest extends BaseEditorOption<EditorOption.suggest, InternalSugge
|
||||
}
|
||||
const input = _input as ISuggestOptions;
|
||||
return {
|
||||
overwriteOnAccept: EditorBooleanOption.boolean(input.overwriteOnAccept, this.defaultValue.overwriteOnAccept),
|
||||
insertMode: EditorStringEnumOption.stringSet(input.insertMode, this.defaultValue.insertMode, ['insert', 'replace']),
|
||||
insertHighlight: EditorBooleanOption.boolean(input.insertHighlight, this.defaultValue.insertHighlight),
|
||||
filterGraceful: EditorBooleanOption.boolean(input.filterGraceful, this.defaultValue.filterGraceful),
|
||||
snippetsPreventQuickSuggestions: EditorBooleanOption.boolean(input.snippetsPreventQuickSuggestions, this.defaultValue.filterGraceful),
|
||||
localityBonus: EditorBooleanOption.boolean(input.localityBonus, this.defaultValue.localityBonus),
|
||||
shareSuggestSelections: EditorBooleanOption.boolean(input.shareSuggestSelections, this.defaultValue.shareSuggestSelections),
|
||||
showIcons: EditorBooleanOption.boolean(input.showIcons, this.defaultValue.showIcons),
|
||||
maxVisibleSuggestions: EditorIntOption.clampedInt(input.maxVisibleSuggestions, this.defaultValue.maxVisibleSuggestions, 1, 15),
|
||||
filteredTypes: isObject(input.filteredTypes) ? input.filteredTypes : Object.create(null)
|
||||
showMethods: EditorBooleanOption.boolean(input.showMethods, this.defaultValue.showMethods),
|
||||
showFunctions: EditorBooleanOption.boolean(input.showFunctions, this.defaultValue.showFunctions),
|
||||
showConstructors: EditorBooleanOption.boolean(input.showConstructors, this.defaultValue.showConstructors),
|
||||
showFields: EditorBooleanOption.boolean(input.showFields, this.defaultValue.showFields),
|
||||
showVariables: EditorBooleanOption.boolean(input.showVariables, this.defaultValue.showVariables),
|
||||
showClasses: EditorBooleanOption.boolean(input.showClasses, this.defaultValue.showClasses),
|
||||
showStructs: EditorBooleanOption.boolean(input.showStructs, this.defaultValue.showStructs),
|
||||
showInterfaces: EditorBooleanOption.boolean(input.showInterfaces, this.defaultValue.showInterfaces),
|
||||
showModules: EditorBooleanOption.boolean(input.showModules, this.defaultValue.showModules),
|
||||
showProperties: EditorBooleanOption.boolean(input.showProperties, this.defaultValue.showProperties),
|
||||
showEvents: EditorBooleanOption.boolean(input.showEvents, this.defaultValue.showEvents),
|
||||
showOperators: EditorBooleanOption.boolean(input.showOperators, this.defaultValue.showOperators),
|
||||
showUnits: EditorBooleanOption.boolean(input.showUnits, this.defaultValue.showUnits),
|
||||
showValues: EditorBooleanOption.boolean(input.showValues, this.defaultValue.showValues),
|
||||
showConstants: EditorBooleanOption.boolean(input.showConstants, this.defaultValue.showConstants),
|
||||
showEnums: EditorBooleanOption.boolean(input.showEnums, this.defaultValue.showEnums),
|
||||
showEnumMembers: EditorBooleanOption.boolean(input.showEnumMembers, this.defaultValue.showEnumMembers),
|
||||
showKeywords: EditorBooleanOption.boolean(input.showKeywords, this.defaultValue.showKeywords),
|
||||
showWords: EditorBooleanOption.boolean(input.showWords, this.defaultValue.showWords),
|
||||
showColors: EditorBooleanOption.boolean(input.showColors, this.defaultValue.showColors),
|
||||
showFiles: EditorBooleanOption.boolean(input.showFiles, this.defaultValue.showFiles),
|
||||
showReferences: EditorBooleanOption.boolean(input.showReferences, this.defaultValue.showReferences),
|
||||
showFolders: EditorBooleanOption.boolean(input.showFolders, this.defaultValue.showFolders),
|
||||
showTypeParameters: EditorBooleanOption.boolean(input.showTypeParameters, this.defaultValue.showTypeParameters),
|
||||
showSnippets: EditorBooleanOption.boolean(input.showSnippets, this.defaultValue.showSnippets),
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -2715,6 +3013,7 @@ export const enum EditorOption {
|
||||
acceptSuggestionOnCommitCharacter,
|
||||
acceptSuggestionOnEnter,
|
||||
accessibilitySupport,
|
||||
accessibilityPageSize,
|
||||
ariaLabel,
|
||||
autoClosingBrackets,
|
||||
autoClosingOvertype,
|
||||
@@ -2730,6 +3029,7 @@ export const enum EditorOption {
|
||||
cursorSmoothCaretAnimation,
|
||||
cursorStyle,
|
||||
cursorSurroundingLines,
|
||||
cursorSurroundingLinesStyle,
|
||||
cursorWidth,
|
||||
disableLayerHinting,
|
||||
disableMonospaceOptimizations,
|
||||
@@ -2841,6 +3141,8 @@ export const EditorOptions = {
|
||||
}
|
||||
)),
|
||||
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. Warning: this has a performance implication for numbers larger than the default.") })),
|
||||
ariaLabel: register(new EditorStringOption(
|
||||
EditorOption.ariaLabel, 'ariaLabel', nls.localize('editorViewAccessibleLabel', "Editor content")
|
||||
)),
|
||||
@@ -2885,9 +3187,21 @@ export const EditorOptions = {
|
||||
description: nls.localize('autoClosingQuotes', "Controls whether the editor should automatically close quotes after the user adds an opening quote.")
|
||||
}
|
||||
)),
|
||||
autoIndent: register(new EditorBooleanOption(
|
||||
EditorOption.autoIndent, 'autoIndent', true,
|
||||
{ description: nls.localize('autoIndent', "Controls whether the editor should automatically adjust the indentation when users type, paste or move lines. Extensions with indentation rules of the language must be available.") }
|
||||
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,
|
||||
@@ -2944,6 +3258,18 @@ export const EditorOptions = {
|
||||
0, 0, Constants.MAX_SAFE_SMALL_INTEGER,
|
||||
{ description: nls.localize('cursorSurroundingLines', "Controls the minimal number of visible leading and trailing lines 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.")
|
||||
],
|
||||
description: nls.localize('cursorSurroundingLinesStyle', "Controls when `cursorSurroundingLines` should be enforced.")
|
||||
}
|
||||
)),
|
||||
cursorWidth: register(new EditorIntOption(
|
||||
EditorOption.cursorWidth, 'cursorWidth',
|
||||
0, 0, Constants.MAX_SAFE_SMALL_INTEGER,
|
||||
@@ -3102,8 +3428,7 @@ export const EditorOptions = {
|
||||
)),
|
||||
overviewRulerLanes: register(new EditorIntOption(
|
||||
EditorOption.overviewRulerLanes, 'overviewRulerLanes',
|
||||
3, 0, 3,
|
||||
{ description: nls.localize('overviewRulerLanes', "Controls the number of decorations that can show up at the same position in the overview ruler.") }
|
||||
3, 0, 3
|
||||
)),
|
||||
parameterHints: register(new EditorParameterHints()),
|
||||
quickSuggestions: register(new EditorQuickSuggestions()),
|
||||
|
||||
Reference in New Issue
Block a user