{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE TemplateHaskell #-}
module Language.LSP.Types.ClientCapabilities where
import Data.Aeson.TH
import qualified Data.Aeson as A
import Data.Default
import Language.LSP.Types.CodeAction
import Language.LSP.Types.CodeLens
import Language.LSP.Types.Command
import Language.LSP.Types.Completion
import Language.LSP.Types.Configuration
import Language.LSP.Types.Diagnostic
import Language.LSP.Types.Declaration
import Language.LSP.Types.Definition
import Language.LSP.Types.DocumentColor
import Language.LSP.Types.DocumentHighlight
import Language.LSP.Types.DocumentLink
import Language.LSP.Types.DocumentSymbol
import Language.LSP.Types.FoldingRange
import Language.LSP.Types.Formatting
import Language.LSP.Types.Hover
import Language.LSP.Types.Implementation
import Language.LSP.Types.References
import Language.LSP.Types.Rename
import Language.LSP.Types.SelectionRange
import Language.LSP.Types.SignatureHelp
import Language.LSP.Types.TextDocument
import Language.LSP.Types.TypeDefinition
import Language.LSP.Types.Utils
import Language.LSP.Types.WatchedFiles
import Language.LSP.Types.WorkspaceEdit
import Language.LSP.Types.WorkspaceSymbol
data WorkspaceClientCapabilities =
WorkspaceClientCapabilities
{
_applyEdit :: Maybe Bool
, _workspaceEdit :: Maybe WorkspaceEditClientCapabilities
, _didChangeConfiguration :: Maybe DidChangeConfigurationClientCapabilities
, _didChangeWatchedFiles :: Maybe DidChangeWatchedFilesClientCapabilities
, _symbol :: Maybe WorkspaceSymbolClientCapabilities
, _executeCommand :: Maybe ExecuteCommandClientCapabilities
, _workspaceFolders :: Maybe Bool
, _configuration :: Maybe Bool
} deriving (Show, Read, Eq)
deriveJSON lspOptions ''WorkspaceClientCapabilities
instance Default WorkspaceClientCapabilities where
def = WorkspaceClientCapabilities def def def def def def def def
data TextDocumentClientCapabilities =
TextDocumentClientCapabilities
{ _synchronization :: Maybe TextDocumentSyncClientCapabilities
, _completion :: Maybe CompletionClientCapabilities
, _hover :: Maybe HoverClientCapabilities
, _signatureHelp :: Maybe SignatureHelpClientCapabilities
, _references :: Maybe ReferencesClientCapabilities
, _documentHighlight :: Maybe DocumentHighlightClientCapabilities
, _documentSymbol :: Maybe DocumentSymbolClientCapabilities
, _formatting :: Maybe DocumentFormattingClientCapabilities
, _rangeFormatting :: Maybe DocumentRangeFormattingClientCapabilities
, _onTypeFormatting :: Maybe DocumentOnTypeFormattingClientCapabilities
, _declaration :: Maybe DeclarationClientCapabilities
, _definition :: Maybe DefinitionClientCapabilities
, _typeDefinition :: Maybe TypeDefinitionClientCapabilities
, _implementation :: Maybe ImplementationClientCapabilities
, _codeAction :: Maybe CodeActionClientCapabilities
, _codeLens :: Maybe CodeLensClientCapabilities
, _documentLink :: Maybe DocumentLinkClientCapabilities
, _colorProvider :: Maybe DocumentColorClientCapabilities
, _rename :: Maybe RenameClientCapabilities
, _publishDiagnostics :: Maybe PublishDiagnosticsClientCapabilities
, _foldingRange :: Maybe FoldingRangeClientCapabilities
, _selectionRange :: Maybe SelectionRangeClientCapabilities
} deriving (Show, Read, Eq)
deriveJSON lspOptions ''TextDocumentClientCapabilities
instance Default TextDocumentClientCapabilities where
def = TextDocumentClientCapabilities def def def def def def def def
def def def def def def def def
def def def def def def
data WindowClientCapabilities =
WindowClientCapabilities
{
_workDoneProgress :: Maybe Bool
} deriving (Show, Read, Eq)
deriveJSON lspOptions ''WindowClientCapabilities
instance Default WindowClientCapabilities where
def = WindowClientCapabilities def
data ClientCapabilities =
ClientCapabilities
{ _workspace :: Maybe WorkspaceClientCapabilities
, _textDocument :: Maybe TextDocumentClientCapabilities
, _window :: Maybe WindowClientCapabilities
, _experimental :: Maybe A.Object
} deriving (Show, Read, Eq)
deriveJSON lspOptions ''ClientCapabilities
instance Default ClientCapabilities where
def = ClientCapabilities def def def def