Skip to content

Fix compilation for PrepareRename #182

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/Language/Haskell/LSP/Core.hs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ data Options =
instance Default Options where
def = Options Nothing Nothing Nothing Nothing Nothing
Nothing Nothing Nothing Nothing Nothing
Nothing Nothing
Nothing Nothing Nothing

-- | A function to publish diagnostics. It aggregates all diagnostics pertaining
-- to a particular version of a document, by source, and sends a
Expand Down Expand Up @@ -238,6 +238,7 @@ data Handlers =
, documentRangeFormattingHandler :: !(Maybe (Handler J.DocumentRangeFormattingRequest))
, documentTypeFormattingHandler :: !(Maybe (Handler J.DocumentOnTypeFormattingRequest))
, renameHandler :: !(Maybe (Handler J.RenameRequest))
, prepareRenameHandler :: !(Maybe (Handler J.PrepareRenameRequest))
, foldingRangeHandler :: !(Maybe (Handler J.FoldingRangeRequest))
-- new in 3.0
, documentLinkHandler :: !(Maybe (Handler J.DocumentLinkRequest))
Expand Down Expand Up @@ -293,7 +294,7 @@ instance Default Handlers where
Nothing Nothing Nothing Nothing Nothing Nothing
Nothing Nothing Nothing Nothing Nothing Nothing
Nothing Nothing Nothing Nothing Nothing Nothing
Nothing Nothing Nothing Nothing
Nothing Nothing Nothing Nothing Nothing

-- ---------------------------------------------------------------------
nop :: a -> b -> IO a
Expand Down Expand Up @@ -367,6 +368,7 @@ handlerMap _ h J.TextDocumentColorPresentation = hh nop ReqColorPresentation $
handlerMap _ h J.TextDocumentDocumentLink = hh nop ReqDocumentLink $ documentLinkHandler h
handlerMap _ h J.DocumentLinkResolve = hh nop ReqDocumentLinkResolve $ documentLinkResolveHandler h
handlerMap _ h J.TextDocumentRename = hh nop ReqRename $ renameHandler h
handlerMap _ h J.TextDocumentPrepareRename = hh nop ReqPrepareRename $ prepareRenameHandler h
handlerMap _ h J.TextDocumentFoldingRange = hh nop ReqFoldingRange $ foldingRangeHandler h
handlerMap _ _ J.WindowProgressCancel = helper progressCancelHandler
handlerMap _ h (J.CustomClientMethod _) = \ctxData val ->
Expand Down
1 change: 1 addition & 0 deletions src/Language/Haskell/LSP/Messages.hs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ data FromClientMessage = ReqInitialize InitializeRequest
| ReqDocumentRangeFormatting DocumentRangeFormattingRequest
| ReqDocumentOnTypeFormatting DocumentOnTypeFormattingRequest
| ReqRename RenameRequest
| ReqPrepareRename PrepareRenameRequest
| ReqFoldingRange FoldingRangeRequest
| ReqExecuteCommand ExecuteCommandRequest
| ReqWillSaveWaitUntil WillSaveWaitUntilTextDocumentRequest
Expand Down