@@ -30,7 +30,7 @@ export { IEnvVars };
30
30
export type ReleaseMetadata = Map < string , Map < string , Map < string , string [ ] > > > ;
31
31
32
32
type ManageHLS = 'GHCup' | 'PATH' ;
33
- let manageHLS = workspace . getConfiguration ( 'haskell' ) . get ( 'manageHLS' ) as ManageHLS | null ;
33
+ let manageHLS = workspace . getConfiguration ( 'haskell' ) . get ( 'manageHLS' ) as ManageHLS ;
34
34
35
35
// On Windows the executable needs to be stored somewhere with an .exe extension
36
36
const exeExt = process . platform === 'win32' ? '.exe' : '' ;
@@ -239,8 +239,8 @@ export async function findHaskellLanguageServer(
239
239
fs . mkdirSync ( storagePath ) ;
240
240
}
241
241
242
- if ( ! manageHLS ) {
243
- // plugin needs initialization
242
+ // first plugin initialization
243
+ if ( ! context . globalState . get ( "pluginInitialized" ) as boolean | null ) {
244
244
const promptMessage = 'How do you want the extension to manage/discover HLS and the relevant toolchain?' ;
245
245
246
246
const decision =
@@ -256,9 +256,10 @@ export async function findHaskellLanguageServer(
256
256
manageHLS = 'PATH' ;
257
257
}
258
258
workspace . getConfiguration ( 'haskell' ) . update ( 'manageHLS' , manageHLS , ConfigurationTarget . Global ) ;
259
+ context . globalState . update ( "pluginInitialized" , true ) ;
259
260
}
260
261
261
- if ( manageHLS === 'PATH' || manageHLS === null ) {
262
+ if ( manageHLS === 'PATH' ) {
262
263
return findHLSinPATH ( context , logger , folder ) ;
263
264
} else {
264
265
// we manage HLS, make sure ghcup is installed/available
0 commit comments