File tree 1 file changed +9
-1
lines changed
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,13 @@ export class FortlsClient {
49
49
// Do not allow activating the LS functionality if no fortls is detected
50
50
const fortlsFound = this . getLSPath ( ) ;
51
51
52
+ const configuredPath = resolveVariables ( config . get < string > ( 'fortls.path' ) ) ;
53
+ if ( configuredPath ) {
54
+ const msg = `Failed to run fortls from user configured path '` + configuredPath + `'` ;
55
+ await window . showErrorMessage ( msg ) ;
56
+ return ;
57
+ }
58
+
52
59
if ( ! fortlsFound ) {
53
60
const msg = `Forlts wasn't found on your system.
54
61
It is highly recommended to use the fortls to enable IDE features like hover, peeking, GoTos and many more.
@@ -304,7 +311,8 @@ export class FortlsClient {
304
311
// if there's a user configured path to the executable, check if it's absolute
305
312
if ( configuredPath !== '' ) {
306
313
if ( ! path . isAbsolute ( configuredPath ) ) {
307
- throw Error ( "The path to fortls (fortls.path) must be absolute." ) ;
314
+ window . showErrorMessage ( "The path to fortls (fortran.fortls.path) must be absolute." ) ;
315
+ return false ;
308
316
}
309
317
310
318
pathsToCheck . push ( configuredPath ) ;
You can’t perform that action at this time.
0 commit comments