We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cb21b0a commit 9953607Copy full SHA for 9953607
ghcide/src/Development/IDE/Main.hs
@@ -314,6 +314,10 @@ defaultMain recorder Arguments{..} = withHeapStats (cmapWithPrio LogHeapStats re
314
ioT <- offsetTime
315
logWith recorder Info $ LogLspStart (pluginId <$> ipMap argsHlsPlugins)
316
317
+ -- Notice why we are using `ideStateVar`:
318
+ -- 1. to pass the ide state to config update callback after the initialization
319
+ -- 2. guard against the case when the server is still starting up and
320
+ -- and after shutdown handler has been called(empty in this case).
321
ideStateVar <- newEmptyMVar
322
let getIdeState :: LSP.LanguageContextEnv Config -> Maybe FilePath -> WithHieDb -> IndexQueue -> IO IdeState
323
getIdeState env rootPath withHieDb hieChan = do
0 commit comments