Skip to content

Commit 6531d07

Browse files
committed
fixup! Reuse Development.IDE.Main in HLS
1 parent 93b5542 commit 6531d07

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

ghcide/src/Development/IDE/Main.hs

+2-5
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ import System.IO (hPutStrLn, hSetEncoding, stderr, stdout, utf8)
8989
import System.Time.Extra (offsetTime, showDuration)
9090
import Text.Printf (printf)
9191
import qualified Development.IDE.Plugin.HLS.GhcIde as Ghcide
92-
import Ide.Version (findProgramVersions, showProgramVersionOfInterest)
9392

9493
data Arguments = Arguments
9594
{ argsOTMemoryProfiling :: Bool
@@ -143,6 +142,8 @@ defaultMain Arguments{..} = do
143142
case argFiles of
144143
Nothing -> do
145144
t <- offsetTime
145+
hPutStrLn stderr "Starting LSP server..."
146+
hPutStrLn stderr "If you are seeing this in a terminal, you probably should have run ghcide WITHOUT the --lsp option!"
146147
runLanguageServer options (pluginHandler plugins) onInitialConfiguration onConfigurationChange $ \getLspId event vfs caps wProg wIndefProg getConfig rootPath -> do
147148
t <- t
148149
hPutStrLn stderr $ "Started LSP server in " ++ showDuration t
@@ -184,10 +185,6 @@ defaultMain Arguments{..} = do
184185

185186
putStrLn $ "HLS setup tester in " ++ dir ++ "."
186187
putStrLn "Report bugs at https://github.com/haskell/haskell-language-server/issues"
187-
programsOfInterest <- findProgramVersions
188-
putStrLn ""
189-
putStrLn "Tool versions found on the $PATH"
190-
putStrLn $ showProgramVersionOfInterest programsOfInterest
191188

192189
putStrLn $ "\nStep 1/4: Finding files to test in " ++ dir
193190
files <- expandFiles (argFiles ++ ["." | null argFiles])

src/Ide/Main.hs

+1
Original file line numberDiff line numberDiff line change
@@ -97,4 +97,5 @@ runLspMode lspArgs@LspArguments{..} idePlugins = do
9797
{ Main.argFiles = if argLSP then Nothing else Just []
9898
, Main.argsHlsPlugins = idePlugins
9999
, Main.argsLogger = hlsLogger
100+
, Main.argsTesting = argsTesting
100101
}

0 commit comments

Comments
 (0)