Skip to content

Commit a2f55e8

Browse files
zandivxgnikit
authored andcommitted
Resolve internal variables in formatter arguments
1 parent 4deaf57 commit a2f55e8

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/format/provider.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@ import which from 'which';
77

88
import { Logger } from '../services/logging';
99
import {
10-
FORMATTERS,
1110
EXTENSION_ID,
12-
promptForMissingTool,
11+
FORMATTERS,
1312
getWholeFileRange,
14-
spawnAsPromise,
1513
pathRelToAbs,
14+
promptForMissingTool,
15+
resolveVariables,
16+
spawnAsPromise,
1617
} from '../util/tools';
1718

1819
export class FortranFormattingProvider implements vscode.DocumentFormattingEditProvider {
@@ -120,7 +121,8 @@ export class FortranFormattingProvider implements vscode.DocumentFormattingEditP
120121
*/
121122
private getFormatterArgs(): string[] {
122123
const args: string[] = this.workspace.get(`formatting.${this.formatter}Args`, []);
123-
return args;
124+
// Resolve internal variables
125+
return args.map(arg => resolveVariables(arg));
124126
}
125127

126128
/**

0 commit comments

Comments
 (0)