File tree Expand file tree Collapse file tree 5 files changed +9
-2
lines changed Expand file tree Collapse file tree 5 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
49
49
50
50
### Changed
51
51
52
+ - Changed logger to draw focus on certain error messages
53
+ ([ #744 ] ( https://github.com/fortran-lang/vscode-fortran-support/issues/744 ) )
52
54
- Changed the way extension Release Notes are displayed
53
55
([ #723 ] ( https://github.com/fortran-lang/vscode-fortran-support/issues/723 ) )
54
56
- Changed the activation events of the extension to include the ` onCommand ` for all register commands
Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ export class FortranFormattingProvider implements vscode.DocumentFormattingEditP
50
50
this . logger . error (
51
51
`[format] fprettify can only format FortranFreeForm, change to findent for FortranFixedForm formatting`
52
52
) ;
53
+ this . logger . show ( true ) ; // Keep focus on editor
53
54
return undefined ;
54
55
}
55
56
return this . spawnFormatBase ( document , 'fprettify' , [ '--stdout' ] ) ;
@@ -101,6 +102,7 @@ export class FortranFormattingProvider implements vscode.DocumentFormattingEditP
101
102
102
103
if ( ! FORMATTERS . includes ( this . formatter ) ) {
103
104
this . logger . error ( `[format] Unsupported formatter: ${ this . formatter } ` ) ;
105
+ this . logger . show ( true ) ; // Keep focus on editor
104
106
}
105
107
return this . formatter ;
106
108
}
Original file line number Diff line number Diff line change @@ -430,6 +430,7 @@ export class FortranLintingProvider {
430
430
return ;
431
431
} catch ( err ) {
432
432
this . logger . error ( `[build] Compiling ${ textDocument . fileName } failed:` , err ) ;
433
+ this . logger . show ( true ) ; // Keep focus on editor
433
434
console . error ( `ERROR: ${ err } ` ) ;
434
435
}
435
436
}
Original file line number Diff line number Diff line change @@ -265,6 +265,7 @@ export class FortlsClient {
265
265
const results = spawnSync ( executablePath , args . concat ( [ '--version' ] ) ) ;
266
266
if ( results . error ) {
267
267
this . logger . error ( `[lsp.client] Unable to launch LS to check version:` , results . error ) ;
268
+ this . logger . show ( ) ;
268
269
const selected = window . showErrorMessage (
269
270
'Modern Fortran Error starting fortls: Check that fortls is in your PATH or that "fortran.fortls.path" is pointing to a fortls binary.' ,
270
271
'Settings' ,
@@ -282,6 +283,7 @@ export class FortlsClient {
282
283
}
283
284
if ( results . status !== 0 ) {
284
285
this . logger . error ( `[lsp.client] Unable to verify input arguments with LS:` ) ;
286
+ this . logger . show ( ) ;
285
287
const selected = window . showErrorMessage (
286
288
'Error launching fortls: Please check that all selected options are supported by your language server version.' ,
287
289
'Settings' ,
Original file line number Diff line number Diff line change @@ -71,8 +71,8 @@ export class Logger {
71
71
}
72
72
}
73
73
74
- public show ( ) {
75
- this . channel . show ( ) ;
74
+ public show ( preserveFocus ?: boolean ) {
75
+ this . channel . show ( preserveFocus ) ;
76
76
}
77
77
78
78
private logObject ( data : unknown ) : void {
You can’t perform that action at this time.
0 commit comments