Skip to content

Commit

Permalink
Issue visual warning for humans if --lsp option used (#161)
Browse files Browse the repository at this point in the history
Experience shows that people sometimes mistakenly start `ghcide` on
the command line with the `--lsp` option (which is intended to be used
only in server/client communication scenarios) and then wonder why
nothing is working..

So let's issue a warning message whenever `--lsp` is used.
  • Loading branch information
jacg authored and cocreature committed Oct 8, 2019
1 parent 2a67821 commit e583f13
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions exe/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ main = do
if argLSP then do
t <- offsetTime
hPutStrLn stderr "Starting LSP server..."
hPutStrLn stderr "If you are seeing this in a terminal, you probably should have run ghcidie WITHOUT the --lsp option!"
runLanguageServer def def $ \event vfs caps -> do
t <- t
hPutStrLn stderr $ "Started LSP server in " ++ showDuration t
Expand Down

0 comments on commit e583f13

Please sign in to comment.