Merge branch 'master' into ben/notifications

This commit is contained in:
Benjamin Pasero
2018-02-18 11:14:26 +01:00
162 changed files with 1587 additions and 1436 deletions

View File

@@ -464,7 +464,8 @@ export default class TypeScriptCompletionItemProvider implements CompletionItemP
let hasAddedParameters = false;
const snippet = new SnippetString();
snippet.appendText(item.label || item.insertText as string);
const methodName = detail.displayParts.find(part => part.kind === 'methodName');
snippet.appendText((methodName && methodName.text) || item.label || item.insertText as string);
snippet.appendText('(');
let parenCount = 0;

View File

@@ -170,6 +170,12 @@ class TryCompleteJsDocCommand implements Command {
if (!res || !res.body) {
return undefined;
}
// Workaround for #43619
// docCommentTemplate previously returned undefined for empty jsdoc templates.
// TS 2.7 now returns a single line doc comment, which breaks indentation.
if (res.body.newText === '/** */') {
return undefined;
}
return TryCompleteJsDocCommand.templateToSnippet(res.body.newText);
}, () => undefined);
}