Skip to content

Commit

Permalink
src/goFormat.ts: pass filename to custom formatters
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Muller committed Jul 2, 2021
1 parent c3516da commit 3f72e66
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/goFormat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ export class GoDocumentFormattingEditProvider implements vscode.DocumentFormatti
formatFlags.push('-style=indent=' + options.tabSize);
}

if (usingCustomFormatTool(goConfig)) {
formatFlags.push(filename)
}

return this.runFormatter(formatTool, formatFlags, document, token).then(
(edits) => edits,
(err) => {
Expand Down

0 comments on commit 3f72e66

Please sign in to comment.