mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 20:52:56 +01:00
auto trigger vaue completions. For https://github.com/microsoft/monaco-editor/issues/2564
This commit is contained in:
parent
e2a78745d6
commit
04c34d444a
1 changed files with 5 additions and 0 deletions
|
|
@ -157,6 +157,10 @@ function toTextEdit(textEdit: htmlService.TextEdit): editor.ISingleEditOperation
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function toCommand(c: htmlService.Command | undefined): languages.Command {
|
||||||
|
return c ? { id: c.command, title: c.title, arguments: c.arguments } : undefined
|
||||||
|
}
|
||||||
|
|
||||||
export class CompletionAdapter implements languages.CompletionItemProvider {
|
export class CompletionAdapter implements languages.CompletionItemProvider {
|
||||||
constructor(private _worker: WorkerAccessor) { }
|
constructor(private _worker: WorkerAccessor) { }
|
||||||
|
|
||||||
|
|
@ -195,6 +199,7 @@ export class CompletionAdapter implements languages.CompletionItemProvider {
|
||||||
sortText: entry.sortText,
|
sortText: entry.sortText,
|
||||||
filterText: entry.filterText,
|
filterText: entry.filterText,
|
||||||
documentation: entry.documentation,
|
documentation: entry.documentation,
|
||||||
|
command: toCommand(entry.command),
|
||||||
detail: entry.detail,
|
detail: entry.detail,
|
||||||
range: wordRange,
|
range: wordRange,
|
||||||
kind: toCompletionItemKind(entry.kind)
|
kind: toCompletionItemKind(entry.kind)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue