mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Merge VS Code 1.31.1 (#4283)
This commit is contained in:
@@ -33,7 +33,7 @@ export interface ITabFocus {
|
||||
export const TabFocus: ITabFocus = new class implements ITabFocus {
|
||||
private _tabFocus: boolean = false;
|
||||
|
||||
private readonly _onDidChangeTabFocus: Emitter<boolean> = new Emitter<boolean>();
|
||||
private readonly _onDidChangeTabFocus = new Emitter<boolean>();
|
||||
public readonly onDidChangeTabFocus: Event<boolean> = this._onDidChangeTabFocus.event;
|
||||
|
||||
public getTabFocusMode(): boolean {
|
||||
@@ -429,6 +429,11 @@ const editorConfiguration: IConfigurationNode = {
|
||||
'default': EDITOR_DEFAULTS.viewInfo.scrollbar.mouseWheelScrollSensitivity,
|
||||
'markdownDescription': nls.localize('mouseWheelScrollSensitivity', "A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")
|
||||
},
|
||||
'editor.fastScrollSensitivity': {
|
||||
'type': 'number',
|
||||
'default': EDITOR_DEFAULTS.viewInfo.scrollbar.fastScrollSensitivity,
|
||||
'markdownDescription': nls.localize('fastScrollSensitivity', "Scrolling speed mulitiplier when pressing `Alt`.")
|
||||
},
|
||||
'editor.multiCursorModifier': {
|
||||
'type': 'string',
|
||||
'enum': ['ctrlCmd', 'alt'],
|
||||
@@ -639,6 +644,11 @@ const editorConfiguration: IConfigurationNode = {
|
||||
default: false,
|
||||
description: nls.localize('suggest.localityBonus', "Controls whether sorting favours words that appear close to the cursor.")
|
||||
},
|
||||
'editor.suggest.shareSuggestSelections': {
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
markdownDescription: nls.localize('suggest.shareSuggestSelections', "Controls whether remembered suggestion selections are shared between multiple workspaces and windows (needs `#editor.suggestSelection#`).")
|
||||
},
|
||||
'editor.suggest.snippetsPreventQuickSuggestions': {
|
||||
type: 'boolean',
|
||||
default: true,
|
||||
@@ -647,7 +657,7 @@ const editorConfiguration: IConfigurationNode = {
|
||||
'editor.selectionHighlight': {
|
||||
'type': 'boolean',
|
||||
'default': EDITOR_DEFAULTS.contribInfo.selectionHighlight,
|
||||
'description': nls.localize('selectionHighlight', "Controls whether the editor should highlight matches similar to the selection")
|
||||
'description': nls.localize('selectionHighlight', "Controls whether the editor should highlight matches similar to the selection.")
|
||||
},
|
||||
'editor.occurrencesHighlight': {
|
||||
'type': 'boolean',
|
||||
@@ -742,12 +752,12 @@ const editorConfiguration: IConfigurationNode = {
|
||||
'editor.codeLens': {
|
||||
'type': 'boolean',
|
||||
'default': EDITOR_DEFAULTS.contribInfo.codeLens,
|
||||
'description': nls.localize('codeLens', "Controls whether the editor shows CodeLens")
|
||||
'description': nls.localize('codeLens', "Controls whether the editor shows CodeLens.")
|
||||
},
|
||||
'editor.folding': {
|
||||
'type': 'boolean',
|
||||
'default': EDITOR_DEFAULTS.contribInfo.folding,
|
||||
'description': nls.localize('folding', "Controls whether the editor has code folding enabled")
|
||||
'description': nls.localize('folding', "Controls whether the editor has code folding enabled.")
|
||||
},
|
||||
'editor.foldingStrategy': {
|
||||
'type': 'string',
|
||||
@@ -828,6 +838,10 @@ const editorConfiguration: IConfigurationNode = {
|
||||
'source.organizeImports': {
|
||||
'type': 'boolean',
|
||||
'description': nls.localize('codeActionsOnSave.organizeImports', "Controls whether organize imports action should be run on file save.")
|
||||
},
|
||||
'source.fixAll': {
|
||||
'type': 'boolean',
|
||||
'description': nls.localize('codeActionsOnSave.fixAll', "Controls whether auto fix action should be run on file save.")
|
||||
}
|
||||
},
|
||||
'additionalProperties': {
|
||||
|
||||
@@ -198,7 +198,7 @@ export interface ISuggestOptions {
|
||||
/**
|
||||
* Enable using global storage for remembering suggestions.
|
||||
*/
|
||||
useGlobalStorageForSuggestions?: boolean;
|
||||
shareSuggestSelections?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -458,6 +458,11 @@ export interface IEditorOptions {
|
||||
* Defaults to 1.
|
||||
*/
|
||||
mouseWheelScrollSensitivity?: number;
|
||||
/**
|
||||
* FastScrolling mulitplier speed when pressing `Alt`
|
||||
* Defaults to 5.
|
||||
*/
|
||||
fastScrollSensitivity?: number;
|
||||
/**
|
||||
* The modifier to be used to add multiple cursors with the mouse.
|
||||
* Defaults to 'alt'
|
||||
@@ -875,6 +880,7 @@ export interface InternalEditorScrollbarOptions {
|
||||
readonly verticalScrollbarSize: number;
|
||||
readonly verticalSliderSize: number;
|
||||
readonly mouseWheelScrollSensitivity: number;
|
||||
readonly fastScrollSensitivity: number;
|
||||
}
|
||||
|
||||
export interface InternalEditorMinimapOptions {
|
||||
@@ -1292,6 +1298,7 @@ export class InternalEditorOptions {
|
||||
&& a.verticalScrollbarSize === b.verticalScrollbarSize
|
||||
&& a.verticalSliderSize === b.verticalSliderSize
|
||||
&& a.mouseWheelScrollSensitivity === b.mouseWheelScrollSensitivity
|
||||
&& a.fastScrollSensitivity === b.fastScrollSensitivity
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1795,7 +1802,7 @@ export class EditorOptionsValidator {
|
||||
};
|
||||
}
|
||||
|
||||
private static _sanitizeScrollbarOpts(opts: IEditorScrollbarOptions | undefined, defaults: InternalEditorScrollbarOptions, mouseWheelScrollSensitivity: number): InternalEditorScrollbarOptions {
|
||||
private static _sanitizeScrollbarOpts(opts: IEditorScrollbarOptions | undefined, defaults: InternalEditorScrollbarOptions, mouseWheelScrollSensitivity: number, fastScrollSensitivity: number): InternalEditorScrollbarOptions {
|
||||
if (typeof opts !== 'object') {
|
||||
return defaults;
|
||||
}
|
||||
@@ -1818,7 +1825,8 @@ export class EditorOptionsValidator {
|
||||
verticalSliderSize: _clampedInt(opts.verticalSliderSize, verticalScrollbarSize, 0, 1000),
|
||||
|
||||
handleMouseWheel: _boolean(opts.handleMouseWheel, defaults.handleMouseWheel),
|
||||
mouseWheelScrollSensitivity: mouseWheelScrollSensitivity
|
||||
mouseWheelScrollSensitivity: mouseWheelScrollSensitivity,
|
||||
fastScrollSensitivity: fastScrollSensitivity,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1835,7 +1843,7 @@ export class EditorOptionsValidator {
|
||||
};
|
||||
}
|
||||
|
||||
private static _santizeFindOpts(opts: IEditorFindOptions | undefined, defaults: InternalEditorFindOptions): InternalEditorFindOptions {
|
||||
private static _sanitizeFindOpts(opts: IEditorFindOptions | undefined, defaults: InternalEditorFindOptions): InternalEditorFindOptions {
|
||||
if (typeof opts !== 'object') {
|
||||
return defaults;
|
||||
}
|
||||
@@ -1858,7 +1866,7 @@ export class EditorOptionsValidator {
|
||||
};
|
||||
}
|
||||
|
||||
private static _santizeHoverOpts(_opts: boolean | IEditorHoverOptions | undefined, defaults: InternalEditorHoverOptions): InternalEditorHoverOptions {
|
||||
private static _sanitizeHoverOpts(_opts: boolean | IEditorHoverOptions | undefined, defaults: InternalEditorHoverOptions): InternalEditorHoverOptions {
|
||||
let opts: IEditorHoverOptions;
|
||||
if (typeof _opts === 'boolean') {
|
||||
opts = {
|
||||
@@ -1884,7 +1892,7 @@ export class EditorOptionsValidator {
|
||||
snippets: _stringSet<'top' | 'bottom' | 'inline' | 'none'>(opts.snippetSuggestions, defaults.snippets, ['top', 'bottom', 'inline', 'none']),
|
||||
snippetsPreventQuickSuggestions: _boolean(suggestOpts.snippetsPreventQuickSuggestions, defaults.filterGraceful),
|
||||
localityBonus: _boolean(suggestOpts.localityBonus, defaults.localityBonus),
|
||||
shareSuggestSelections: _boolean(suggestOpts.useGlobalStorageForSuggestions, defaults.shareSuggestSelections)
|
||||
shareSuggestSelections: _boolean(suggestOpts.shareSuggestSelections, defaults.shareSuggestSelections)
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1946,7 +1954,7 @@ export class EditorOptionsValidator {
|
||||
} else if (<any>renderWhitespace === false) {
|
||||
renderWhitespace = 'none';
|
||||
}
|
||||
renderWhitespace = _stringSet<'none' | 'boundary' | 'all'>(opts.renderWhitespace, defaults.renderWhitespace, ['none', 'boundary', 'all']);
|
||||
renderWhitespace = _stringSet<'none' | 'boundary' | 'all'>(renderWhitespace, defaults.renderWhitespace, ['none', 'boundary', 'all']);
|
||||
}
|
||||
|
||||
let renderLineHighlight = opts.renderLineHighlight;
|
||||
@@ -1957,7 +1965,7 @@ export class EditorOptionsValidator {
|
||||
} else if (<any>renderLineHighlight === false) {
|
||||
renderLineHighlight = 'none';
|
||||
}
|
||||
renderLineHighlight = _stringSet<'none' | 'gutter' | 'line' | 'all'>(opts.renderLineHighlight, defaults.renderLineHighlight, ['none', 'gutter', 'line', 'all']);
|
||||
renderLineHighlight = _stringSet<'none' | 'gutter' | 'line' | 'all'>(renderLineHighlight, defaults.renderLineHighlight, ['none', 'gutter', 'line', 'all']);
|
||||
}
|
||||
|
||||
let mouseWheelScrollSensitivity = _float(opts.mouseWheelScrollSensitivity, defaults.scrollbar.mouseWheelScrollSensitivity);
|
||||
@@ -1965,7 +1973,12 @@ export class EditorOptionsValidator {
|
||||
// Disallow 0, as it would prevent/block scrolling
|
||||
mouseWheelScrollSensitivity = 1;
|
||||
}
|
||||
const scrollbar = this._sanitizeScrollbarOpts(opts.scrollbar, defaults.scrollbar, mouseWheelScrollSensitivity);
|
||||
|
||||
let fastScrollSensitivity = _float(opts.fastScrollSensitivity, defaults.scrollbar.fastScrollSensitivity);
|
||||
if (fastScrollSensitivity <= 0) {
|
||||
fastScrollSensitivity = defaults.scrollbar.fastScrollSensitivity;
|
||||
}
|
||||
const scrollbar = this._sanitizeScrollbarOpts(opts.scrollbar, defaults.scrollbar, mouseWheelScrollSensitivity, fastScrollSensitivity);
|
||||
const minimap = this._sanitizeMinimapOpts(opts.minimap, defaults.minimap);
|
||||
|
||||
return {
|
||||
@@ -2014,10 +2027,10 @@ export class EditorOptionsValidator {
|
||||
if (typeof opts.acceptSuggestionOnEnter === 'boolean') {
|
||||
opts.acceptSuggestionOnEnter = opts.acceptSuggestionOnEnter ? 'on' : 'off';
|
||||
}
|
||||
const find = this._santizeFindOpts(opts.find, defaults.find);
|
||||
const find = this._sanitizeFindOpts(opts.find, defaults.find);
|
||||
return {
|
||||
selectionClipboard: _boolean(opts.selectionClipboard, defaults.selectionClipboard),
|
||||
hover: this._santizeHoverOpts(opts.hover, defaults.hover),
|
||||
hover: this._sanitizeHoverOpts(opts.hover, defaults.hover),
|
||||
links: _boolean(opts.links, defaults.links),
|
||||
contextmenu: _boolean(opts.contextmenu, defaults.contextmenu),
|
||||
quickSuggestions: quickSuggestions,
|
||||
@@ -2535,7 +2548,7 @@ export const EDITOR_DEFAULTS: IValidatedEditorOptions = {
|
||||
wordWrapMinified: true,
|
||||
wrappingIndent: WrappingIndent.Same,
|
||||
wordWrapBreakBeforeCharacters: '([{‘“〈《「『【〔([{「£¥$£¥++',
|
||||
wordWrapBreakAfterCharacters: ' \t})]?|&,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」',
|
||||
wordWrapBreakAfterCharacters: ' \t})]?|/&,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」',
|
||||
wordWrapBreakObtrusiveCharacters: '.',
|
||||
autoClosingBrackets: 'languageDefined',
|
||||
autoClosingQuotes: 'languageDefined',
|
||||
@@ -2592,6 +2605,7 @@ export const EDITOR_DEFAULTS: IValidatedEditorOptions = {
|
||||
verticalSliderSize: 14,
|
||||
handleMouseWheel: true,
|
||||
mouseWheelScrollSensitivity: 1,
|
||||
fastScrollSensitivity: 5,
|
||||
},
|
||||
minimap: {
|
||||
// {{SQL CARBON EDIT}}
|
||||
|
||||
@@ -15,7 +15,7 @@ export const EditorZoom: IEditorZoom = new class implements IEditorZoom {
|
||||
|
||||
private _zoomLevel: number = 0;
|
||||
|
||||
private readonly _onDidChangeZoomLevel: Emitter<number> = new Emitter<number>();
|
||||
private readonly _onDidChangeZoomLevel = new Emitter<number>();
|
||||
public readonly onDidChangeZoomLevel: Event<number> = this._onDidChangeZoomLevel.event;
|
||||
|
||||
public getZoomLevel(): number {
|
||||
|
||||
Reference in New Issue
Block a user