Skip to content

Commit 4bf2c6e

Browse files
authored
Merge pull request #1171 from zandivx/main
Resolve internal variables in formatter arguments
2 parents 4deaf57 + a2f55e8 commit 4bf2c6e

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/format/provider.ts

+6-4
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)