mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-02 06:21:50 +01:00
add option editor.suggest.snippetsPreventQuickSuggestions #50776
This commit is contained in:
@@ -573,6 +573,11 @@ const editorConfiguration: IConfigurationNode = {
|
||||
default: true,
|
||||
description: nls.localize('suggest.filterGraceful', "Controls whether filtering and sorting suggestions accounts for small typos.")
|
||||
},
|
||||
'editor.suggest.snippetsPreventQuickSuggestions': {
|
||||
type: 'boolean',
|
||||
default: true,
|
||||
description: nls.localize('suggest.snippetsPreventQuickSuggestions', "Control whether an active snippet prevents quick suggestions.")
|
||||
},
|
||||
'editor.selectionHighlight': {
|
||||
'type': 'boolean',
|
||||
'default': EDITOR_DEFAULTS.contribInfo.selectionHighlight,
|
||||
|
||||
@@ -163,6 +163,10 @@ export interface ISuggestOptions {
|
||||
* Enable graceful matching. Defaults to true.
|
||||
*/
|
||||
filterGraceful?: boolean;
|
||||
/**
|
||||
* Prevent quick suggestions when a snippet is active. Defaults to true.
|
||||
*/
|
||||
snippetsPreventQuickSuggestions?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1253,7 +1257,9 @@ export class InternalEditorOptions {
|
||||
} else if (!a || !b) {
|
||||
return false;
|
||||
} else {
|
||||
return a.filterGraceful === b.filterGraceful && a.snippets === b.snippets;
|
||||
return a.filterGraceful === b.filterGraceful
|
||||
&& a.snippets === b.snippets
|
||||
&& a.snippetsPreventQuickSuggestions === b.snippetsPreventQuickSuggestions;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1752,7 +1758,7 @@ export class EditorOptionsValidator {
|
||||
return {
|
||||
filterGraceful: _boolean(opts.suggest.filterGraceful, defaults.filterGraceful),
|
||||
snippets: _stringSet<'top' | 'bottom' | 'inline' | 'none'>(opts.snippetSuggestions, defaults.snippets, ['top', 'bottom', 'inline', 'none']),
|
||||
snippetsPreventQuickSuggestions: true,
|
||||
snippetsPreventQuickSuggestions: _boolean(opts.suggest.snippetsPreventQuickSuggestions, defaults.filterGraceful),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
4
src/vs/monaco.d.ts
vendored
4
src/vs/monaco.d.ts
vendored
@@ -2513,6 +2513,10 @@ declare namespace monaco.editor {
|
||||
* Enable graceful matching. Defaults to true.
|
||||
*/
|
||||
filterGraceful?: boolean;
|
||||
/**
|
||||
* Prevent quick suggestions when a snippet is active. Defaults to true.
|
||||
*/
|
||||
snippetsPreventQuickSuggestions?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user