support commands
parent
874d98a040
commit
c7c029db8e
|
@ -449,9 +449,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"vscode-json-languageservice": {
|
||||
"version": "4.1.6",
|
||||
"resolved": "https://registry.npmjs.org/vscode-json-languageservice/-/vscode-json-languageservice-4.1.6.tgz",
|
||||
"integrity": "sha512-DIKb3tcfRtb3tIE6g9SLOl5E9tNSt6kljH08Wa5RwFlVshtXGrDDzttchze4CYy9pJpE9mBtCbRHmLvY1Z1ZXA==",
|
||||
"version": "4.1.7",
|
||||
"resolved": "https://registry.npmjs.org/vscode-json-languageservice/-/vscode-json-languageservice-4.1.7.tgz",
|
||||
"integrity": "sha512-cwG5TwZyHYthsk2aS3W1dVgVP6Vwn3o+zscwN58uMgZt/nKuyxd9vdEB1F58Ix+S5kSKAnkUCP6hvulcoImQQQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"jsonc-parser": "^3.0.0",
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
"requirejs": "^2.3.6",
|
||||
"terser": "^5.6.0",
|
||||
"typescript": "4.2.4",
|
||||
"vscode-json-languageservice": "4.1.6",
|
||||
"vscode-json-languageservice": "4.1.7",
|
||||
"vscode-uri": "3.0.2"
|
||||
},
|
||||
"husky": {
|
||||
|
|
|
@ -310,6 +310,11 @@ function toTextEdit(textEdit: jsonService.TextEdit): editor.ISingleEditOperation
|
|||
range: toRange(textEdit.range),
|
||||
text: textEdit.newText
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
function toCommand(c: jsonService.Command | undefined): languages.Command {
|
||||
return c && c.command === 'editor.action.triggerSuggest' ? { id: c.command, title: c.title, arguments: c.arguments } : undefined
|
||||
}
|
||||
|
||||
export class CompletionAdapter implements languages.CompletionItemProvider {
|
||||
|
@ -351,6 +356,7 @@ export class CompletionAdapter implements languages.CompletionItemProvider {
|
|||
filterText: entry.filterText,
|
||||
documentation: entry.documentation,
|
||||
detail: entry.detail,
|
||||
command: toCommand(entry.command),
|
||||
range: wordRange,
|
||||
kind: toCompletionItemKind(entry.kind)
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue