{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
module Language.LSP.Types.Completion where
import qualified Data.Aeson as A
import Data.Aeson.TH
import Data.Scientific ( Scientific )
import Data.Text ( Text )
import Language.LSP.Types.Command
import Language.LSP.Types.Common
import Language.LSP.Types.MarkupContent
import Language.LSP.Types.Progress
import Language.LSP.Types.TextDocument
import Language.LSP.Types.Utils
import Language.LSP.Types.WorkspaceEdit
import Language.LSP.Types.Location (Range)
data CompletionItemKind = CiText
| CiMethod
| CiFunction
| CiConstructor
| CiField
| CiVariable
| CiClass
| CiInterface
| CiModule
| CiProperty
| CiUnit
| CiValue
| CiEnum
| CiKeyword
| CiSnippet
| CiColor
| CiFile
| CiReference
| CiFolder
| CiEnumMember
| CiConstant
| CiStruct
| CiEvent
| CiOperator
| CiTypeParameter
deriving (ReadPrec [CompletionItemKind]
ReadPrec CompletionItemKind
Int -> ReadS CompletionItemKind
ReadS [CompletionItemKind]
(Int -> ReadS CompletionItemKind)
-> ReadS [CompletionItemKind]
-> ReadPrec CompletionItemKind
-> ReadPrec [CompletionItemKind]
-> Read CompletionItemKind
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS CompletionItemKind
readsPrec :: Int -> ReadS CompletionItemKind
$creadList :: ReadS [CompletionItemKind]
readList :: ReadS [CompletionItemKind]
$creadPrec :: ReadPrec CompletionItemKind
readPrec :: ReadPrec CompletionItemKind
$creadListPrec :: ReadPrec [CompletionItemKind]
readListPrec :: ReadPrec [CompletionItemKind]
Read,Int -> CompletionItemKind -> ShowS
[CompletionItemKind] -> ShowS
CompletionItemKind -> String
(Int -> CompletionItemKind -> ShowS)
-> (CompletionItemKind -> String)
-> ([CompletionItemKind] -> ShowS)
-> Show CompletionItemKind
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CompletionItemKind -> ShowS
showsPrec :: Int -> CompletionItemKind -> ShowS
$cshow :: CompletionItemKind -> String
show :: CompletionItemKind -> String
$cshowList :: [CompletionItemKind] -> ShowS
showList :: [CompletionItemKind] -> ShowS
Show,CompletionItemKind -> CompletionItemKind -> Bool
(CompletionItemKind -> CompletionItemKind -> Bool)
-> (CompletionItemKind -> CompletionItemKind -> Bool)
-> Eq CompletionItemKind
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CompletionItemKind -> CompletionItemKind -> Bool
== :: CompletionItemKind -> CompletionItemKind -> Bool
$c/= :: CompletionItemKind -> CompletionItemKind -> Bool
/= :: CompletionItemKind -> CompletionItemKind -> Bool
Eq,Eq CompletionItemKind
Eq CompletionItemKind =>
(CompletionItemKind -> CompletionItemKind -> Ordering)
-> (CompletionItemKind -> CompletionItemKind -> Bool)
-> (CompletionItemKind -> CompletionItemKind -> Bool)
-> (CompletionItemKind -> CompletionItemKind -> Bool)
-> (CompletionItemKind -> CompletionItemKind -> Bool)
-> (CompletionItemKind -> CompletionItemKind -> CompletionItemKind)
-> (CompletionItemKind -> CompletionItemKind -> CompletionItemKind)
-> Ord CompletionItemKind
CompletionItemKind -> CompletionItemKind -> Bool
CompletionItemKind -> CompletionItemKind -> Ordering
CompletionItemKind -> CompletionItemKind -> CompletionItemKind
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: CompletionItemKind -> CompletionItemKind -> Ordering
compare :: CompletionItemKind -> CompletionItemKind -> Ordering
$c< :: CompletionItemKind -> CompletionItemKind -> Bool
< :: CompletionItemKind -> CompletionItemKind -> Bool
$c<= :: CompletionItemKind -> CompletionItemKind -> Bool
<= :: CompletionItemKind -> CompletionItemKind -> Bool
$c> :: CompletionItemKind -> CompletionItemKind -> Bool
> :: CompletionItemKind -> CompletionItemKind -> Bool
$c>= :: CompletionItemKind -> CompletionItemKind -> Bool
>= :: CompletionItemKind -> CompletionItemKind -> Bool
$cmax :: CompletionItemKind -> CompletionItemKind -> CompletionItemKind
max :: CompletionItemKind -> CompletionItemKind -> CompletionItemKind
$cmin :: CompletionItemKind -> CompletionItemKind -> CompletionItemKind
min :: CompletionItemKind -> CompletionItemKind -> CompletionItemKind
Ord)
instance A.ToJSON CompletionItemKind where
toJSON :: CompletionItemKind -> Value
toJSON CompletionItemKind
CiText = Scientific -> Value
A.Number Scientific
1
toJSON CompletionItemKind
CiMethod = Scientific -> Value
A.Number Scientific
2
toJSON CompletionItemKind
CiFunction = Scientific -> Value
A.Number Scientific
3
toJSON CompletionItemKind
CiConstructor = Scientific -> Value
A.Number Scientific
4
toJSON CompletionItemKind
CiField = Scientific -> Value
A.Number Scientific
5
toJSON CompletionItemKind
CiVariable = Scientific -> Value
A.Number Scientific
6
toJSON CompletionItemKind
CiClass = Scientific -> Value
A.Number Scientific
7
toJSON CompletionItemKind
CiInterface = Scientific -> Value
A.Number Scientific
8
toJSON CompletionItemKind
CiModule = Scientific -> Value
A.Number Scientific
9
toJSON CompletionItemKind
CiProperty = Scientific -> Value
A.Number Scientific
10
toJSON CompletionItemKind
CiUnit = Scientific -> Value
A.Number Scientific
11
toJSON CompletionItemKind
CiValue = Scientific -> Value
A.Number Scientific
12
toJSON CompletionItemKind
CiEnum = Scientific -> Value
A.Number Scientific
13
toJSON CompletionItemKind
CiKeyword = Scientific -> Value
A.Number Scientific
14
toJSON CompletionItemKind
CiSnippet = Scientific -> Value
A.Number Scientific
15
toJSON CompletionItemKind
CiColor = Scientific -> Value
A.Number Scientific
16
toJSON CompletionItemKind
CiFile = Scientific -> Value
A.Number Scientific
17
toJSON CompletionItemKind
CiReference = Scientific -> Value
A.Number Scientific
18
toJSON CompletionItemKind
CiFolder = Scientific -> Value
A.Number Scientific
19
toJSON CompletionItemKind
CiEnumMember = Scientific -> Value
A.Number Scientific
20
toJSON CompletionItemKind
CiConstant = Scientific -> Value
A.Number Scientific
21
toJSON CompletionItemKind
CiStruct = Scientific -> Value
A.Number Scientific
22
toJSON CompletionItemKind
CiEvent = Scientific -> Value
A.Number Scientific
23
toJSON CompletionItemKind
CiOperator = Scientific -> Value
A.Number Scientific
24
toJSON CompletionItemKind
CiTypeParameter = Scientific -> Value
A.Number Scientific
25
instance A.FromJSON CompletionItemKind where
parseJSON :: Value -> Parser CompletionItemKind
parseJSON (A.Number Scientific
1) = CompletionItemKind -> Parser CompletionItemKind
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure CompletionItemKind
CiText
parseJSON (A.Number Scientific
2) = CompletionItemKind -> Parser CompletionItemKind
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure CompletionItemKind
CiMethod
parseJSON (A.Number Scientific
3) = CompletionItemKind -> Parser CompletionItemKind
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure CompletionItemKind
CiFunction
parseJSON (A.Number Scientific
4) = CompletionItemKind -> Parser CompletionItemKind
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure CompletionItemKind
CiConstructor
parseJSON (A.Number Scientific
5) = CompletionItemKind -> Parser CompletionItemKind
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure CompletionItemKind
CiField
parseJSON (A.Number Scientific
6) = CompletionItemKind -> Parser CompletionItemKind
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure CompletionItemKind
CiVariable
parseJSON (A.Number Scientific
7) = CompletionItemKind -> Parser CompletionItemKind
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure CompletionItemKind
CiClass
parseJSON (A.Number Scientific
8) = CompletionItemKind -> Parser CompletionItemKind
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure CompletionItemKind
CiInterface
parseJSON (A.Number Scientific
9) = CompletionItemKind -> Parser CompletionItemKind
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure CompletionItemKind
CiModule
parseJSON (A.Number Scientific
10) = CompletionItemKind -> Parser CompletionItemKind
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure CompletionItemKind
CiProperty
parseJSON (A.Number Scientific
11) = CompletionItemKind -> Parser CompletionItemKind
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure CompletionItemKind
CiUnit
parseJSON (A.Number Scientific
12) = CompletionItemKind -> Parser CompletionItemKind
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure CompletionItemKind
CiValue
parseJSON (A.Number Scientific
13) = CompletionItemKind -> Parser CompletionItemKind
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure CompletionItemKind
CiEnum
parseJSON (A.Number Scientific
14) = CompletionItemKind -> Parser CompletionItemKind
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure CompletionItemKind
CiKeyword
parseJSON (A.Number Scientific
15) = CompletionItemKind -> Parser CompletionItemKind
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure CompletionItemKind
CiSnippet
parseJSON (A.Number Scientific
16) = CompletionItemKind -> Parser CompletionItemKind
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure CompletionItemKind
CiColor
parseJSON (A.Number Scientific
17) = CompletionItemKind -> Parser CompletionItemKind
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure CompletionItemKind
CiFile
parseJSON (A.Number Scientific
18) = CompletionItemKind -> Parser CompletionItemKind
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure CompletionItemKind
CiReference
parseJSON (A.Number Scientific
19) = CompletionItemKind -> Parser CompletionItemKind
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure CompletionItemKind
CiFolder
parseJSON (A.Number Scientific
20) = CompletionItemKind -> Parser CompletionItemKind
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure CompletionItemKind
CiEnumMember
parseJSON (A.Number Scientific
21) = CompletionItemKind -> Parser CompletionItemKind
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure CompletionItemKind
CiConstant
parseJSON (A.Number Scientific
22) = CompletionItemKind -> Parser CompletionItemKind
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure CompletionItemKind
CiStruct
parseJSON (A.Number Scientific
23) = CompletionItemKind -> Parser CompletionItemKind
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure CompletionItemKind
CiEvent
parseJSON (A.Number Scientific
24) = CompletionItemKind -> Parser CompletionItemKind
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure CompletionItemKind
CiOperator
parseJSON (A.Number Scientific
25) = CompletionItemKind -> Parser CompletionItemKind
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure CompletionItemKind
CiTypeParameter
parseJSON Value
_ = String -> Parser CompletionItemKind
forall a. String -> Parser a
forall (m :: * -> *) a. MonadFail m => String -> m a
fail String
"CompletionItemKind"
data CompletionItemTag
= CitDeprecated
| CitUnknown Scientific
deriving (CompletionItemTag -> CompletionItemTag -> Bool
(CompletionItemTag -> CompletionItemTag -> Bool)
-> (CompletionItemTag -> CompletionItemTag -> Bool)
-> Eq CompletionItemTag
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CompletionItemTag -> CompletionItemTag -> Bool
== :: CompletionItemTag -> CompletionItemTag -> Bool
$c/= :: CompletionItemTag -> CompletionItemTag -> Bool
/= :: CompletionItemTag -> CompletionItemTag -> Bool
Eq, Eq CompletionItemTag
Eq CompletionItemTag =>
(CompletionItemTag -> CompletionItemTag -> Ordering)
-> (CompletionItemTag -> CompletionItemTag -> Bool)
-> (CompletionItemTag -> CompletionItemTag -> Bool)
-> (CompletionItemTag -> CompletionItemTag -> Bool)
-> (CompletionItemTag -> CompletionItemTag -> Bool)
-> (CompletionItemTag -> CompletionItemTag -> CompletionItemTag)
-> (CompletionItemTag -> CompletionItemTag -> CompletionItemTag)
-> Ord CompletionItemTag
CompletionItemTag -> CompletionItemTag -> Bool
CompletionItemTag -> CompletionItemTag -> Ordering
CompletionItemTag -> CompletionItemTag -> CompletionItemTag
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: CompletionItemTag -> CompletionItemTag -> Ordering
compare :: CompletionItemTag -> CompletionItemTag -> Ordering
$c< :: CompletionItemTag -> CompletionItemTag -> Bool
< :: CompletionItemTag -> CompletionItemTag -> Bool
$c<= :: CompletionItemTag -> CompletionItemTag -> Bool
<= :: CompletionItemTag -> CompletionItemTag -> Bool
$c> :: CompletionItemTag -> CompletionItemTag -> Bool
> :: CompletionItemTag -> CompletionItemTag -> Bool
$c>= :: CompletionItemTag -> CompletionItemTag -> Bool
>= :: CompletionItemTag -> CompletionItemTag -> Bool
$cmax :: CompletionItemTag -> CompletionItemTag -> CompletionItemTag
max :: CompletionItemTag -> CompletionItemTag -> CompletionItemTag
$cmin :: CompletionItemTag -> CompletionItemTag -> CompletionItemTag
min :: CompletionItemTag -> CompletionItemTag -> CompletionItemTag
Ord, Int -> CompletionItemTag -> ShowS
[CompletionItemTag] -> ShowS
CompletionItemTag -> String
(Int -> CompletionItemTag -> ShowS)
-> (CompletionItemTag -> String)
-> ([CompletionItemTag] -> ShowS)
-> Show CompletionItemTag
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CompletionItemTag -> ShowS
showsPrec :: Int -> CompletionItemTag -> ShowS
$cshow :: CompletionItemTag -> String
show :: CompletionItemTag -> String
$cshowList :: [CompletionItemTag] -> ShowS
showList :: [CompletionItemTag] -> ShowS
Show, ReadPrec [CompletionItemTag]
ReadPrec CompletionItemTag
Int -> ReadS CompletionItemTag
ReadS [CompletionItemTag]
(Int -> ReadS CompletionItemTag)
-> ReadS [CompletionItemTag]
-> ReadPrec CompletionItemTag
-> ReadPrec [CompletionItemTag]
-> Read CompletionItemTag
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS CompletionItemTag
readsPrec :: Int -> ReadS CompletionItemTag
$creadList :: ReadS [CompletionItemTag]
readList :: ReadS [CompletionItemTag]
$creadPrec :: ReadPrec CompletionItemTag
readPrec :: ReadPrec CompletionItemTag
$creadListPrec :: ReadPrec [CompletionItemTag]
readListPrec :: ReadPrec [CompletionItemTag]
Read)
instance A.ToJSON CompletionItemTag where
toJSON :: CompletionItemTag -> Value
toJSON CompletionItemTag
CitDeprecated = Scientific -> Value
A.Number Scientific
1
toJSON (CitUnknown Scientific
i) = Scientific -> Value
A.Number Scientific
i
instance A.FromJSON CompletionItemTag where
parseJSON :: Value -> Parser CompletionItemTag
parseJSON (A.Number Scientific
1) = CompletionItemTag -> Parser CompletionItemTag
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure CompletionItemTag
CitDeprecated
parseJSON Value
_ = String -> Parser CompletionItemTag
forall a. String -> Parser a
forall (m :: * -> *) a. MonadFail m => String -> m a
fail String
"CompletionItemTag"
data CompletionItemTagsClientCapabilities =
CompletionItemTagsClientCapabilities
{
CompletionItemTagsClientCapabilities -> List CompletionItemTag
_valueSet :: List CompletionItemTag
} deriving (Int -> CompletionItemTagsClientCapabilities -> ShowS
[CompletionItemTagsClientCapabilities] -> ShowS
CompletionItemTagsClientCapabilities -> String
(Int -> CompletionItemTagsClientCapabilities -> ShowS)
-> (CompletionItemTagsClientCapabilities -> String)
-> ([CompletionItemTagsClientCapabilities] -> ShowS)
-> Show CompletionItemTagsClientCapabilities
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CompletionItemTagsClientCapabilities -> ShowS
showsPrec :: Int -> CompletionItemTagsClientCapabilities -> ShowS
$cshow :: CompletionItemTagsClientCapabilities -> String
show :: CompletionItemTagsClientCapabilities -> String
$cshowList :: [CompletionItemTagsClientCapabilities] -> ShowS
showList :: [CompletionItemTagsClientCapabilities] -> ShowS
Show, ReadPrec [CompletionItemTagsClientCapabilities]
ReadPrec CompletionItemTagsClientCapabilities
Int -> ReadS CompletionItemTagsClientCapabilities
ReadS [CompletionItemTagsClientCapabilities]
(Int -> ReadS CompletionItemTagsClientCapabilities)
-> ReadS [CompletionItemTagsClientCapabilities]
-> ReadPrec CompletionItemTagsClientCapabilities
-> ReadPrec [CompletionItemTagsClientCapabilities]
-> Read CompletionItemTagsClientCapabilities
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS CompletionItemTagsClientCapabilities
readsPrec :: Int -> ReadS CompletionItemTagsClientCapabilities
$creadList :: ReadS [CompletionItemTagsClientCapabilities]
readList :: ReadS [CompletionItemTagsClientCapabilities]
$creadPrec :: ReadPrec CompletionItemTagsClientCapabilities
readPrec :: ReadPrec CompletionItemTagsClientCapabilities
$creadListPrec :: ReadPrec [CompletionItemTagsClientCapabilities]
readListPrec :: ReadPrec [CompletionItemTagsClientCapabilities]
Read, CompletionItemTagsClientCapabilities
-> CompletionItemTagsClientCapabilities -> Bool
(CompletionItemTagsClientCapabilities
-> CompletionItemTagsClientCapabilities -> Bool)
-> (CompletionItemTagsClientCapabilities
-> CompletionItemTagsClientCapabilities -> Bool)
-> Eq CompletionItemTagsClientCapabilities
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CompletionItemTagsClientCapabilities
-> CompletionItemTagsClientCapabilities -> Bool
== :: CompletionItemTagsClientCapabilities
-> CompletionItemTagsClientCapabilities -> Bool
$c/= :: CompletionItemTagsClientCapabilities
-> CompletionItemTagsClientCapabilities -> Bool
/= :: CompletionItemTagsClientCapabilities
-> CompletionItemTagsClientCapabilities -> Bool
Eq)
deriveJSON lspOptions ''CompletionItemTagsClientCapabilities
data CompletionItemResolveClientCapabilities =
CompletionItemResolveClientCapabilities
{
CompletionItemResolveClientCapabilities -> List Text
_properties :: List Text
} deriving (Int -> CompletionItemResolveClientCapabilities -> ShowS
[CompletionItemResolveClientCapabilities] -> ShowS
CompletionItemResolveClientCapabilities -> String
(Int -> CompletionItemResolveClientCapabilities -> ShowS)
-> (CompletionItemResolveClientCapabilities -> String)
-> ([CompletionItemResolveClientCapabilities] -> ShowS)
-> Show CompletionItemResolveClientCapabilities
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CompletionItemResolveClientCapabilities -> ShowS
showsPrec :: Int -> CompletionItemResolveClientCapabilities -> ShowS
$cshow :: CompletionItemResolveClientCapabilities -> String
show :: CompletionItemResolveClientCapabilities -> String
$cshowList :: [CompletionItemResolveClientCapabilities] -> ShowS
showList :: [CompletionItemResolveClientCapabilities] -> ShowS
Show, ReadPrec [CompletionItemResolveClientCapabilities]
ReadPrec CompletionItemResolveClientCapabilities
Int -> ReadS CompletionItemResolveClientCapabilities
ReadS [CompletionItemResolveClientCapabilities]
(Int -> ReadS CompletionItemResolveClientCapabilities)
-> ReadS [CompletionItemResolveClientCapabilities]
-> ReadPrec CompletionItemResolveClientCapabilities
-> ReadPrec [CompletionItemResolveClientCapabilities]
-> Read CompletionItemResolveClientCapabilities
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS CompletionItemResolveClientCapabilities
readsPrec :: Int -> ReadS CompletionItemResolveClientCapabilities
$creadList :: ReadS [CompletionItemResolveClientCapabilities]
readList :: ReadS [CompletionItemResolveClientCapabilities]
$creadPrec :: ReadPrec CompletionItemResolveClientCapabilities
readPrec :: ReadPrec CompletionItemResolveClientCapabilities
$creadListPrec :: ReadPrec [CompletionItemResolveClientCapabilities]
readListPrec :: ReadPrec [CompletionItemResolveClientCapabilities]
Read, CompletionItemResolveClientCapabilities
-> CompletionItemResolveClientCapabilities -> Bool
(CompletionItemResolveClientCapabilities
-> CompletionItemResolveClientCapabilities -> Bool)
-> (CompletionItemResolveClientCapabilities
-> CompletionItemResolveClientCapabilities -> Bool)
-> Eq CompletionItemResolveClientCapabilities
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CompletionItemResolveClientCapabilities
-> CompletionItemResolveClientCapabilities -> Bool
== :: CompletionItemResolveClientCapabilities
-> CompletionItemResolveClientCapabilities -> Bool
$c/= :: CompletionItemResolveClientCapabilities
-> CompletionItemResolveClientCapabilities -> Bool
/= :: CompletionItemResolveClientCapabilities
-> CompletionItemResolveClientCapabilities -> Bool
Eq)
deriveJSON lspOptions ''CompletionItemResolveClientCapabilities
data InsertTextMode =
AsIs
| AdjustIndentation
deriving (ReadPrec [InsertTextMode]
ReadPrec InsertTextMode
Int -> ReadS InsertTextMode
ReadS [InsertTextMode]
(Int -> ReadS InsertTextMode)
-> ReadS [InsertTextMode]
-> ReadPrec InsertTextMode
-> ReadPrec [InsertTextMode]
-> Read InsertTextMode
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS InsertTextMode
readsPrec :: Int -> ReadS InsertTextMode
$creadList :: ReadS [InsertTextMode]
readList :: ReadS [InsertTextMode]
$creadPrec :: ReadPrec InsertTextMode
readPrec :: ReadPrec InsertTextMode
$creadListPrec :: ReadPrec [InsertTextMode]
readListPrec :: ReadPrec [InsertTextMode]
Read,Int -> InsertTextMode -> ShowS
[InsertTextMode] -> ShowS
InsertTextMode -> String
(Int -> InsertTextMode -> ShowS)
-> (InsertTextMode -> String)
-> ([InsertTextMode] -> ShowS)
-> Show InsertTextMode
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> InsertTextMode -> ShowS
showsPrec :: Int -> InsertTextMode -> ShowS
$cshow :: InsertTextMode -> String
show :: InsertTextMode -> String
$cshowList :: [InsertTextMode] -> ShowS
showList :: [InsertTextMode] -> ShowS
Show,InsertTextMode -> InsertTextMode -> Bool
(InsertTextMode -> InsertTextMode -> Bool)
-> (InsertTextMode -> InsertTextMode -> Bool) -> Eq InsertTextMode
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: InsertTextMode -> InsertTextMode -> Bool
== :: InsertTextMode -> InsertTextMode -> Bool
$c/= :: InsertTextMode -> InsertTextMode -> Bool
/= :: InsertTextMode -> InsertTextMode -> Bool
Eq)
instance A.ToJSON InsertTextMode where
toJSON :: InsertTextMode -> Value
toJSON InsertTextMode
AsIs = Scientific -> Value
A.Number Scientific
1
toJSON InsertTextMode
AdjustIndentation = Scientific -> Value
A.Number Scientific
2
instance A.FromJSON InsertTextMode where
parseJSON :: Value -> Parser InsertTextMode
parseJSON (A.Number Scientific
1) = InsertTextMode -> Parser InsertTextMode
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure InsertTextMode
AsIs
parseJSON (A.Number Scientific
2) = InsertTextMode -> Parser InsertTextMode
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure InsertTextMode
AdjustIndentation
parseJSON Value
_ = String -> Parser InsertTextMode
forall a. String -> Parser a
forall (m :: * -> *) a. MonadFail m => String -> m a
fail String
"InsertTextMode"
data CompletionItemInsertTextModeClientCapabilities =
CompletionItemInsertTextModeClientCapabilities
{ CompletionItemInsertTextModeClientCapabilities
-> List InsertTextMode
_valueSet :: List InsertTextMode
} deriving (Int -> CompletionItemInsertTextModeClientCapabilities -> ShowS
[CompletionItemInsertTextModeClientCapabilities] -> ShowS
CompletionItemInsertTextModeClientCapabilities -> String
(Int -> CompletionItemInsertTextModeClientCapabilities -> ShowS)
-> (CompletionItemInsertTextModeClientCapabilities -> String)
-> ([CompletionItemInsertTextModeClientCapabilities] -> ShowS)
-> Show CompletionItemInsertTextModeClientCapabilities
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CompletionItemInsertTextModeClientCapabilities -> ShowS
showsPrec :: Int -> CompletionItemInsertTextModeClientCapabilities -> ShowS
$cshow :: CompletionItemInsertTextModeClientCapabilities -> String
show :: CompletionItemInsertTextModeClientCapabilities -> String
$cshowList :: [CompletionItemInsertTextModeClientCapabilities] -> ShowS
showList :: [CompletionItemInsertTextModeClientCapabilities] -> ShowS
Show, ReadPrec [CompletionItemInsertTextModeClientCapabilities]
ReadPrec CompletionItemInsertTextModeClientCapabilities
Int -> ReadS CompletionItemInsertTextModeClientCapabilities
ReadS [CompletionItemInsertTextModeClientCapabilities]
(Int -> ReadS CompletionItemInsertTextModeClientCapabilities)
-> ReadS [CompletionItemInsertTextModeClientCapabilities]
-> ReadPrec CompletionItemInsertTextModeClientCapabilities
-> ReadPrec [CompletionItemInsertTextModeClientCapabilities]
-> Read CompletionItemInsertTextModeClientCapabilities
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS CompletionItemInsertTextModeClientCapabilities
readsPrec :: Int -> ReadS CompletionItemInsertTextModeClientCapabilities
$creadList :: ReadS [CompletionItemInsertTextModeClientCapabilities]
readList :: ReadS [CompletionItemInsertTextModeClientCapabilities]
$creadPrec :: ReadPrec CompletionItemInsertTextModeClientCapabilities
readPrec :: ReadPrec CompletionItemInsertTextModeClientCapabilities
$creadListPrec :: ReadPrec [CompletionItemInsertTextModeClientCapabilities]
readListPrec :: ReadPrec [CompletionItemInsertTextModeClientCapabilities]
Read, CompletionItemInsertTextModeClientCapabilities
-> CompletionItemInsertTextModeClientCapabilities -> Bool
(CompletionItemInsertTextModeClientCapabilities
-> CompletionItemInsertTextModeClientCapabilities -> Bool)
-> (CompletionItemInsertTextModeClientCapabilities
-> CompletionItemInsertTextModeClientCapabilities -> Bool)
-> Eq CompletionItemInsertTextModeClientCapabilities
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CompletionItemInsertTextModeClientCapabilities
-> CompletionItemInsertTextModeClientCapabilities -> Bool
== :: CompletionItemInsertTextModeClientCapabilities
-> CompletionItemInsertTextModeClientCapabilities -> Bool
$c/= :: CompletionItemInsertTextModeClientCapabilities
-> CompletionItemInsertTextModeClientCapabilities -> Bool
/= :: CompletionItemInsertTextModeClientCapabilities
-> CompletionItemInsertTextModeClientCapabilities -> Bool
Eq)
deriveJSON lspOptions ''CompletionItemInsertTextModeClientCapabilities
data CompletionItemClientCapabilities =
CompletionItemClientCapabilities
{
CompletionItemClientCapabilities -> Maybe Bool
_snippetSupport :: Maybe Bool
, :: Maybe Bool
, CompletionItemClientCapabilities -> Maybe (List MarkupKind)
_documentationFormat :: Maybe (List MarkupKind)
, CompletionItemClientCapabilities -> Maybe Bool
_deprecatedSupport :: Maybe Bool
, CompletionItemClientCapabilities -> Maybe Bool
_preselectSupport :: Maybe Bool
, CompletionItemClientCapabilities
-> Maybe CompletionItemTagsClientCapabilities
_tagSupport :: Maybe CompletionItemTagsClientCapabilities
, CompletionItemClientCapabilities -> Maybe Bool
_insertReplaceSupport :: Maybe Bool
, CompletionItemClientCapabilities
-> Maybe CompletionItemResolveClientCapabilities
_resolveSupport :: Maybe CompletionItemResolveClientCapabilities
, CompletionItemClientCapabilities
-> Maybe CompletionItemInsertTextModeClientCapabilities
_insertTextModeSupport :: Maybe CompletionItemInsertTextModeClientCapabilities
} deriving (Int -> CompletionItemClientCapabilities -> ShowS
[CompletionItemClientCapabilities] -> ShowS
CompletionItemClientCapabilities -> String
(Int -> CompletionItemClientCapabilities -> ShowS)
-> (CompletionItemClientCapabilities -> String)
-> ([CompletionItemClientCapabilities] -> ShowS)
-> Show CompletionItemClientCapabilities
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CompletionItemClientCapabilities -> ShowS
showsPrec :: Int -> CompletionItemClientCapabilities -> ShowS
$cshow :: CompletionItemClientCapabilities -> String
show :: CompletionItemClientCapabilities -> String
$cshowList :: [CompletionItemClientCapabilities] -> ShowS
showList :: [CompletionItemClientCapabilities] -> ShowS
Show, ReadPrec [CompletionItemClientCapabilities]
ReadPrec CompletionItemClientCapabilities
Int -> ReadS CompletionItemClientCapabilities
ReadS [CompletionItemClientCapabilities]
(Int -> ReadS CompletionItemClientCapabilities)
-> ReadS [CompletionItemClientCapabilities]
-> ReadPrec CompletionItemClientCapabilities
-> ReadPrec [CompletionItemClientCapabilities]
-> Read CompletionItemClientCapabilities
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS CompletionItemClientCapabilities
readsPrec :: Int -> ReadS CompletionItemClientCapabilities
$creadList :: ReadS [CompletionItemClientCapabilities]
readList :: ReadS [CompletionItemClientCapabilities]
$creadPrec :: ReadPrec CompletionItemClientCapabilities
readPrec :: ReadPrec CompletionItemClientCapabilities
$creadListPrec :: ReadPrec [CompletionItemClientCapabilities]
readListPrec :: ReadPrec [CompletionItemClientCapabilities]
Read, CompletionItemClientCapabilities
-> CompletionItemClientCapabilities -> Bool
(CompletionItemClientCapabilities
-> CompletionItemClientCapabilities -> Bool)
-> (CompletionItemClientCapabilities
-> CompletionItemClientCapabilities -> Bool)
-> Eq CompletionItemClientCapabilities
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CompletionItemClientCapabilities
-> CompletionItemClientCapabilities -> Bool
== :: CompletionItemClientCapabilities
-> CompletionItemClientCapabilities -> Bool
$c/= :: CompletionItemClientCapabilities
-> CompletionItemClientCapabilities -> Bool
/= :: CompletionItemClientCapabilities
-> CompletionItemClientCapabilities -> Bool
Eq)
deriveJSON lspOptions ''CompletionItemClientCapabilities
data CompletionItemKindClientCapabilities =
CompletionItemKindClientCapabilities
{
CompletionItemKindClientCapabilities
-> Maybe (List CompletionItemKind)
_valueSet :: Maybe (List CompletionItemKind)
}
deriving (Int -> CompletionItemKindClientCapabilities -> ShowS
[CompletionItemKindClientCapabilities] -> ShowS
CompletionItemKindClientCapabilities -> String
(Int -> CompletionItemKindClientCapabilities -> ShowS)
-> (CompletionItemKindClientCapabilities -> String)
-> ([CompletionItemKindClientCapabilities] -> ShowS)
-> Show CompletionItemKindClientCapabilities
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CompletionItemKindClientCapabilities -> ShowS
showsPrec :: Int -> CompletionItemKindClientCapabilities -> ShowS
$cshow :: CompletionItemKindClientCapabilities -> String
show :: CompletionItemKindClientCapabilities -> String
$cshowList :: [CompletionItemKindClientCapabilities] -> ShowS
showList :: [CompletionItemKindClientCapabilities] -> ShowS
Show, ReadPrec [CompletionItemKindClientCapabilities]
ReadPrec CompletionItemKindClientCapabilities
Int -> ReadS CompletionItemKindClientCapabilities
ReadS [CompletionItemKindClientCapabilities]
(Int -> ReadS CompletionItemKindClientCapabilities)
-> ReadS [CompletionItemKindClientCapabilities]
-> ReadPrec CompletionItemKindClientCapabilities
-> ReadPrec [CompletionItemKindClientCapabilities]
-> Read CompletionItemKindClientCapabilities
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS CompletionItemKindClientCapabilities
readsPrec :: Int -> ReadS CompletionItemKindClientCapabilities
$creadList :: ReadS [CompletionItemKindClientCapabilities]
readList :: ReadS [CompletionItemKindClientCapabilities]
$creadPrec :: ReadPrec CompletionItemKindClientCapabilities
readPrec :: ReadPrec CompletionItemKindClientCapabilities
$creadListPrec :: ReadPrec [CompletionItemKindClientCapabilities]
readListPrec :: ReadPrec [CompletionItemKindClientCapabilities]
Read, CompletionItemKindClientCapabilities
-> CompletionItemKindClientCapabilities -> Bool
(CompletionItemKindClientCapabilities
-> CompletionItemKindClientCapabilities -> Bool)
-> (CompletionItemKindClientCapabilities
-> CompletionItemKindClientCapabilities -> Bool)
-> Eq CompletionItemKindClientCapabilities
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CompletionItemKindClientCapabilities
-> CompletionItemKindClientCapabilities -> Bool
== :: CompletionItemKindClientCapabilities
-> CompletionItemKindClientCapabilities -> Bool
$c/= :: CompletionItemKindClientCapabilities
-> CompletionItemKindClientCapabilities -> Bool
/= :: CompletionItemKindClientCapabilities
-> CompletionItemKindClientCapabilities -> Bool
Eq)
deriveJSON lspOptions ''CompletionItemKindClientCapabilities
data CompletionClientCapabilities =
CompletionClientCapabilities
{ CompletionClientCapabilities -> Maybe Bool
_dynamicRegistration :: Maybe Bool
, CompletionClientCapabilities
-> Maybe CompletionItemClientCapabilities
_completionItem :: Maybe CompletionItemClientCapabilities
, CompletionClientCapabilities
-> Maybe CompletionItemKindClientCapabilities
_completionItemKind :: Maybe CompletionItemKindClientCapabilities
, CompletionClientCapabilities -> Maybe Bool
_contextSupport :: Maybe Bool
} deriving (Int -> CompletionClientCapabilities -> ShowS
[CompletionClientCapabilities] -> ShowS
CompletionClientCapabilities -> String
(Int -> CompletionClientCapabilities -> ShowS)
-> (CompletionClientCapabilities -> String)
-> ([CompletionClientCapabilities] -> ShowS)
-> Show CompletionClientCapabilities
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CompletionClientCapabilities -> ShowS
showsPrec :: Int -> CompletionClientCapabilities -> ShowS
$cshow :: CompletionClientCapabilities -> String
show :: CompletionClientCapabilities -> String
$cshowList :: [CompletionClientCapabilities] -> ShowS
showList :: [CompletionClientCapabilities] -> ShowS
Show, ReadPrec [CompletionClientCapabilities]
ReadPrec CompletionClientCapabilities
Int -> ReadS CompletionClientCapabilities
ReadS [CompletionClientCapabilities]
(Int -> ReadS CompletionClientCapabilities)
-> ReadS [CompletionClientCapabilities]
-> ReadPrec CompletionClientCapabilities
-> ReadPrec [CompletionClientCapabilities]
-> Read CompletionClientCapabilities
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS CompletionClientCapabilities
readsPrec :: Int -> ReadS CompletionClientCapabilities
$creadList :: ReadS [CompletionClientCapabilities]
readList :: ReadS [CompletionClientCapabilities]
$creadPrec :: ReadPrec CompletionClientCapabilities
readPrec :: ReadPrec CompletionClientCapabilities
$creadListPrec :: ReadPrec [CompletionClientCapabilities]
readListPrec :: ReadPrec [CompletionClientCapabilities]
Read, CompletionClientCapabilities
-> CompletionClientCapabilities -> Bool
(CompletionClientCapabilities
-> CompletionClientCapabilities -> Bool)
-> (CompletionClientCapabilities
-> CompletionClientCapabilities -> Bool)
-> Eq CompletionClientCapabilities
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CompletionClientCapabilities
-> CompletionClientCapabilities -> Bool
== :: CompletionClientCapabilities
-> CompletionClientCapabilities -> Bool
$c/= :: CompletionClientCapabilities
-> CompletionClientCapabilities -> Bool
/= :: CompletionClientCapabilities
-> CompletionClientCapabilities -> Bool
Eq)
deriveJSON lspOptions ''CompletionClientCapabilities
data InsertTextFormat
= PlainText
| Snippet
deriving (Int -> InsertTextFormat -> ShowS
[InsertTextFormat] -> ShowS
InsertTextFormat -> String
(Int -> InsertTextFormat -> ShowS)
-> (InsertTextFormat -> String)
-> ([InsertTextFormat] -> ShowS)
-> Show InsertTextFormat
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> InsertTextFormat -> ShowS
showsPrec :: Int -> InsertTextFormat -> ShowS
$cshow :: InsertTextFormat -> String
show :: InsertTextFormat -> String
$cshowList :: [InsertTextFormat] -> ShowS
showList :: [InsertTextFormat] -> ShowS
Show, ReadPrec [InsertTextFormat]
ReadPrec InsertTextFormat
Int -> ReadS InsertTextFormat
ReadS [InsertTextFormat]
(Int -> ReadS InsertTextFormat)
-> ReadS [InsertTextFormat]
-> ReadPrec InsertTextFormat
-> ReadPrec [InsertTextFormat]
-> Read InsertTextFormat
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS InsertTextFormat
readsPrec :: Int -> ReadS InsertTextFormat
$creadList :: ReadS [InsertTextFormat]
readList :: ReadS [InsertTextFormat]
$creadPrec :: ReadPrec InsertTextFormat
readPrec :: ReadPrec InsertTextFormat
$creadListPrec :: ReadPrec [InsertTextFormat]
readListPrec :: ReadPrec [InsertTextFormat]
Read, InsertTextFormat -> InsertTextFormat -> Bool
(InsertTextFormat -> InsertTextFormat -> Bool)
-> (InsertTextFormat -> InsertTextFormat -> Bool)
-> Eq InsertTextFormat
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: InsertTextFormat -> InsertTextFormat -> Bool
== :: InsertTextFormat -> InsertTextFormat -> Bool
$c/= :: InsertTextFormat -> InsertTextFormat -> Bool
/= :: InsertTextFormat -> InsertTextFormat -> Bool
Eq)
instance A.ToJSON InsertTextFormat where
toJSON :: InsertTextFormat -> Value
toJSON InsertTextFormat
PlainText = Scientific -> Value
A.Number Scientific
1
toJSON InsertTextFormat
Snippet = Scientific -> Value
A.Number Scientific
2
instance A.FromJSON InsertTextFormat where
parseJSON :: Value -> Parser InsertTextFormat
parseJSON (A.Number Scientific
1) = InsertTextFormat -> Parser InsertTextFormat
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure InsertTextFormat
PlainText
parseJSON (A.Number Scientific
2) = InsertTextFormat -> Parser InsertTextFormat
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure InsertTextFormat
Snippet
parseJSON Value
_ = String -> Parser InsertTextFormat
forall a. String -> Parser a
forall (m :: * -> *) a. MonadFail m => String -> m a
fail String
"InsertTextFormat"
data CompletionDoc = CompletionDocString Text
| CompletionDocMarkup MarkupContent
deriving (Int -> CompletionDoc -> ShowS
[CompletionDoc] -> ShowS
CompletionDoc -> String
(Int -> CompletionDoc -> ShowS)
-> (CompletionDoc -> String)
-> ([CompletionDoc] -> ShowS)
-> Show CompletionDoc
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CompletionDoc -> ShowS
showsPrec :: Int -> CompletionDoc -> ShowS
$cshow :: CompletionDoc -> String
show :: CompletionDoc -> String
$cshowList :: [CompletionDoc] -> ShowS
showList :: [CompletionDoc] -> ShowS
Show, ReadPrec [CompletionDoc]
ReadPrec CompletionDoc
Int -> ReadS CompletionDoc
ReadS [CompletionDoc]
(Int -> ReadS CompletionDoc)
-> ReadS [CompletionDoc]
-> ReadPrec CompletionDoc
-> ReadPrec [CompletionDoc]
-> Read CompletionDoc
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS CompletionDoc
readsPrec :: Int -> ReadS CompletionDoc
$creadList :: ReadS [CompletionDoc]
readList :: ReadS [CompletionDoc]
$creadPrec :: ReadPrec CompletionDoc
readPrec :: ReadPrec CompletionDoc
$creadListPrec :: ReadPrec [CompletionDoc]
readListPrec :: ReadPrec [CompletionDoc]
Read, CompletionDoc -> CompletionDoc -> Bool
(CompletionDoc -> CompletionDoc -> Bool)
-> (CompletionDoc -> CompletionDoc -> Bool) -> Eq CompletionDoc
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CompletionDoc -> CompletionDoc -> Bool
== :: CompletionDoc -> CompletionDoc -> Bool
$c/= :: CompletionDoc -> CompletionDoc -> Bool
/= :: CompletionDoc -> CompletionDoc -> Bool
Eq)
deriveJSON lspOptionsUntagged ''CompletionDoc
data InsertReplaceEdit =
InsertReplaceEdit
{ InsertReplaceEdit -> Text
_newText :: Text
, InsertReplaceEdit -> Range
_insert :: Range
, InsertReplaceEdit -> Range
_repalce :: Range
}
deriving (ReadPrec [InsertReplaceEdit]
ReadPrec InsertReplaceEdit
Int -> ReadS InsertReplaceEdit
ReadS [InsertReplaceEdit]
(Int -> ReadS InsertReplaceEdit)
-> ReadS [InsertReplaceEdit]
-> ReadPrec InsertReplaceEdit
-> ReadPrec [InsertReplaceEdit]
-> Read InsertReplaceEdit
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS InsertReplaceEdit
readsPrec :: Int -> ReadS InsertReplaceEdit
$creadList :: ReadS [InsertReplaceEdit]
readList :: ReadS [InsertReplaceEdit]
$creadPrec :: ReadPrec InsertReplaceEdit
readPrec :: ReadPrec InsertReplaceEdit
$creadListPrec :: ReadPrec [InsertReplaceEdit]
readListPrec :: ReadPrec [InsertReplaceEdit]
Read,Int -> InsertReplaceEdit -> ShowS
[InsertReplaceEdit] -> ShowS
InsertReplaceEdit -> String
(Int -> InsertReplaceEdit -> ShowS)
-> (InsertReplaceEdit -> String)
-> ([InsertReplaceEdit] -> ShowS)
-> Show InsertReplaceEdit
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> InsertReplaceEdit -> ShowS
showsPrec :: Int -> InsertReplaceEdit -> ShowS
$cshow :: InsertReplaceEdit -> String
show :: InsertReplaceEdit -> String
$cshowList :: [InsertReplaceEdit] -> ShowS
showList :: [InsertReplaceEdit] -> ShowS
Show,InsertReplaceEdit -> InsertReplaceEdit -> Bool
(InsertReplaceEdit -> InsertReplaceEdit -> Bool)
-> (InsertReplaceEdit -> InsertReplaceEdit -> Bool)
-> Eq InsertReplaceEdit
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: InsertReplaceEdit -> InsertReplaceEdit -> Bool
== :: InsertReplaceEdit -> InsertReplaceEdit -> Bool
$c/= :: InsertReplaceEdit -> InsertReplaceEdit -> Bool
/= :: InsertReplaceEdit -> InsertReplaceEdit -> Bool
Eq)
deriveJSON lspOptions ''InsertReplaceEdit
data CompletionEdit = CompletionEditText TextEdit | CompletionEditInsertReplace InsertReplaceEdit
deriving (ReadPrec [CompletionEdit]
ReadPrec CompletionEdit
Int -> ReadS CompletionEdit
ReadS [CompletionEdit]
(Int -> ReadS CompletionEdit)
-> ReadS [CompletionEdit]
-> ReadPrec CompletionEdit
-> ReadPrec [CompletionEdit]
-> Read CompletionEdit
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS CompletionEdit
readsPrec :: Int -> ReadS CompletionEdit
$creadList :: ReadS [CompletionEdit]
readList :: ReadS [CompletionEdit]
$creadPrec :: ReadPrec CompletionEdit
readPrec :: ReadPrec CompletionEdit
$creadListPrec :: ReadPrec [CompletionEdit]
readListPrec :: ReadPrec [CompletionEdit]
Read,Int -> CompletionEdit -> ShowS
[CompletionEdit] -> ShowS
CompletionEdit -> String
(Int -> CompletionEdit -> ShowS)
-> (CompletionEdit -> String)
-> ([CompletionEdit] -> ShowS)
-> Show CompletionEdit
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CompletionEdit -> ShowS
showsPrec :: Int -> CompletionEdit -> ShowS
$cshow :: CompletionEdit -> String
show :: CompletionEdit -> String
$cshowList :: [CompletionEdit] -> ShowS
showList :: [CompletionEdit] -> ShowS
Show,CompletionEdit -> CompletionEdit -> Bool
(CompletionEdit -> CompletionEdit -> Bool)
-> (CompletionEdit -> CompletionEdit -> Bool) -> Eq CompletionEdit
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CompletionEdit -> CompletionEdit -> Bool
== :: CompletionEdit -> CompletionEdit -> Bool
$c/= :: CompletionEdit -> CompletionEdit -> Bool
/= :: CompletionEdit -> CompletionEdit -> Bool
Eq)
deriveJSON lspOptionsUntagged ''CompletionEdit
data CompletionItem =
CompletionItem
{ CompletionItem -> Text
_label :: Text
, CompletionItem -> Maybe CompletionItemKind
_kind :: Maybe CompletionItemKind
, CompletionItem -> Maybe (List CompletionItemTag)
_tags :: Maybe (List CompletionItemTag)
, CompletionItem -> Maybe Text
_detail :: Maybe Text
, CompletionItem -> Maybe CompletionDoc
_documentation :: Maybe CompletionDoc
, CompletionItem -> Maybe Bool
_deprecated :: Maybe Bool
, CompletionItem -> Maybe Bool
_preselect :: Maybe Bool
, CompletionItem -> Maybe Text
_sortText :: Maybe Text
, CompletionItem -> Maybe Text
_filterText :: Maybe Text
, CompletionItem -> Maybe Text
_insertText :: Maybe Text
, CompletionItem -> Maybe InsertTextFormat
_insertTextFormat :: Maybe InsertTextFormat
, CompletionItem -> Maybe InsertTextMode
_insertTextMode :: Maybe InsertTextMode
, CompletionItem -> Maybe CompletionEdit
_textEdit :: Maybe CompletionEdit
, CompletionItem -> Maybe (List TextEdit)
_additionalTextEdits :: Maybe (List TextEdit)
, CompletionItem -> Maybe (List Text)
_commitCharacters :: Maybe (List Text)
, CompletionItem -> Maybe Command
_command :: Maybe Command
, CompletionItem -> Maybe Value
_xdata :: Maybe A.Value
} deriving (ReadPrec [CompletionItem]
ReadPrec CompletionItem
Int -> ReadS CompletionItem
ReadS [CompletionItem]
(Int -> ReadS CompletionItem)
-> ReadS [CompletionItem]
-> ReadPrec CompletionItem
-> ReadPrec [CompletionItem]
-> Read CompletionItem
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS CompletionItem
readsPrec :: Int -> ReadS CompletionItem
$creadList :: ReadS [CompletionItem]
readList :: ReadS [CompletionItem]
$creadPrec :: ReadPrec CompletionItem
readPrec :: ReadPrec CompletionItem
$creadListPrec :: ReadPrec [CompletionItem]
readListPrec :: ReadPrec [CompletionItem]
Read,Int -> CompletionItem -> ShowS
[CompletionItem] -> ShowS
CompletionItem -> String
(Int -> CompletionItem -> ShowS)
-> (CompletionItem -> String)
-> ([CompletionItem] -> ShowS)
-> Show CompletionItem
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CompletionItem -> ShowS
showsPrec :: Int -> CompletionItem -> ShowS
$cshow :: CompletionItem -> String
show :: CompletionItem -> String
$cshowList :: [CompletionItem] -> ShowS
showList :: [CompletionItem] -> ShowS
Show,CompletionItem -> CompletionItem -> Bool
(CompletionItem -> CompletionItem -> Bool)
-> (CompletionItem -> CompletionItem -> Bool) -> Eq CompletionItem
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CompletionItem -> CompletionItem -> Bool
== :: CompletionItem -> CompletionItem -> Bool
$c/= :: CompletionItem -> CompletionItem -> Bool
/= :: CompletionItem -> CompletionItem -> Bool
Eq)
deriveJSON lspOptions ''CompletionItem
data CompletionList =
CompletionList
{ CompletionList -> Bool
_isIncomplete :: Bool
, CompletionList -> List CompletionItem
_items :: List CompletionItem
} deriving (ReadPrec [CompletionList]
ReadPrec CompletionList
Int -> ReadS CompletionList
ReadS [CompletionList]
(Int -> ReadS CompletionList)
-> ReadS [CompletionList]
-> ReadPrec CompletionList
-> ReadPrec [CompletionList]
-> Read CompletionList
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS CompletionList
readsPrec :: Int -> ReadS CompletionList
$creadList :: ReadS [CompletionList]
readList :: ReadS [CompletionList]
$creadPrec :: ReadPrec CompletionList
readPrec :: ReadPrec CompletionList
$creadListPrec :: ReadPrec [CompletionList]
readListPrec :: ReadPrec [CompletionList]
Read,Int -> CompletionList -> ShowS
[CompletionList] -> ShowS
CompletionList -> String
(Int -> CompletionList -> ShowS)
-> (CompletionList -> String)
-> ([CompletionList] -> ShowS)
-> Show CompletionList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CompletionList -> ShowS
showsPrec :: Int -> CompletionList -> ShowS
$cshow :: CompletionList -> String
show :: CompletionList -> String
$cshowList :: [CompletionList] -> ShowS
showList :: [CompletionList] -> ShowS
Show,CompletionList -> CompletionList -> Bool
(CompletionList -> CompletionList -> Bool)
-> (CompletionList -> CompletionList -> Bool) -> Eq CompletionList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CompletionList -> CompletionList -> Bool
== :: CompletionList -> CompletionList -> Bool
$c/= :: CompletionList -> CompletionList -> Bool
/= :: CompletionList -> CompletionList -> Bool
Eq)
deriveJSON lspOptions ''CompletionList
data CompletionTriggerKind =
CtInvoked
| CtTriggerCharacter
| CtTriggerForIncompleteCompletions
| CtUnknown Scientific
deriving (ReadPrec [CompletionTriggerKind]
ReadPrec CompletionTriggerKind
Int -> ReadS CompletionTriggerKind
ReadS [CompletionTriggerKind]
(Int -> ReadS CompletionTriggerKind)
-> ReadS [CompletionTriggerKind]
-> ReadPrec CompletionTriggerKind
-> ReadPrec [CompletionTriggerKind]
-> Read CompletionTriggerKind
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS CompletionTriggerKind
readsPrec :: Int -> ReadS CompletionTriggerKind
$creadList :: ReadS [CompletionTriggerKind]
readList :: ReadS [CompletionTriggerKind]
$creadPrec :: ReadPrec CompletionTriggerKind
readPrec :: ReadPrec CompletionTriggerKind
$creadListPrec :: ReadPrec [CompletionTriggerKind]
readListPrec :: ReadPrec [CompletionTriggerKind]
Read, Int -> CompletionTriggerKind -> ShowS
[CompletionTriggerKind] -> ShowS
CompletionTriggerKind -> String
(Int -> CompletionTriggerKind -> ShowS)
-> (CompletionTriggerKind -> String)
-> ([CompletionTriggerKind] -> ShowS)
-> Show CompletionTriggerKind
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CompletionTriggerKind -> ShowS
showsPrec :: Int -> CompletionTriggerKind -> ShowS
$cshow :: CompletionTriggerKind -> String
show :: CompletionTriggerKind -> String
$cshowList :: [CompletionTriggerKind] -> ShowS
showList :: [CompletionTriggerKind] -> ShowS
Show, CompletionTriggerKind -> CompletionTriggerKind -> Bool
(CompletionTriggerKind -> CompletionTriggerKind -> Bool)
-> (CompletionTriggerKind -> CompletionTriggerKind -> Bool)
-> Eq CompletionTriggerKind
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CompletionTriggerKind -> CompletionTriggerKind -> Bool
== :: CompletionTriggerKind -> CompletionTriggerKind -> Bool
$c/= :: CompletionTriggerKind -> CompletionTriggerKind -> Bool
/= :: CompletionTriggerKind -> CompletionTriggerKind -> Bool
Eq)
instance A.ToJSON CompletionTriggerKind where
toJSON :: CompletionTriggerKind -> Value
toJSON CompletionTriggerKind
CtInvoked = Scientific -> Value
A.Number Scientific
1
toJSON CompletionTriggerKind
CtTriggerCharacter = Scientific -> Value
A.Number Scientific
2
toJSON CompletionTriggerKind
CtTriggerForIncompleteCompletions = Scientific -> Value
A.Number Scientific
3
toJSON (CtUnknown Scientific
x) = Scientific -> Value
A.Number Scientific
x
instance A.FromJSON CompletionTriggerKind where
parseJSON :: Value -> Parser CompletionTriggerKind
parseJSON (A.Number Scientific
1) = CompletionTriggerKind -> Parser CompletionTriggerKind
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure CompletionTriggerKind
CtInvoked
parseJSON (A.Number Scientific
2) = CompletionTriggerKind -> Parser CompletionTriggerKind
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure CompletionTriggerKind
CtTriggerCharacter
parseJSON (A.Number Scientific
3) = CompletionTriggerKind -> Parser CompletionTriggerKind
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure CompletionTriggerKind
CtTriggerForIncompleteCompletions
parseJSON (A.Number Scientific
x) = CompletionTriggerKind -> Parser CompletionTriggerKind
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Scientific -> CompletionTriggerKind
CtUnknown Scientific
x)
parseJSON Value
_ = String -> Parser CompletionTriggerKind
forall a. String -> Parser a
forall (m :: * -> *) a. MonadFail m => String -> m a
fail String
"CompletionTriggerKind"
makeExtendingDatatype "CompletionOptions" [''WorkDoneProgressOptions]
[ ("_triggerCharacters", [t| Maybe [Text] |])
, ("_allCommitCharacters", [t| Maybe [Text] |])
, ("_resolveProvider", [t| Maybe Bool|])
]
deriveJSON lspOptions ''CompletionOptions
makeExtendingDatatype "CompletionRegistrationOptions"
[ ''TextDocumentRegistrationOptions
, ''CompletionOptions
]
[]
deriveJSON lspOptions ''CompletionRegistrationOptions
data CompletionContext =
CompletionContext
{ CompletionContext -> CompletionTriggerKind
_triggerKind :: CompletionTriggerKind
, CompletionContext -> Maybe Text
_triggerCharacter :: Maybe Text
}
deriving (ReadPrec [CompletionContext]
ReadPrec CompletionContext
Int -> ReadS CompletionContext
ReadS [CompletionContext]
(Int -> ReadS CompletionContext)
-> ReadS [CompletionContext]
-> ReadPrec CompletionContext
-> ReadPrec [CompletionContext]
-> Read CompletionContext
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS CompletionContext
readsPrec :: Int -> ReadS CompletionContext
$creadList :: ReadS [CompletionContext]
readList :: ReadS [CompletionContext]
$creadPrec :: ReadPrec CompletionContext
readPrec :: ReadPrec CompletionContext
$creadListPrec :: ReadPrec [CompletionContext]
readListPrec :: ReadPrec [CompletionContext]
Read, Int -> CompletionContext -> ShowS
[CompletionContext] -> ShowS
CompletionContext -> String
(Int -> CompletionContext -> ShowS)
-> (CompletionContext -> String)
-> ([CompletionContext] -> ShowS)
-> Show CompletionContext
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CompletionContext -> ShowS
showsPrec :: Int -> CompletionContext -> ShowS
$cshow :: CompletionContext -> String
show :: CompletionContext -> String
$cshowList :: [CompletionContext] -> ShowS
showList :: [CompletionContext] -> ShowS
Show, CompletionContext -> CompletionContext -> Bool
(CompletionContext -> CompletionContext -> Bool)
-> (CompletionContext -> CompletionContext -> Bool)
-> Eq CompletionContext
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CompletionContext -> CompletionContext -> Bool
== :: CompletionContext -> CompletionContext -> Bool
$c/= :: CompletionContext -> CompletionContext -> Bool
/= :: CompletionContext -> CompletionContext -> Bool
Eq)
deriveJSON lspOptions ''CompletionContext
makeExtendingDatatype "CompletionParams"
[ ''TextDocumentPositionParams
, ''WorkDoneProgressParams
, ''PartialResultParams
]
[ ("_context", [t| Maybe CompletionContext |]) ]
deriveJSON lspOptions ''CompletionParams