Skip to content

Commit 396286e

Browse files
Kapil Borledaviwil
Kapil Borle
authored andcommitted
Remove indentation from comment help
1 parent 2cfb13d commit 396286e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/features/HelpCompletion.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,9 @@ class HelpCompletionProvider {
167167
let editor = window.activeTextEditor;
168168
let replaceRange = new Range(triggerStartPos.translate(0, -1), triggerStartPos.translate(0, 1));
169169

170+
// Trim the leading whitespace (used by the rule for indentation) as VSCode takes care of the indentation.
170171
// Trim the last empty line and join the strings.
171-
let text = content.slice(0, -1).join(this.getEOL(doc.eol));
172+
let text = content.map(x => x.trimLeft()).slice(0, -1).join(this.getEOL(doc.eol));
172173
editor.insertSnippet(new SnippetString(text), replaceRange);
173174
});
174175
}

0 commit comments

Comments
 (0)