mirror of
https://github.com/microsoft/vscode.git
synced 2026-10-01 11:32:08 +01:00
Merge pull request #41595 from TypeFox/ak/monaco_642
[monaco] fix Microsoft/monaco-editor#642: sync CompletionItemProvider api
This commit is contained in:
@@ -530,6 +530,18 @@ export interface CompletionItem {
|
||||
* line completions were [requested](#CompletionItemProvider.provideCompletionItems) at.~~
|
||||
*/
|
||||
textEdit?: model.ISingleEditOperation;
|
||||
/**
|
||||
* An optional array of additional text edits that are applied when
|
||||
* selecting this completion. Edits must not overlap with the main edit
|
||||
* nor with themselves.
|
||||
*/
|
||||
additionalTextEdits?: model.ISingleEditOperation[];
|
||||
/**
|
||||
* An optional set of characters that when pressed while this completion is active will accept it first and
|
||||
* then type that character. *Note* that all commit characters should have `length=1` and that superfluous
|
||||
* characters will be ignored.
|
||||
*/
|
||||
commitCharacters?: string[];
|
||||
}
|
||||
/**
|
||||
* Represents a collection of [completion items](#CompletionItem) to be presented
|
||||
@@ -639,7 +651,9 @@ class SuggestAdapter {
|
||||
command: item.command,
|
||||
sortText: item.sortText,
|
||||
filterText: item.filterText,
|
||||
snippetType: 'internal'
|
||||
snippetType: 'internal',
|
||||
additionalTextEdits: item.additionalTextEdits,
|
||||
commitCharacters: item.commitCharacters
|
||||
};
|
||||
let editRange = item.textEdit ? item.textEdit.range : item.range;
|
||||
if (editRange) {
|
||||
|
||||
Vendored
+12
@@ -4180,6 +4180,18 @@ declare module monaco.languages {
|
||||
* line completions were [requested](#CompletionItemProvider.provideCompletionItems) at.~~
|
||||
*/
|
||||
textEdit?: editor.ISingleEditOperation;
|
||||
/**
|
||||
* An optional array of additional text edits that are applied when
|
||||
* selecting this completion. Edits must not overlap with the main edit
|
||||
* nor with themselves.
|
||||
*/
|
||||
additionalTextEdits?: editor.ISingleEditOperation[];
|
||||
/**
|
||||
* An optional set of characters that when pressed while this completion is active will accept it first and
|
||||
* then type that character. *Note* that all commit characters should have `length=1` and that superfluous
|
||||
* characters will be ignored.
|
||||
*/
|
||||
commitCharacters?: string[];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user