diff --git a/extensions/configuration-editing/src/extension.ts b/extensions/configuration-editing/src/extension.ts index 71a11ba355f..78114b106ba 100644 --- a/extensions/configuration-editing/src/extension.ts +++ b/extensions/configuration-editing/src/extension.ts @@ -18,11 +18,7 @@ export function activate(context) { provideCompletionItems(document, position, token) { const location = getLocation(document.getText(), document.offsetAt(position)); if (location.path[1] === 'command') { - return commands.then(ids => ids.map(id => { - let item = new vscode.CompletionItem(id); - item.kind = vscode.CompletionItemKind.Value; - return item; - })); + return commands.then(ids => ids.map(id => new vscode.CompletionItem(id, vscode.CompletionItemKind.Value))); } } }); diff --git a/src/vs/vscode.d.ts b/src/vs/vscode.d.ts index 054b29ea634..8af068cf3e7 100644 --- a/src/vs/vscode.d.ts +++ b/src/vs/vscode.d.ts @@ -2138,8 +2138,9 @@ declare namespace vscode { * will be used as insert text as well as for sorting and filtering. * * @param label The label of the completion. + * @param kind The [kind](#CompletionItemKind) of the completion. */ - constructor(label: string); + constructor(label: string, kind?: CompletionItemKind); } /**