mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 22:02:55 +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 {
|
||||
constructor(private _worker: WorkerAccessor) { }
|
||||
|
||||
|
|
@ -195,6 +199,7 @@ export class CompletionAdapter implements languages.CompletionItemProvider {
|
|||
sortText: entry.sortText,
|
||||
filterText: entry.filterText,
|
||||
documentation: entry.documentation,
|
||||
command: toCommand(entry.command),
|
||||
detail: entry.detail,
|
||||
range: wordRange,
|
||||
kind: toCompletionItemKind(entry.kind)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue