File tree Expand file tree Collapse file tree 3 files changed +5
-6
lines changed
Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ main = do
1313 -- https://github.com/agda/agda-language-server/issues/24
1414 hSetEncoding stdout utf8
1515 hSetEncoding stdin utf8
16+
1617 options <- getOptionsFromArgv
1718 if optHelp options
1819 then putStrLn usageMessage
Original file line number Diff line number Diff line change @@ -110,10 +110,7 @@ handlers =
110110 result <- Handler. onHover uri pos
111111 responder $ Right result,
112112 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 ()
117114 -- -- syntax highlighting
118115 -- , requestHandler STextD_cumentSemanticTokensFull $ \req responder -> do
119116 -- 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
1212import Language.LSP.Types hiding (TextDocumentSyncClientCapabilities (.. ))
1313import Data.IORef
1414import Options (Config )
15+ import System.IO (stderr )
1516
1617data Switchboard = Switchboard
1718 { sbPrintLog :: ThreadId
@@ -42,13 +43,13 @@ destroy switchboard = do
4243 killThread (sbRunAgda switchboard)
4344 writeIORef (sbLanguageContextEnv switchboard) Nothing
4445
45- -- | Keep printing log
46+ -- | Keep printing log to stderr
4647-- Consumer of `envLogChan`
4748keepPrintingLog :: Env -> IO ()
4849keepPrintingLog env = forever $ do
4950 result <- readChan (envLogChan env)
5051 when (envDevMode env) $ do
51- Text. putStrLn result
52+ Text. hPutStrLn stderr result
5253
5354-- | Keep sending reactions
5455-- Consumer of `envResponseChan`
You can’t perform that action at this time.
0 commit comments