File tree 2 files changed +11
-2
lines changed
2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -80,6 +80,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
80
80
81
81
### Fixed
82
82
83
+ - Fixed bug where formatting arguments would not be updated from settings.json
84
+ ([[ #1007 ] ( https://github.com/fortran-lang/vscode-fortran-support/issues/1007 )] )
83
85
- Fixed bug where specifying ` -ffree-line-length-X ` and ` -ffixed-line-length-X `
84
86
as ` linter.extraArgs ` would be overridden by the default behaviour of ` fortls `
85
87
([ #925 ] ( https://github.com/fortran-lang/vscode-fortran-support/issues/925 ) )
Original file line number Diff line number Diff line change @@ -16,9 +16,16 @@ import {
16
16
} from '../util/tools' ;
17
17
18
18
export class FortranFormattingProvider implements vscode . DocumentFormattingEditProvider {
19
- private readonly workspace = vscode . workspace . getConfiguration ( EXTENSION_ID ) ;
19
+ private workspace = vscode . workspace . getConfiguration ( EXTENSION_ID ) ;
20
20
private formatter : string | undefined ;
21
- constructor ( private logger : Logger ) { }
21
+ constructor ( private logger : Logger ) {
22
+ vscode . workspace . onDidChangeConfiguration ( e => {
23
+ if ( e . affectsConfiguration ( `${ EXTENSION_ID } .formatting` ) ) {
24
+ this . logger . debug ( '[format] Configuration changed, reloading formatter' ) ;
25
+ this . workspace = vscode . workspace . getConfiguration ( EXTENSION_ID ) ;
26
+ }
27
+ } ) ;
28
+ }
22
29
23
30
public async provideDocumentFormattingEdits (
24
31
document : vscode . TextDocument ,
You can’t perform that action at this time.
0 commit comments