提交 9421cfda 编写于 作者: M Matt Bierner

Allow trigger js doc completion in cases like a/**|

上级 9939b732
......@@ -66,9 +66,10 @@ export default class JsDocCompletionHelper implements CompletionItemProvider {
}
// Only show the JSdoc completion when the everything before the cursor is whitespace
// or could be the opening to a comment
// or could be the opening of a comment
const line = document.lineAt(position.line).text;
if (line.slice(0, position.character).match(/^\s*\/?\**\s*$/)) {
const prefix = line.slice(0, position.character);
if (prefix.match(/\/\*+\s*$/) || prefix.match(/^\s*\/?\**\s*$/)) {
return [new JsDocCompletionItem(document.uri, position)];
}
return [];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册