{-# LANGUAGE GADTs               #-}
{-# LANGUAGE MultiWayIf          #-}
{-# LANGUAGE BinaryLiterals      #-}
{-# LANGUAGE OverloadedStrings   #-}
{-# LANGUAGE RankNTypes          #-}
{-# LANGUAGE ScopedTypeVariables #-}

module Language.Haskell.LSP.Types.MessageFuncs (
  -- * General
    fmClientInitializeRequest
  , fmClientInitializedNotification
  , fmClientShutdownRequest
  , fmClientExitNotification
  , fmClientCancelNotification

  -- * Window
  , fmServerShowMessageNotification
  , fmServerShowMessageRequest
  , fmServerLogMessageNotification
  , fmServerWorkDoneProgressBeginNotification
  , fmServerWorkDoneProgressReportNotification
  , fmServerWorkDoneProgressEndNotification
  , fmServerWorkDoneProgressCreateRequest
  , fmServerTelemetryNotification

  -- * Client
  , fmServerRegisterCapabilityRequest
  , fmServerUnregisterCapabilityRequest

  -- * Workspace
  , fmClientDidChangeConfigurationNotification
  , fmClientDidChangeWatchedFilesNotification
  , fmClientWorkspaceSymbolRequest
  , fmClientExecuteCommandRequest
  , fmServerApplyWorkspaceEditRequest

  -- * Document
  , fmServerPublishDiagnosticsNotification
  , fmClientDidOpenTextDocumentNotification
  , fmClientDidChangeTextDocumentNotification
  , fmClientWillSaveTextDocumentNotification
  , fmClientWillSaveWaitUntilRequest
  , fmClientDidSaveTextDocumentNotification
  , fmClientDidCloseTextDocumentNotification
  , fmClientCompletionRequest
  , fmClientCompletionItemResolveRequest
  , fmClientHoverRequest
  , fmClientSignatureHelpRequest
  , fmClientReferencesRequest
  , fmClientDocumentHighlightRequest
  , fmClientDocumentSymbolRequest
  , fmClientDocumentFormattingRequest
  , fmClientDocumentRangeFormattingRequest
  , fmClientDocumentOnTypeFormattingRequest
  , fmClientDefinitionRequest
  , fmClientCodeActionRequest
  , fmClientCodeLensRequest
  , fmClientCodeLensResolveRequest
  , fmClientDocumentLinkRequest
  , fmClientDocumentLinkResolveRequest
  , fmClientRenameRequest
  , fmClientPrepareRenameRequest
  ) where

import qualified Data.Aeson as J
import           Data.Text ( Text )
import qualified Language.Haskell.LSP.Types      as J

-- ---------------------------------------------------------------------
{-# ANN module ("HLint: ignore Eta reduce"         :: String) #-}
{-# ANN module ("HLint: ignore Redundant do"       :: String) #-}
{-# ANN module ("HLint: ignore Reduce duplication" :: String) #-}
-- ---------------------------------------------------------------------

-- ----------------------------------------------------------------------
-- General
-- ----------------------------------------------------------------------

-- * :leftwards_arrow_with_hook: [initialize](#initialize)

fmClientInitializeRequest :: J.LspId -> J.InitializeParams -> J.InitializeRequest
fmClientInitializeRequest :: LspId -> InitializeParams -> InitializeRequest
fmClientInitializeRequest LspId
rid InitializeParams
params
  = Text
-> LspId -> ClientMethod -> InitializeParams -> InitializeRequest
forall m req resp.
Text -> LspId -> m -> req -> RequestMessage m req resp
J.RequestMessage  Text
"2.0" LspId
rid ClientMethod
J.Initialize InitializeParams
params

-- ----------------------------------------------------------------------
-- * **New** :arrow_right: [initialized](#initialized)

-- | From 3.0
fmClientInitializedNotification :: J.InitializedNotification
fmClientInitializedNotification :: InitializedNotification
fmClientInitializedNotification = Text
-> ClientMethod
-> Maybe InitializedParams
-> InitializedNotification
forall m a. Text -> m -> a -> NotificationMessage m a
J.NotificationMessage Text
"2.0" ClientMethod
J.Initialized Maybe InitializedParams
forall a. Maybe a
Nothing

-- ----------------------------------------------------------------------
-- * :leftwards_arrow_with_hook: [shutdown](#shutdown)

fmClientShutdownRequest :: J.LspId -> Maybe J.Value -> J.ShutdownRequest
fmClientShutdownRequest :: LspId -> Maybe Value -> ShutdownRequest
fmClientShutdownRequest LspId
rid Maybe Value
params
  = Text -> LspId -> ClientMethod -> Maybe Value -> ShutdownRequest
forall m req resp.
Text -> LspId -> m -> req -> RequestMessage m req resp
J.RequestMessage  Text
"2.0" LspId
rid ClientMethod
J.Shutdown Maybe Value
params

-- ----------------------------------------------------------------------
-- * :arrow_right: [exit](#exit)

fmClientExitNotification :: J.ExitNotification
fmClientExitNotification :: ExitNotification
fmClientExitNotification = Text -> ClientMethod -> Maybe ExitParams -> ExitNotification
forall m a. Text -> m -> a -> NotificationMessage m a
J.NotificationMessage Text
"2.0" ClientMethod
J.Exit Maybe ExitParams
forall a. Maybe a
Nothing

-- ----------------------------------------------------------------------
-- * :arrow_right: [$/cancelRequest](#cancelRequest)

fmClientCancelNotification :: J.LspId -> J.CancelNotification
fmClientCancelNotification :: LspId -> CancelNotification
fmClientCancelNotification LspId
idToCancel
  = Text -> ClientMethod -> CancelParams -> CancelNotification
forall m a. Text -> m -> a -> NotificationMessage m a
J.NotificationMessage Text
"2.0" ClientMethod
J.CancelRequest  (LspId -> CancelParams
J.CancelParams LspId
idToCancel)

-- ----------------------------------------------------------------------
-- Window
-- ----------------------------------------------------------------------

-- * :arrow_left: [window/showMessage](#window_showMessage)

fmServerShowMessageNotification :: J.MessageType -> Text -> J.ShowMessageNotification
fmServerShowMessageNotification :: MessageType -> Text -> ShowMessageNotification
fmServerShowMessageNotification MessageType
mt Text
msg
  = Text
-> ServerMethod -> ShowMessageParams -> ShowMessageNotification
forall m a. Text -> m -> a -> NotificationMessage m a
J.NotificationMessage Text
"2.0" ServerMethod
J.WindowShowMessage (MessageType -> Text -> ShowMessageParams
J.ShowMessageParams MessageType
mt Text
msg)

-- ----------------------------------------------------------------------
-- * :arrow_right_hook: [window/showMessageRequest](#window_showMessageRequest)

fmServerShowMessageRequest :: J.LspId -> J.ShowMessageRequestParams -> J.ShowMessageRequest
fmServerShowMessageRequest :: LspId -> ShowMessageRequestParams -> ShowMessageRequest
fmServerShowMessageRequest LspId
rid ShowMessageRequestParams
params
  = Text
-> LspId
-> ServerMethod
-> ShowMessageRequestParams
-> ShowMessageRequest
forall m req resp.
Text -> LspId -> m -> req -> RequestMessage m req resp
J.RequestMessage  Text
"2.0" LspId
rid ServerMethod
J.WindowShowMessageRequest ShowMessageRequestParams
params

-- ----------------------------------------------------------------------
-- * :arrow_left: [window/logMessage](#window_logMessage)

fmServerLogMessageNotification :: J.MessageType -> Text -> J.LogMessageNotification
fmServerLogMessageNotification :: MessageType -> Text -> LogMessageNotification
fmServerLogMessageNotification MessageType
mt Text
msg
  = Text -> ServerMethod -> LogMessageParams -> LogMessageNotification
forall m a. Text -> m -> a -> NotificationMessage m a
J.NotificationMessage Text
"2.0" ServerMethod
J.WindowLogMessage (MessageType -> Text -> LogMessageParams
J.LogMessageParams MessageType
mt Text
msg)

-- ----------------------------------------------------------------------

fmServerWorkDoneProgressBeginNotification :: J.ProgressParams J.WorkDoneProgressBeginParams -> J.WorkDoneProgressBeginNotification
fmServerWorkDoneProgressBeginNotification :: ProgressParams WorkDoneProgressBeginParams
-> WorkDoneProgressBeginNotification
fmServerWorkDoneProgressBeginNotification ProgressParams WorkDoneProgressBeginParams
params
  = Text
-> ServerMethod
-> ProgressParams WorkDoneProgressBeginParams
-> WorkDoneProgressBeginNotification
forall m a. Text -> m -> a -> NotificationMessage m a
J.NotificationMessage Text
"2.0" ServerMethod
J.Progress ProgressParams WorkDoneProgressBeginParams
params

-- ----------------------------------------------------------------------

fmServerWorkDoneProgressReportNotification :: J.ProgressParams J.WorkDoneProgressReportParams -> J.WorkDoneProgressReportNotification
fmServerWorkDoneProgressReportNotification :: ProgressParams WorkDoneProgressReportParams
-> WorkDoneProgressReportNotification
fmServerWorkDoneProgressReportNotification ProgressParams WorkDoneProgressReportParams
params
  = Text
-> ServerMethod
-> ProgressParams WorkDoneProgressReportParams
-> WorkDoneProgressReportNotification
forall m a. Text -> m -> a -> NotificationMessage m a
J.NotificationMessage Text
"2.0" ServerMethod
J.Progress ProgressParams WorkDoneProgressReportParams
params

-- ----------------------------------------------------------------------

fmServerWorkDoneProgressEndNotification :: J.ProgressParams J.WorkDoneProgressEndParams -> J.WorkDoneProgressEndNotification
fmServerWorkDoneProgressEndNotification :: ProgressParams WorkDoneProgressEndParams
-> WorkDoneProgressEndNotification
fmServerWorkDoneProgressEndNotification ProgressParams WorkDoneProgressEndParams
params
  = Text
-> ServerMethod
-> ProgressParams WorkDoneProgressEndParams
-> WorkDoneProgressEndNotification
forall m a. Text -> m -> a -> NotificationMessage m a
J.NotificationMessage Text
"2.0" ServerMethod
J.Progress ProgressParams WorkDoneProgressEndParams
params

fmServerWorkDoneProgressCreateRequest :: J.LspId -> J.WorkDoneProgressCreateParams -> J.WorkDoneProgressCreateRequest
fmServerWorkDoneProgressCreateRequest :: LspId
-> WorkDoneProgressCreateParams -> WorkDoneProgressCreateRequest
fmServerWorkDoneProgressCreateRequest LspId
rid WorkDoneProgressCreateParams
params
  = Text
-> LspId
-> ServerMethod
-> WorkDoneProgressCreateParams
-> WorkDoneProgressCreateRequest
forall m req resp.
Text -> LspId -> m -> req -> RequestMessage m req resp
J.RequestMessage Text
"2.0" LspId
rid ServerMethod
J.WindowWorkDoneProgressCreate WorkDoneProgressCreateParams
params

-- ----------------------------------------------------------------------
-- * :arrow_left: [telemetry/event](#telemetry_event)

fmServerTelemetryNotification :: J.Value  -> J.TelemetryNotification
fmServerTelemetryNotification :: Value -> TelemetryNotification
fmServerTelemetryNotification Value
params
  = Text -> ServerMethod -> Value -> TelemetryNotification
forall m a. Text -> m -> a -> NotificationMessage m a
J.NotificationMessage Text
"2.0" ServerMethod
J.TelemetryEvent Value
params

-- ----------------------------------------------------------------------
--  Client
-- ----------------------------------------------------------------------

-- * :arrow_right_hook: [client/registerCapability](#client_registerCapability)
-- | from 3.0
fmServerRegisterCapabilityRequest :: J.LspId -> J.RegistrationParams -> J.RegisterCapabilityRequest
fmServerRegisterCapabilityRequest :: LspId -> RegistrationParams -> RegisterCapabilityRequest
fmServerRegisterCapabilityRequest LspId
rid RegistrationParams
params
  = Text
-> LspId
-> ServerMethod
-> RegistrationParams
-> RegisterCapabilityRequest
forall m req resp.
Text -> LspId -> m -> req -> RequestMessage m req resp
J.RequestMessage  Text
"2.0" LspId
rid ServerMethod
J.ClientRegisterCapability RegistrationParams
params

-- * :arrow_right_hook: [client/unregisterCapability](#client_unregisterCapability)
-- | from 3.0
fmServerUnregisterCapabilityRequest :: J.LspId -> J.UnregistrationParams -> J.UnregisterCapabilityRequest
fmServerUnregisterCapabilityRequest :: LspId -> UnregistrationParams -> UnregisterCapabilityRequest
fmServerUnregisterCapabilityRequest LspId
rid UnregistrationParams
params
  = Text
-> LspId
-> ServerMethod
-> UnregistrationParams
-> UnregisterCapabilityRequest
forall m req resp.
Text -> LspId -> m -> req -> RequestMessage m req resp
J.RequestMessage  Text
"2.0" LspId
rid ServerMethod
J.ClientUnregisterCapability UnregistrationParams
params

-- ----------------------------------------------------------------------
-- Workspace
-- ----------------------------------------------------------------------

-- * :arrow_right: [workspace/didChangeConfiguration](#workspace_didChangeConfiguration)
fmClientDidChangeConfigurationNotification :: J.DidChangeConfigurationParams -> J.DidChangeConfigurationNotification
fmClientDidChangeConfigurationNotification :: DidChangeConfigurationParams -> DidChangeConfigurationNotification
fmClientDidChangeConfigurationNotification DidChangeConfigurationParams
params
  = Text
-> ClientMethod
-> DidChangeConfigurationParams
-> DidChangeConfigurationNotification
forall m a. Text -> m -> a -> NotificationMessage m a
J.NotificationMessage Text
"2.0" ClientMethod
J.WorkspaceDidChangeConfiguration DidChangeConfigurationParams
params

-- * :arrow_right: [workspace/didChangeWatchedFiles](#workspace_didChangeWatchedFiles)
fmClientDidChangeWatchedFilesNotification :: J.DidChangeWatchedFilesParams -> J.DidChangeWatchedFilesNotification
fmClientDidChangeWatchedFilesNotification :: DidChangeWatchedFilesParams -> DidChangeWatchedFilesNotification
fmClientDidChangeWatchedFilesNotification DidChangeWatchedFilesParams
params
  = Text
-> ClientMethod
-> DidChangeWatchedFilesParams
-> DidChangeWatchedFilesNotification
forall m a. Text -> m -> a -> NotificationMessage m a
J.NotificationMessage Text
"2.0" ClientMethod
J.WorkspaceDidChangeWatchedFiles DidChangeWatchedFilesParams
params

-- * :leftwards_arrow_with_hook: [workspace/symbol](#workspace_symbol)
fmClientWorkspaceSymbolRequest :: J.LspId -> J.WorkspaceSymbolParams -> J.WorkspaceSymbolRequest
fmClientWorkspaceSymbolRequest :: LspId -> WorkspaceSymbolParams -> WorkspaceSymbolRequest
fmClientWorkspaceSymbolRequest LspId
rid WorkspaceSymbolParams
params
  = Text
-> LspId
-> ClientMethod
-> WorkspaceSymbolParams
-> WorkspaceSymbolRequest
forall m req resp.
Text -> LspId -> m -> req -> RequestMessage m req resp
J.RequestMessage  Text
"2.0" LspId
rid ClientMethod
J.WorkspaceSymbol WorkspaceSymbolParams
params

-- * **New** :leftwards_arrow_with_hook: [workspace/executeCommand](#workspace_executeCommand)
-- | From 3.0
fmClientExecuteCommandRequest :: J.LspId -> J.ExecuteCommandParams -> J.ExecuteCommandRequest
fmClientExecuteCommandRequest :: LspId -> ExecuteCommandParams -> ExecuteCommandRequest
fmClientExecuteCommandRequest LspId
rid ExecuteCommandParams
params
  = Text
-> LspId
-> ClientMethod
-> ExecuteCommandParams
-> ExecuteCommandRequest
forall m req resp.
Text -> LspId -> m -> req -> RequestMessage m req resp
J.RequestMessage  Text
"2.0" LspId
rid ClientMethod
J.WorkspaceExecuteCommand ExecuteCommandParams
params

-- * **New** :arrow_right_hook: [workspace/applyEdit](#workspace_applyEdit)
-- | From 3.0
fmServerApplyWorkspaceEditRequest :: J.LspId -> J.ApplyWorkspaceEditParams -> J.ApplyWorkspaceEditRequest
fmServerApplyWorkspaceEditRequest :: LspId -> ApplyWorkspaceEditParams -> ApplyWorkspaceEditRequest
fmServerApplyWorkspaceEditRequest LspId
rid ApplyWorkspaceEditParams
params
  = Text
-> LspId
-> ServerMethod
-> ApplyWorkspaceEditParams
-> ApplyWorkspaceEditRequest
forall m req resp.
Text -> LspId -> m -> req -> RequestMessage m req resp
J.RequestMessage  Text
"2.0" LspId
rid ServerMethod
J.WorkspaceApplyEdit ApplyWorkspaceEditParams
params

-- ----------------------------------------------------------------------
 -- Document
-- ----------------------------------------------------------------------

-- * :arrow_left: [textDocument/publishDiagnostics](#textDocument_publishDiagnostics)
fmServerPublishDiagnosticsNotification :: J.PublishDiagnosticsParams -> J.PublishDiagnosticsNotification
fmServerPublishDiagnosticsNotification :: PublishDiagnosticsParams -> PublishDiagnosticsNotification
fmServerPublishDiagnosticsNotification PublishDiagnosticsParams
params
  = Text
-> ServerMethod
-> PublishDiagnosticsParams
-> PublishDiagnosticsNotification
forall m a. Text -> m -> a -> NotificationMessage m a
J.NotificationMessage Text
"2.0" ServerMethod
J.TextDocumentPublishDiagnostics PublishDiagnosticsParams
params

-- * :arrow_right: [textDocument/didOpen](#textDocument_didOpen)
fmClientDidOpenTextDocumentNotification :: J.DidOpenTextDocumentParams -> J.DidOpenTextDocumentNotification
fmClientDidOpenTextDocumentNotification :: DidOpenTextDocumentParams -> DidOpenTextDocumentNotification
fmClientDidOpenTextDocumentNotification DidOpenTextDocumentParams
params
  = Text
-> ClientMethod
-> DidOpenTextDocumentParams
-> DidOpenTextDocumentNotification
forall m a. Text -> m -> a -> NotificationMessage m a
J.NotificationMessage Text
"2.0" ClientMethod
J.TextDocumentDidOpen DidOpenTextDocumentParams
params

-- * :arrow_right: [textDocument/didChange](#textDocument_didChange)
fmClientDidChangeTextDocumentNotification :: J.DidChangeTextDocumentParams -> J.DidChangeTextDocumentNotification
fmClientDidChangeTextDocumentNotification :: DidChangeTextDocumentParams -> DidChangeTextDocumentNotification
fmClientDidChangeTextDocumentNotification DidChangeTextDocumentParams
params
  = Text
-> ClientMethod
-> DidChangeTextDocumentParams
-> DidChangeTextDocumentNotification
forall m a. Text -> m -> a -> NotificationMessage m a
J.NotificationMessage Text
"2.0" ClientMethod
J.TextDocumentDidChange DidChangeTextDocumentParams
params

-- * :arrow_right: [textDocument/willSave](#textDocument_willSave)
fmClientWillSaveTextDocumentNotification :: J.WillSaveTextDocumentParams -> J.WillSaveTextDocumentNotification
fmClientWillSaveTextDocumentNotification :: WillSaveTextDocumentParams -> WillSaveTextDocumentNotification
fmClientWillSaveTextDocumentNotification WillSaveTextDocumentParams
params
  = Text
-> ClientMethod
-> WillSaveTextDocumentParams
-> WillSaveTextDocumentNotification
forall m a. Text -> m -> a -> NotificationMessage m a
J.NotificationMessage Text
"2.0" ClientMethod
J.TextDocumentWillSave WillSaveTextDocumentParams
params

-- * **New** :leftwards_arrow_with_hook: [textDocument/willSaveWaitUntil](#textDocument_willSaveWaitUntil)
-- | From 3.0
fmClientWillSaveWaitUntilRequest :: J.LspId -> J.WillSaveTextDocumentParams -> J.WillSaveWaitUntilTextDocumentRequest
fmClientWillSaveWaitUntilRequest :: LspId
-> WillSaveTextDocumentParams
-> WillSaveWaitUntilTextDocumentRequest
fmClientWillSaveWaitUntilRequest LspId
rid WillSaveTextDocumentParams
params
  = Text
-> LspId
-> ClientMethod
-> WillSaveTextDocumentParams
-> WillSaveWaitUntilTextDocumentRequest
forall m req resp.
Text -> LspId -> m -> req -> RequestMessage m req resp
J.RequestMessage Text
"2.0" LspId
rid ClientMethod
J.TextDocumentWillSaveWaitUntil WillSaveTextDocumentParams
params

-- * **New** :arrow_right: [textDocument/didSave](#textDocument_didSave)
-- | 3.0
fmClientDidSaveTextDocumentNotification :: J.DidSaveTextDocumentParams -> J.DidSaveTextDocumentNotification
fmClientDidSaveTextDocumentNotification :: DidSaveTextDocumentParams -> DidSaveTextDocumentNotification
fmClientDidSaveTextDocumentNotification DidSaveTextDocumentParams
params
  = Text
-> ClientMethod
-> DidSaveTextDocumentParams
-> DidSaveTextDocumentNotification
forall m a. Text -> m -> a -> NotificationMessage m a
J.NotificationMessage Text
"2.0" ClientMethod
J.TextDocumentDidSave DidSaveTextDocumentParams
params

-- * :arrow_right: [textDocument/didClose](#textDocument_didClose)
fmClientDidCloseTextDocumentNotification :: J.DidCloseTextDocumentParams -> J.DidCloseTextDocumentNotification
fmClientDidCloseTextDocumentNotification :: DidCloseTextDocumentParams -> DidCloseTextDocumentNotification
fmClientDidCloseTextDocumentNotification DidCloseTextDocumentParams
params
  = Text
-> ClientMethod
-> DidCloseTextDocumentParams
-> DidCloseTextDocumentNotification
forall m a. Text -> m -> a -> NotificationMessage m a
J.NotificationMessage Text
"2.0" ClientMethod
J.TextDocumentDidClose DidCloseTextDocumentParams
params

-- * :leftwards_arrow_with_hook: [textDocument/completion](#textDocument_completion)
fmClientCompletionRequest :: J.LspId -> J.CompletionParams -> J.CompletionRequest
fmClientCompletionRequest :: LspId -> CompletionParams -> CompletionRequest
fmClientCompletionRequest LspId
rid CompletionParams
params
  = Text
-> LspId -> ClientMethod -> CompletionParams -> CompletionRequest
forall m req resp.
Text -> LspId -> m -> req -> RequestMessage m req resp
J.RequestMessage Text
"2.0" LspId
rid ClientMethod
J.TextDocumentCompletion CompletionParams
params

-- * :leftwards_arrow_with_hook: [completionItem/resolve](#completionItem_resolve)
fmClientCompletionItemResolveRequest :: J.LspId -> J.CompletionItem -> J.CompletionItemResolveRequest
fmClientCompletionItemResolveRequest :: LspId -> CompletionItem -> CompletionItemResolveRequest
fmClientCompletionItemResolveRequest LspId
rid CompletionItem
params
  = Text
-> LspId
-> ClientMethod
-> CompletionItem
-> CompletionItemResolveRequest
forall m req resp.
Text -> LspId -> m -> req -> RequestMessage m req resp
J.RequestMessage Text
"2.0" LspId
rid ClientMethod
J.CompletionItemResolve CompletionItem
params

-- * :leftwards_arrow_with_hook: [textDocument/hover](#textDocument_hover)
fmClientHoverRequest :: J.LspId -> J.TextDocumentPositionParams -> J.HoverRequest
fmClientHoverRequest :: LspId -> TextDocumentPositionParams -> HoverRequest
fmClientHoverRequest LspId
rid TextDocumentPositionParams
params
  = Text
-> LspId
-> ClientMethod
-> TextDocumentPositionParams
-> HoverRequest
forall m req resp.
Text -> LspId -> m -> req -> RequestMessage m req resp
J.RequestMessage Text
"2.0" LspId
rid ClientMethod
J.TextDocumentHover TextDocumentPositionParams
params

-- * :leftwards_arrow_with_hook: [textDocument/signatureHelp](#textDocument_signatureHelp)
fmClientSignatureHelpRequest :: J.LspId -> J.TextDocumentPositionParams -> J.SignatureHelpRequest
fmClientSignatureHelpRequest :: LspId -> TextDocumentPositionParams -> SignatureHelpRequest
fmClientSignatureHelpRequest LspId
rid TextDocumentPositionParams
params
  = Text
-> LspId
-> ClientMethod
-> TextDocumentPositionParams
-> SignatureHelpRequest
forall m req resp.
Text -> LspId -> m -> req -> RequestMessage m req resp
J.RequestMessage Text
"2.0" LspId
rid ClientMethod
J.TextDocumentSignatureHelp TextDocumentPositionParams
params

-- * :leftwards_arrow_with_hook: [textDocument/references](#textDocument_references)
fmClientReferencesRequest :: J.LspId -> J.ReferenceParams -> J.ReferencesRequest
fmClientReferencesRequest :: LspId -> ReferenceParams -> ReferencesRequest
fmClientReferencesRequest LspId
rid ReferenceParams
params
  = Text
-> LspId -> ClientMethod -> ReferenceParams -> ReferencesRequest
forall m req resp.
Text -> LspId -> m -> req -> RequestMessage m req resp
J.RequestMessage Text
"2.0" LspId
rid ClientMethod
J.TextDocumentReferences ReferenceParams
params

-- * :leftwards_arrow_with_hook: [textDocument/documentHighlight](#textDocument_documentHighlight)
fmClientDocumentHighlightRequest :: J.LspId -> J.TextDocumentPositionParams -> J.DocumentHighlightRequest
fmClientDocumentHighlightRequest :: LspId -> TextDocumentPositionParams -> DocumentHighlightRequest
fmClientDocumentHighlightRequest LspId
rid TextDocumentPositionParams
params
  = Text
-> LspId
-> ClientMethod
-> TextDocumentPositionParams
-> DocumentHighlightRequest
forall m req resp.
Text -> LspId -> m -> req -> RequestMessage m req resp
J.RequestMessage Text
"2.0" LspId
rid ClientMethod
J.TextDocumentDocumentHighlight TextDocumentPositionParams
params

-- * :leftwards_arrow_with_hook: [textDocument/documentSymbol](#textDocument_documentSymbol)
fmClientDocumentSymbolRequest :: J.LspId -> J.DocumentSymbolParams -> J.DocumentSymbolRequest
fmClientDocumentSymbolRequest :: LspId -> DocumentSymbolParams -> DocumentSymbolRequest
fmClientDocumentSymbolRequest LspId
rid DocumentSymbolParams
params
  = Text
-> LspId
-> ClientMethod
-> DocumentSymbolParams
-> DocumentSymbolRequest
forall m req resp.
Text -> LspId -> m -> req -> RequestMessage m req resp
J.RequestMessage Text
"2.0" LspId
rid ClientMethod
J.TextDocumentDocumentSymbol DocumentSymbolParams
params

-- * :leftwards_arrow_with_hook: [textDocument/formatting](#textDocument_formatting)
fmClientDocumentFormattingRequest :: J.LspId -> J.DocumentFormattingParams -> J.DocumentFormattingRequest
fmClientDocumentFormattingRequest :: LspId -> DocumentFormattingParams -> DocumentFormattingRequest
fmClientDocumentFormattingRequest LspId
rid DocumentFormattingParams
params
  = Text
-> LspId
-> ClientMethod
-> DocumentFormattingParams
-> DocumentFormattingRequest
forall m req resp.
Text -> LspId -> m -> req -> RequestMessage m req resp
J.RequestMessage Text
"2.0" LspId
rid ClientMethod
J.TextDocumentFormatting DocumentFormattingParams
params

-- * :leftwards_arrow_with_hook: [textDocument/rangeFormatting](#textDocument_rangeFormatting)
fmClientDocumentRangeFormattingRequest :: J.LspId -> J.DocumentRangeFormattingParams -> J.DocumentRangeFormattingRequest
fmClientDocumentRangeFormattingRequest :: LspId
-> DocumentRangeFormattingParams -> DocumentRangeFormattingRequest
fmClientDocumentRangeFormattingRequest LspId
rid DocumentRangeFormattingParams
params
  = Text
-> LspId
-> ClientMethod
-> DocumentRangeFormattingParams
-> DocumentRangeFormattingRequest
forall m req resp.
Text -> LspId -> m -> req -> RequestMessage m req resp
J.RequestMessage Text
"2.0" LspId
rid ClientMethod
J.TextDocumentRangeFormatting DocumentRangeFormattingParams
params

-- * :leftwards_arrow_with_hook: [textDocument/onTypeFormatting](#textDocument_onTypeFormatting)
fmClientDocumentOnTypeFormattingRequest :: J.LspId -> J.DocumentOnTypeFormattingParams -> J.DocumentOnTypeFormattingRequest
fmClientDocumentOnTypeFormattingRequest :: LspId
-> DocumentOnTypeFormattingParams
-> DocumentOnTypeFormattingRequest
fmClientDocumentOnTypeFormattingRequest LspId
rid DocumentOnTypeFormattingParams
params
  = Text
-> LspId
-> ClientMethod
-> DocumentOnTypeFormattingParams
-> DocumentOnTypeFormattingRequest
forall m req resp.
Text -> LspId -> m -> req -> RequestMessage m req resp
J.RequestMessage Text
"2.0" LspId
rid ClientMethod
J.TextDocumentOnTypeFormatting DocumentOnTypeFormattingParams
params

-- * :leftwards_arrow_with_hook: [textDocument/definition](#textDocument_definition)
fmClientDefinitionRequest :: J.LspId -> J.TextDocumentPositionParams -> J.DefinitionRequest
fmClientDefinitionRequest :: LspId -> TextDocumentPositionParams -> DefinitionRequest
fmClientDefinitionRequest LspId
rid TextDocumentPositionParams
params
  = Text
-> LspId
-> ClientMethod
-> TextDocumentPositionParams
-> DefinitionRequest
forall m req resp.
Text -> LspId -> m -> req -> RequestMessage m req resp
J.RequestMessage Text
"2.0" LspId
rid ClientMethod
J.TextDocumentDefinition TextDocumentPositionParams
params

-- * :leftwards_arrow_with_hook: [textDocument/codeAction](#textDocument_codeAction)
fmClientCodeActionRequest :: J.LspId -> J.CodeActionParams -> J.CodeActionRequest
fmClientCodeActionRequest :: LspId -> CodeActionParams -> CodeActionRequest
fmClientCodeActionRequest LspId
rid CodeActionParams
params
  = Text
-> LspId -> ClientMethod -> CodeActionParams -> CodeActionRequest
forall m req resp.
Text -> LspId -> m -> req -> RequestMessage m req resp
J.RequestMessage Text
"2.0" LspId
rid ClientMethod
J.TextDocumentCodeAction CodeActionParams
params

-- * :leftwards_arrow_with_hook: [textDocument/codeLens](#textDocument_codeLens)
fmClientCodeLensRequest :: J.LspId -> J.CodeLensParams -> J.CodeLensRequest
fmClientCodeLensRequest :: LspId -> CodeLensParams -> CodeLensRequest
fmClientCodeLensRequest LspId
rid CodeLensParams
params
  = Text -> LspId -> ClientMethod -> CodeLensParams -> CodeLensRequest
forall m req resp.
Text -> LspId -> m -> req -> RequestMessage m req resp
J.RequestMessage Text
"2.0" LspId
rid ClientMethod
J.TextDocumentCodeLens CodeLensParams
params

-- * :leftwards_arrow_with_hook: [codeLens/resolve](#codeLens_resolve)
fmClientCodeLensResolveRequest :: J.LspId -> J.CodeLens -> J.CodeLensResolveRequest
fmClientCodeLensResolveRequest :: LspId -> CodeLens -> CodeLensResolveRequest
fmClientCodeLensResolveRequest LspId
rid CodeLens
params
  = Text -> LspId -> ClientMethod -> CodeLens -> CodeLensResolveRequest
forall m req resp.
Text -> LspId -> m -> req -> RequestMessage m req resp
J.RequestMessage Text
"2.0" LspId
rid ClientMethod
J.CodeLensResolve CodeLens
params

-- * :leftwards_arrow_with_hook: [textDocument/documentLink](#textDocument_documentLink)
fmClientDocumentLinkRequest :: J.LspId -> J.DocumentLinkParams -> J.DocumentLinkRequest
fmClientDocumentLinkRequest :: LspId -> DocumentLinkParams -> DocumentLinkRequest
fmClientDocumentLinkRequest LspId
rid DocumentLinkParams
params
  = Text
-> LspId
-> ClientMethod
-> DocumentLinkParams
-> DocumentLinkRequest
forall m req resp.
Text -> LspId -> m -> req -> RequestMessage m req resp
J.RequestMessage Text
"2.0" LspId
rid ClientMethod
J.TextDocumentDocumentLink DocumentLinkParams
params

-- * :leftwards_arrow_with_hook: [documentLink/resolve](#documentLink_resolve)
fmClientDocumentLinkResolveRequest :: J.LspId -> J.DocumentLink -> J.DocumentLinkResolveRequest
fmClientDocumentLinkResolveRequest :: LspId -> DocumentLink -> DocumentLinkResolveRequest
fmClientDocumentLinkResolveRequest LspId
rid DocumentLink
params
  = Text
-> LspId
-> ClientMethod
-> DocumentLink
-> DocumentLinkResolveRequest
forall m req resp.
Text -> LspId -> m -> req -> RequestMessage m req resp
J.RequestMessage Text
"2.0" LspId
rid ClientMethod
J.DocumentLinkResolve DocumentLink
params

-- * :leftwards_arrow_with_hook: [textDocument/rename](#textDocument_rename)
fmClientRenameRequest :: J.LspId -> J.RenameParams -> J.RenameRequest
fmClientRenameRequest :: LspId -> RenameParams -> RenameRequest
fmClientRenameRequest LspId
rid RenameParams
params
  = Text -> LspId -> ClientMethod -> RenameParams -> RenameRequest
forall m req resp.
Text -> LspId -> m -> req -> RequestMessage m req resp
J.RequestMessage Text
"2.0" LspId
rid ClientMethod
J.TextDocumentRename RenameParams
params

-- * :leftwards_arrow_with_hook: [textDocument/prepareRename](#textDocument_prepareRename)
fmClientPrepareRenameRequest :: J.LspId -> J.TextDocumentPositionParams -> J.PrepareRenameRequest
fmClientPrepareRenameRequest :: LspId -> TextDocumentPositionParams -> PrepareRenameRequest
fmClientPrepareRenameRequest LspId
rid TextDocumentPositionParams
params
  = Text
-> LspId
-> ClientMethod
-> TextDocumentPositionParams
-> PrepareRenameRequest
forall m req resp.
Text -> LspId -> m -> req -> RequestMessage m req resp
J.RequestMessage Text
"2.0" LspId
rid ClientMethod
J.TextDocumentPrepareRename TextDocumentPositionParams
params