Formatting Main.hs

This commit is contained in:
Kirill Andreev 2020-06-02 16:27:19 +04:00
parent 9856476ebf
commit 95707100c2
No known key found for this signature in database
GPG Key ID: CF7DA79DE4785A47

View File

@ -68,24 +68,25 @@ syncOptions = J.TextDocumentSyncOptions
} }
lspOptions :: Core.Options lspOptions :: Core.Options
lspOptions = def { Core.textDocumentSync = Just syncOptions lspOptions = def
, Core.executeCommandCommands = Just ["lsp-hello-command"] { Core.textDocumentSync = Just syncOptions
} , Core.executeCommandCommands = Just ["lsp-hello-command"]
}
lspHandlers :: TChan FromClientMessage -> Core.Handlers lspHandlers :: TChan FromClientMessage -> Core.Handlers
lspHandlers rin lspHandlers rin = def
= def { Core.initializedHandler = Just $ passHandler rin NotInitialized { Core.initializedHandler = Just $ passHandler rin NotInitialized
, Core.renameHandler = Just $ passHandler rin ReqRename , Core.renameHandler = Just $ passHandler rin ReqRename
, Core.hoverHandler = Just $ passHandler rin ReqHover , Core.hoverHandler = Just $ passHandler rin ReqHover
, Core.didOpenTextDocumentNotificationHandler = Just $ passHandler rin NotDidOpenTextDocument , Core.didOpenTextDocumentNotificationHandler = Just $ passHandler rin NotDidOpenTextDocument
, Core.didSaveTextDocumentNotificationHandler = Just $ passHandler rin NotDidSaveTextDocument , Core.didSaveTextDocumentNotificationHandler = Just $ passHandler rin NotDidSaveTextDocument
, Core.didChangeTextDocumentNotificationHandler = Just $ passHandler rin NotDidChangeTextDocument , Core.didChangeTextDocumentNotificationHandler = Just $ passHandler rin NotDidChangeTextDocument
, Core.didCloseTextDocumentNotificationHandler = Just $ passHandler rin NotDidCloseTextDocument , Core.didCloseTextDocumentNotificationHandler = Just $ passHandler rin NotDidCloseTextDocument
, Core.cancelNotificationHandler = Just $ passHandler rin NotCancelRequestFromClient , Core.cancelNotificationHandler = Just $ passHandler rin NotCancelRequestFromClient
, Core.responseHandler = Just $ responseHandlerCb rin , Core.responseHandler = Just $ responseHandlerCb rin
, Core.codeActionHandler = Just $ passHandler rin ReqCodeAction , Core.codeActionHandler = Just $ passHandler rin ReqCodeAction
, Core.executeCommandHandler = Just $ passHandler rin ReqExecuteCommand , Core.executeCommandHandler = Just $ passHandler rin ReqExecuteCommand
} }
passHandler :: TChan FromClientMessage -> (a -> FromClientMessage) -> Core.Handler a passHandler :: TChan FromClientMessage -> (a -> FromClientMessage) -> Core.Handler a
passHandler rin c notification = do passHandler rin c notification = do