提交 fb9865d0 编写于 作者: J Johannes Rieken

api - encourage to set kind when creating a completion item. actually do it

上级 93c130ea
......@@ -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)));
}
}
});
......
......@@ -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);
}
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册