{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE DuplicateRecordFields #-}
module Language.LSP.Types.ServerCapabilities where
import Data.Aeson
import Data.Aeson.TH
import Data.Text (Text)
import Language.LSP.Types.CodeAction
import Language.LSP.Types.CodeLens
import Language.LSP.Types.Command
import Language.LSP.Types.Common
import Language.LSP.Types.Completion
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
data WorkspaceFoldersServerCapabilities =
WorkspaceFoldersServerCapabilities
{
_supported :: Maybe Bool
, _changeNotifications :: Maybe (Text |? Bool)
}
deriving (Show, Read, Eq)
deriveJSON lspOptions ''WorkspaceFoldersServerCapabilities
data WorkspaceServerCapabilities =
WorkspaceServerCapabilities
{
_workspaceFolders :: Maybe WorkspaceFoldersServerCapabilities
}
deriving (Show, Read, Eq)
deriveJSON lspOptions ''WorkspaceServerCapabilities
data ServerCapabilities =
ServerCapabilities
{
_textDocumentSync :: Maybe (TextDocumentSyncOptions |? TextDocumentSyncKind)
, _hoverProvider :: Maybe (Bool |? HoverOptions)
, _completionProvider :: Maybe CompletionOptions
, _signatureHelpProvider :: Maybe SignatureHelpOptions
, _declarationProvider :: Maybe (Bool |? DeclarationOptions |? DeclarationRegistrationOptions)
, _definitionProvider :: Maybe (Bool |? DefinitionOptions)
, _typeDefinitionProvider :: Maybe (Bool |? TypeDefinitionOptions |? TypeDefinitionRegistrationOptions)
, _implementationProvider :: Maybe (Bool |? ImplementationOptions |? ImplementationRegistrationOptions)
, _referencesProvider :: Maybe (Bool |? ReferenceOptions)
, _documentHighlightProvider :: Maybe (Bool |? DocumentHighlightOptions)
, _documentSymbolProvider :: Maybe (Bool |? DocumentSymbolOptions)
, _codeActionProvider :: Maybe (Bool |? CodeActionOptions)
, _codeLensProvider :: Maybe CodeLensOptions
, _documentLinkProvider :: Maybe DocumentLinkOptions
, _colorProvider :: Maybe (Bool |? DocumentColorOptions |? DocumentColorRegistrationOptions)
, _documentFormattingProvider :: Maybe (Bool |? DocumentFormattingOptions)
, _documentRangeFormattingProvider :: Maybe (Bool |? DocumentRangeFormattingOptions)
, _documentOnTypeFormattingProvider :: Maybe DocumentOnTypeFormattingOptions
, _renameProvider :: Maybe (Bool |? RenameOptions)
, _foldingRangeProvider :: Maybe (Bool |? FoldingRangeOptions |? FoldingRangeRegistrationOptions)
, _executeCommandProvider :: Maybe ExecuteCommandOptions
, _selectionRangeProvider :: Maybe (Bool |? SelectionRangeOptions |? SelectionRangeRegistrationOptions)
, _workspaceSymbolProvider :: Maybe Bool
, _workspace :: Maybe WorkspaceServerCapabilities
, _experimental :: Maybe Value
} deriving (Show, Read, Eq)
deriveJSON lspOptions ''ServerCapabilities