File tree 5 files changed +3
-11
lines changed
5 files changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -42,4 +42,4 @@ arguments = Arguments
42
42
<*> (commandP <|> lspCommand <|> checkCommand)
43
43
where
44
44
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),
22
22
Priority (Info ), action )
23
23
import Development.IDE.Core.OfInterest (kick )
24
24
import Development.IDE.Core.Rules (mainRule )
25
- import Development.IDE.Main (Command (LSP ))
26
25
import qualified Development.IDE.Main as Main
27
26
import qualified Development.IDE.Plugin.HLS.GhcIde as GhcIde
28
27
import qualified Development.IDE.Plugin.Test as Test
@@ -77,12 +76,6 @@ main = do
77
76
T. putStrLn $ T. pack (" [" ++ upper (show pri) ++ " ] " ) <> msg
78
77
logLevel = if argsVerbose then minBound else Info
79
78
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
-
86
79
Main. defaultMain def
87
80
{Main. argCommand = argsCommand
88
81
Original file line number Diff line number Diff line change @@ -199,7 +199,7 @@ defaultMain Arguments{..} = do
199
199
LSP -> do
200
200
t <- offsetTime
201
201
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!"
203
203
runLanguageServer options inH outH argsGetHieDbLoc argsDefaultHlsConfig argsOnConfigChange (pluginHandlers plugins) $ \ env vfs rootPath hiedb hieChan -> do
204
204
t <- t
205
205
hPutStrLn stderr $ " Started LSP server in " ++ showDuration t
Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ arguments = GhcideArguments
120
120
<*> switch (long " project-ghc-version"
121
121
<> help " Work out the project GHC version and print it" )
122
122
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" )
124
124
checkCommand = Check <$> many (argument str (metavar " FILES/DIRS..." ))
125
125
126
126
-- ---------------------------------------------------------------------
Original file line number Diff line number Diff line change @@ -86,7 +86,6 @@ runLspMode ghcideArgs@GhcideArguments{..} idePlugins = do
86
86
hPutStrLn stderr $ " with arguments: " <> show ghcideArgs
87
87
hPutStrLn stderr $ " with plugins: " <> show (map fst $ ipMap idePlugins)
88
88
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!"
90
89
91
90
Main. defaultMain def
92
91
{ Main. argCommand = argsCommand
You can’t perform that action at this time.
0 commit comments