File tree 3 files changed +5
-6
lines changed
3 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ main = do
13
13
-- https://github.com/agda/agda-language-server/issues/24
14
14
hSetEncoding stdout utf8
15
15
hSetEncoding stdin utf8
16
+
16
17
options <- getOptionsFromArgv
17
18
if optHelp options
18
19
then putStrLn usageMessage
Original file line number Diff line number Diff line change @@ -110,10 +110,7 @@ handlers =
110
110
result <- Handler. onHover uri pos
111
111
responder $ Right result,
112
112
notificationHandler SInitialized $ \ _not -> pure () ,
113
- notificationHandler STextDocumentDidOpen $ \ _not -> pure () ,
114
- notificationHandler STextDocumentDidSave $ \ _not -> pure () ,
115
- notificationHandler STextDocumentDidChange $ \ _not -> pure () ,
116
- notificationHandler SCancelRequest $ \ _not -> pure ()
113
+ notificationHandler STextDocumentDidOpen $ \ _not -> pure ()
117
114
-- -- syntax highlighting
118
115
-- , requestHandler STextD_cumentSemanticTokensFull $ \req responder -> do
119
116
-- result <- Handler.onHighlight (req ^. (params . textDocument . uri))
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import Language.LSP.Server
12
12
import Language.LSP.Types hiding (TextDocumentSyncClientCapabilities (.. ))
13
13
import Data.IORef
14
14
import Options (Config )
15
+ import System.IO (stderr )
15
16
16
17
data Switchboard = Switchboard
17
18
{ sbPrintLog :: ThreadId
@@ -42,13 +43,13 @@ destroy switchboard = do
42
43
killThread (sbRunAgda switchboard)
43
44
writeIORef (sbLanguageContextEnv switchboard) Nothing
44
45
45
- -- | Keep printing log
46
+ -- | Keep printing log to stderr
46
47
-- Consumer of `envLogChan`
47
48
keepPrintingLog :: Env -> IO ()
48
49
keepPrintingLog env = forever $ do
49
50
result <- readChan (envLogChan env)
50
51
when (envDevMode env) $ do
51
- Text. putStrLn result
52
+ Text. hPutStrLn stderr result
52
53
53
54
-- | Keep sending reactions
54
55
-- Consumer of `envResponseChan`
You can’t perform that action at this time.
0 commit comments