@@ -21,6 +21,7 @@ import Control.Exception.Safe (SomeException,
21
21
import Control.Monad.Extra (concatMapM , unless ,
22
22
when )
23
23
import qualified Data.Aeson.Encode.Pretty as A
24
+ import Data.Coerce (coerce )
24
25
import Data.Default (Default (def ))
25
26
import Data.Foldable (traverse_ )
26
27
import Data.Hashable (hashed )
@@ -92,7 +93,8 @@ import Development.IDE.Types.Logger (Logger,
92
93
Recorder ,
93
94
WithPriority ,
94
95
cmapWithPrio ,
95
- logWith , vsep , (<+>) )
96
+ logWith , nest , vsep ,
97
+ (<+>) )
96
98
import Development.IDE.Types.Monitoring (Monitoring )
97
99
import Development.IDE.Types.Options (IdeGhcSession ,
98
100
IdeOptions (optCheckParents , optCheckProject , optReportProgress , optRunSubset ),
@@ -146,7 +148,7 @@ import Text.Printf (printf)
146
148
147
149
data Log
148
150
= LogHeapStats ! HeapStats. Log
149
- | LogLspStart
151
+ | LogLspStart [ PluginId ]
150
152
| LogLspStartDuration ! Seconds
151
153
| LogShouldRunSubset ! Bool
152
154
| LogOnlyPartialGhc92Support
@@ -163,10 +165,12 @@ data Log
163
165
instance Pretty Log where
164
166
pretty = \ case
165
167
LogHeapStats log -> pretty log
166
- LogLspStart ->
167
- vsep
168
- [ " Staring LSP server..."
169
- , " If you are seeing this in a terminal, you probably should have run WITHOUT the --lsp option!" ]
168
+ LogLspStart pluginIds ->
169
+ nest 2 $ vsep
170
+ [ " Starting LSP server..."
171
+ , " If you are seeing this in a terminal, you probably should have run WITHOUT the --lsp option!"
172
+ , " PluginIds:" <+> pretty (coerce @ _ @ [T. Text ] pluginIds)
173
+ ]
170
174
LogLspStartDuration duration ->
171
175
" Started LSP server in" <+> pretty (showDuration duration)
172
176
LogShouldRunSubset shouldRunSubset ->
@@ -336,7 +340,7 @@ defaultMain recorder Arguments{..} = withHeapStats (cmapWithPrio LogHeapStats re
336
340
LT. putStrLn $ decodeUtf8 $ A. encodePretty $ pluginsToDefaultConfig argsHlsPlugins
337
341
LSP -> withNumCapabilities (maybe (numProcessors `div` 2 ) fromIntegral argsThreads) $ do
338
342
t <- offsetTime
339
- log Info LogLspStart
343
+ log Info $ LogLspStart (pluginId <$> ipMap argsHlsPlugins)
340
344
341
345
let getIdeState :: LSP. LanguageContextEnv Config -> Maybe FilePath -> WithHieDb -> IndexQueue -> IO IdeState
342
346
getIdeState env rootPath withHieDb hieChan = do
0 commit comments