File tree Expand file tree Collapse file tree 5 files changed +3
-11
lines changed
Expand file tree Collapse file tree 5 files changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -42,4 +42,4 @@ arguments = Arguments
4242 <*> (commandP <|> lspCommand <|> checkCommand)
4343 where
4444 checkCommand = Check <$> many (argument str (metavar " FILES/DIRS..." ))
45- lspCommand = LSP <$ switch (long " lsp" <> help " Start talking to an LSP client" )
45+ lspCommand = LSP <$ flag' True (long " lsp" <> help " Start talking to an LSP client" )
Original file line number Diff line number Diff line change @@ -22,7 +22,6 @@ import Development.IDE (Logger (Logger),
2222 Priority (Info ), action )
2323import Development.IDE.Core.OfInterest (kick )
2424import Development.IDE.Core.Rules (mainRule )
25- import Development.IDE.Main (Command (LSP ))
2625import qualified Development.IDE.Main as Main
2726import qualified Development.IDE.Plugin.HLS.GhcIde as GhcIde
2827import qualified Development.IDE.Plugin.Test as Test
@@ -77,12 +76,6 @@ main = do
7776 T. putStrLn $ T. pack (" [" ++ upper (show pri) ++ " ] " ) <> msg
7877 logLevel = if argsVerbose then minBound else Info
7978
80- case argsCommand of
81- LSP -> do
82- hPutStrLn stderr " Starting LSP server..."
83- hPutStrLn stderr " If you are seeing this in a terminal, you probably should have run ghcide WITHOUT the --lsp option!"
84- _ -> return ()
85-
8679 Main. defaultMain def
8780 {Main. argCommand = argsCommand
8881
Original file line number Diff line number Diff line change @@ -199,7 +199,7 @@ defaultMain Arguments{..} = do
199199 LSP -> do
200200 t <- offsetTime
201201 hPutStrLn stderr " Starting LSP server..."
202- hPutStrLn stderr " If you are seeing this in a terminal, you probably should have run ghcide WITHOUT the --lsp option!"
202+ hPutStrLn stderr " If you are seeing this in a terminal, you probably should have run WITHOUT the --lsp option!"
203203 runLanguageServer options inH outH argsGetHieDbLoc argsDefaultHlsConfig argsOnConfigChange (pluginHandlers plugins) $ \ env vfs rootPath hiedb hieChan -> do
204204 t <- t
205205 hPutStrLn stderr $ " Started LSP server in " ++ showDuration t
Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ arguments = GhcideArguments
120120 <*> switch (long " project-ghc-version"
121121 <> help " Work out the project GHC version and print it" )
122122 where
123- lspCommand = LSP <$ switch (long " lsp" <> help " Start talking to an LSP server" )
123+ lspCommand = LSP <$ flag' True (long " lsp" <> help " Start talking to an LSP server" )
124124 checkCommand = Check <$> many (argument str (metavar " FILES/DIRS..." ))
125125
126126-- ---------------------------------------------------------------------
Original file line number Diff line number Diff line change @@ -86,7 +86,6 @@ runLspMode ghcideArgs@GhcideArguments{..} idePlugins = do
8686 hPutStrLn stderr $ " with arguments: " <> show ghcideArgs
8787 hPutStrLn stderr $ " with plugins: " <> show (map fst $ ipMap idePlugins)
8888 hPutStrLn stderr $ " in directory: " <> dir
89- hPutStrLn stderr " If you are seeing this in a terminal, you probably should have run ghcide WITHOUT the --lsp option!"
9089
9190 Main. defaultMain def
9291 { Main. argCommand = argsCommand
You can’t perform that action at this time.
0 commit comments