Plumb formatting to getDocCommentTemplateAtPosition (#52349)

Fixes https://github.com/microsoft/TypeScript/issues/52348
This commit is contained in:
Jake Bailey
2023-01-23 15:31:58 -08:00
committed by GitHub
parent 3d38971b7f
commit 10941888dc
28 changed files with 47 additions and 46 deletions

View File

@@ -2083,7 +2083,7 @@ export class Session<TMessage = string> implements EventSender {
private getDocCommentTemplate(args: protocol.FileLocationRequestArgs) {
const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args);
const position = this.getPositionInFile(args, file);
return languageService.getDocCommentTemplateAtPosition(file, position, this.getPreferences(file));
return languageService.getDocCommentTemplateAtPosition(file, position, this.getPreferences(file), this.getFormatOptions(file));
}
private getSpanOfEnclosingComment(args: protocol.SpanOfEnclosingCommentRequestArgs) {