mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Refresh master with initial release/0.24 snapshot (#332)
* Initial port of release/0.24 source code * Fix additional headers * Fix a typo in launch.json
This commit is contained in:
@@ -213,7 +213,7 @@ const editorConfiguration: IConfigurationNode = {
|
||||
'type': 'number'
|
||||
},
|
||||
'default': EDITOR_DEFAULTS.viewInfo.rulers,
|
||||
'description': nls.localize('rulers', "Columns at which to show vertical rulers")
|
||||
'description': nls.localize('rulers', "Render vertical rulers after a certain number of monospace characters. Use multiple values for multiple rulers. No rulers are drawn if array is empty")
|
||||
},
|
||||
'editor.wordSeparators': {
|
||||
'type': 'string',
|
||||
@@ -410,7 +410,7 @@ const editorConfiguration: IConfigurationNode = {
|
||||
'editor.autoIndent': {
|
||||
'type': 'boolean',
|
||||
'default': EDITOR_DEFAULTS.autoIndent,
|
||||
'description': nls.localize('autoIndent', "Controls if the editor should automatically adjust the indentation when users type, paste or move lines. Indentation rules of the language must be available. ")
|
||||
'description': nls.localize('autoIndent', "Controls if the editor should automatically adjust the indentation when users type, paste or move lines. Indentation rules of the language must be available.")
|
||||
},
|
||||
'editor.suggestOnTriggerCharacters': {
|
||||
'type': 'boolean',
|
||||
@@ -598,6 +598,11 @@ const editorConfiguration: IConfigurationNode = {
|
||||
'default': EDITOR_DEFAULTS.contribInfo.colorDecorators,
|
||||
'description': nls.localize('colorDecorators', "Controls whether the editor should render the inline color decorators and color picker.")
|
||||
},
|
||||
'editor.lightbulb.enabled': {
|
||||
'type': 'boolean',
|
||||
'default': EDITOR_DEFAULTS.contribInfo.lightbulbEnabled,
|
||||
'description': nls.localize('codeActions', "Enables the code action lightbulb")
|
||||
},
|
||||
'diffEditor.renderSideBySide': {
|
||||
'type': 'boolean',
|
||||
'default': true,
|
||||
|
||||
@@ -114,6 +114,17 @@ export interface IEditorMinimapOptions {
|
||||
maxColumn?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Configuration options for editor minimap
|
||||
*/
|
||||
export interface IEditorLightbulbOptions {
|
||||
/**
|
||||
* Enable the lightbulb code action.
|
||||
* Defaults to true.
|
||||
*/
|
||||
enabled?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* Configuration options for the editor.
|
||||
*/
|
||||
@@ -414,7 +425,7 @@ export interface IEditorOptions {
|
||||
* Accept suggestions on ENTER.
|
||||
* Defaults to 'on'.
|
||||
*/
|
||||
acceptSuggestionOnEnter?: 'on' | 'smart' | 'off';
|
||||
acceptSuggestionOnEnter?: boolean | 'on' | 'smart' | 'off';
|
||||
/**
|
||||
* Accept suggestions on provider defined characters.
|
||||
* Defaults to true.
|
||||
@@ -462,6 +473,10 @@ export interface IEditorOptions {
|
||||
* @internal
|
||||
*/
|
||||
referenceInfos?: boolean;
|
||||
/**
|
||||
* Control the behavior and rendering of the code action lightbulb.
|
||||
*/
|
||||
lightbulb?: IEditorLightbulbOptions;
|
||||
/**
|
||||
* Enable code folding
|
||||
* Defaults to true in vscode and to false in monaco-editor.
|
||||
@@ -795,6 +810,7 @@ export interface EditorContribOptions {
|
||||
readonly matchBrackets: boolean;
|
||||
readonly find: InternalEditorFindOptions;
|
||||
readonly colorDecorators: boolean;
|
||||
readonly lightbulbEnabled: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1140,6 +1156,7 @@ export class InternalEditorOptions {
|
||||
&& a.matchBrackets === b.matchBrackets
|
||||
&& this._equalFindOptions(a.find, b.find)
|
||||
&& a.colorDecorators === b.colorDecorators
|
||||
&& a.lightbulbEnabled === b.lightbulbEnabled
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1655,7 +1672,7 @@ export class EditorOptionsValidator {
|
||||
formatOnType: _boolean(opts.formatOnType, defaults.formatOnType),
|
||||
formatOnPaste: _boolean(opts.formatOnPaste, defaults.formatOnPaste),
|
||||
suggestOnTriggerCharacters: _boolean(opts.suggestOnTriggerCharacters, defaults.suggestOnTriggerCharacters),
|
||||
acceptSuggestionOnEnter: _stringSet<'on' | 'smart' | 'off'>(opts.acceptSuggestionOnEnter, defaults.acceptSuggestionOnEnter, ['on', 'smart', 'off']),
|
||||
acceptSuggestionOnEnter: typeof opts.acceptSuggestionOnEnter === 'string' ? _stringSet<'on' | 'smart' | 'off'>(opts.acceptSuggestionOnEnter, defaults.acceptSuggestionOnEnter, ['on', 'smart', 'off']) : opts.acceptSuggestionOnEnter ? 'on' : 'off',
|
||||
acceptSuggestionOnCommitCharacter: _boolean(opts.acceptSuggestionOnCommitCharacter, defaults.acceptSuggestionOnCommitCharacter),
|
||||
snippetSuggestions: _stringSet<'top' | 'bottom' | 'inline' | 'none'>(opts.snippetSuggestions, defaults.snippetSuggestions, ['top', 'bottom', 'inline', 'none']),
|
||||
wordBasedSuggestions: _boolean(opts.wordBasedSuggestions, defaults.wordBasedSuggestions),
|
||||
@@ -1669,6 +1686,7 @@ export class EditorOptionsValidator {
|
||||
matchBrackets: _boolean(opts.matchBrackets, defaults.matchBrackets),
|
||||
find: find,
|
||||
colorDecorators: _boolean(opts.colorDecorators, defaults.colorDecorators),
|
||||
lightbulbEnabled: _boolean(opts.lightbulb ? opts.lightbulb.enabled : false, defaults.lightbulbEnabled)
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -1730,7 +1748,7 @@ export class InternalEditorOptionsFactory {
|
||||
renderControlCharacters: (accessibilityIsOn ? false : opts.viewInfo.renderControlCharacters), // DISABLED WHEN SCREEN READER IS ATTACHED
|
||||
fontLigatures: (accessibilityIsOn ? false : opts.viewInfo.fontLigatures), // DISABLED WHEN SCREEN READER IS ATTACHED
|
||||
renderIndentGuides: (accessibilityIsOn ? false : opts.viewInfo.renderIndentGuides), // DISABLED WHEN SCREEN READER IS ATTACHED
|
||||
renderLineHighlight: (accessibilityIsOn ? 'none' : opts.viewInfo.renderLineHighlight), // DISABLED WHEN SCREEN READER IS ATTACHED
|
||||
renderLineHighlight: opts.viewInfo.renderLineHighlight,
|
||||
scrollbar: opts.viewInfo.scrollbar,
|
||||
minimap: {
|
||||
enabled: (accessibilityIsOn ? false : opts.viewInfo.minimap.enabled), // DISABLED WHEN SCREEN READER IS ATTACHED
|
||||
@@ -1766,7 +1784,8 @@ export class InternalEditorOptionsFactory {
|
||||
showFoldingControls: opts.contribInfo.showFoldingControls,
|
||||
matchBrackets: (accessibilityIsOn ? false : opts.contribInfo.matchBrackets), // DISABLED WHEN SCREEN READER IS ATTACHED
|
||||
find: opts.contribInfo.find,
|
||||
colorDecorators: opts.contribInfo.colorDecorators
|
||||
colorDecorators: opts.contribInfo.colorDecorators,
|
||||
lightbulbEnabled: opts.contribInfo.lightbulbEnabled
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -2074,7 +2093,7 @@ export class EditorLayoutProvider {
|
||||
|
||||
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\', \'Courier New\', monospace, \'Droid Sans Fallback\'';
|
||||
const DEFAULT_LINUX_FONT_FAMILY = '\'Droid Sans Mono\', \'monospace\', monospace, \'Droid Sans Fallback\'';
|
||||
|
||||
/**
|
||||
* @internal
|
||||
@@ -2206,6 +2225,7 @@ export const EDITOR_DEFAULTS: IValidatedEditorOptions = {
|
||||
seedSearchStringFromSelection: true,
|
||||
autoFindInSelection: false
|
||||
},
|
||||
colorDecorators: true
|
||||
colorDecorators: true,
|
||||
lightbulbEnabled: true
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user