@@ -149,10 +149,10 @@ runLanguageServer options userHandlers onInitialConfig onConfigChange getIdeStat
149149 ResponseAndRequest x@RequestMessage{_id, _params} wrap wrapNewReq act ->
150150 checkCancelled ide clearReqId waitForCancel lspFuncs wrap act x _id _params $
151151 \(res, newReq) -> do
152− sendFunc $ wrap $ ResponseMessage "2.0" (responseId _id) (Just res) Nothing
153− case newReq of
154− Nothing -> return ()
155− Just (rm, newReqParams) -> do
152+ case res of
153+ Left e -> sendFunc $ wrap $ ResponseMessage "2.0" (responseId _id) Nothing (Just e)
154+ Right r -> sendFunc $ wrap $ ResponseMessage "2.0" (responseId _id) (Just r) Nothing
155+ whenJust newReq $ \(rm, newReqParams) -> do
156156 reqId <- getNextReqId
157157 sendFunc $ wrapNewReq $ RequestMessage "2.0" reqId rm newReqParams
158158 InitialParams x@RequestMessage{_id, _params} act -> do
@@ -222,15 +222,13 @@ data Message c
222222 -- | Used for cases in which we need to send not only a response,
223223 -- but also an additional request to the client.
224224 -- For example, 'executeCommand' may generate an 'applyWorkspaceEdit' request.
225− | forall m rm req resp newReqParams newReqBody . (Show m, Show rm, Show req) => ResponseAndRequest (RequestMessage m req resp) (ResponseMessage resp -> FromServerMessage) (RequestMessage rm newReqParams newReqBody -> FromServerMessage) (LSP.LspFuncs c -> IdeState -> req -> IO (resp, Maybe (rm, newReqParams)))
225+ | forall m rm req resp newReqParams newReqBody . (Show m, Show rm, Show req) => ResponseAndRequest (RequestMessage m req resp) (ResponseMessage resp -> FromServerMessage) (RequestMessage rm newReqParams newReqBody -> FromServerMessage) (LSP.LspFuncs c -> IdeState -> req -> IO (Either ResponseError resp, Maybe (rm, newReqParams)))
226226 | forall m req . (Show m, Show req) => Notification (NotificationMessage m req) (LSP.LspFuncs c -> IdeState -> req -> IO ())
227227 -- | Used for the InitializeRequest only, where the response is generated by the LSP core handler.
228228 | InitialParams InitializeRequest (LSP.LspFuncs c -> IdeState -> InitializeParams -> IO ())
229229
230230modifyOptions :: LSP.Options -> LSP.Options
231231modifyOptions x = x{ LSP.textDocumentSync = Just $ tweakTDS origTDS
232− , LSP.executeCommandCommands = Just ["typesignature.add"]
233− , LSP.completionTriggerCharacters = Just "."
234232 }
235233 where
236234 tweakTDS tds = tds{_openClose=Just True, _change=Just TdSyncIncremental, _save=Just $ SaveOptions Nothing}