{-# OPTIONS_GHC -Wno-unused-imports #-}
{-# OPTIONS_GHC -Wno-unused-matches #-}
{-# OPTIONS_GHC -Wno-deprecations #-}
module Language.LSP.Protocol.Internal.Types.CompletionOptions where
import Control.DeepSeq
import Data.Hashable
import GHC.Generics
import Language.LSP.Protocol.Utils.Misc
import Prettyprinter
import qualified Data.Aeson as Aeson
import qualified Data.Row as Row
import qualified Data.Row.Aeson as Aeson
import qualified Data.Row.Hashable as Hashable
import qualified Data.Text
import qualified Language.LSP.Protocol.Types.Common
data CompletionOptions = CompletionOptions
{
CompletionOptions -> Maybe Bool
_workDoneProgress :: (Maybe Bool)
,
CompletionOptions -> Maybe [Text]
_triggerCharacters :: (Maybe [Data.Text.Text])
,
CompletionOptions -> Maybe [Text]
_allCommitCharacters :: (Maybe [Data.Text.Text])
,
CompletionOptions -> Maybe Bool
_resolveProvider :: (Maybe Bool)
,
CompletionOptions
-> Maybe
(Rec
(Extend "labelDetailsSupport" (Maybe Bool) ('R '[]) .+ 'R '[]))
_completionItem :: (Maybe (Row.Rec ("labelDetailsSupport" Row..== (Maybe Bool) Row..+ Row.Empty)))
}
deriving stock (Int -> CompletionOptions -> ShowS
[CompletionOptions] -> ShowS
CompletionOptions -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CompletionOptions] -> ShowS
$cshowList :: [CompletionOptions] -> ShowS
show :: CompletionOptions -> String
$cshow :: CompletionOptions -> String
showsPrec :: Int -> CompletionOptions -> ShowS
$cshowsPrec :: Int -> CompletionOptions -> ShowS
Show, CompletionOptions -> CompletionOptions -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CompletionOptions -> CompletionOptions -> Bool
$c/= :: CompletionOptions -> CompletionOptions -> Bool
== :: CompletionOptions -> CompletionOptions -> Bool
$c== :: CompletionOptions -> CompletionOptions -> Bool
Eq, Eq CompletionOptions
CompletionOptions -> CompletionOptions -> Bool
CompletionOptions -> CompletionOptions -> Ordering
CompletionOptions -> CompletionOptions -> CompletionOptions
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
min :: CompletionOptions -> CompletionOptions -> CompletionOptions
$cmin :: CompletionOptions -> CompletionOptions -> CompletionOptions
max :: CompletionOptions -> CompletionOptions -> CompletionOptions
$cmax :: CompletionOptions -> CompletionOptions -> CompletionOptions
>= :: CompletionOptions -> CompletionOptions -> Bool
$c>= :: CompletionOptions -> CompletionOptions -> Bool
> :: CompletionOptions -> CompletionOptions -> Bool
$c> :: CompletionOptions -> CompletionOptions -> Bool
<= :: CompletionOptions -> CompletionOptions -> Bool
$c<= :: CompletionOptions -> CompletionOptions -> Bool
< :: CompletionOptions -> CompletionOptions -> Bool
$c< :: CompletionOptions -> CompletionOptions -> Bool
compare :: CompletionOptions -> CompletionOptions -> Ordering
$ccompare :: CompletionOptions -> CompletionOptions -> Ordering
Ord, forall x. Rep CompletionOptions x -> CompletionOptions
forall x. CompletionOptions -> Rep CompletionOptions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CompletionOptions x -> CompletionOptions
$cfrom :: forall x. CompletionOptions -> Rep CompletionOptions x
Generic)
deriving anyclass (CompletionOptions -> ()
forall a. (a -> ()) -> NFData a
rnf :: CompletionOptions -> ()
$crnf :: CompletionOptions -> ()
NFData, Eq CompletionOptions
Int -> CompletionOptions -> Int
CompletionOptions -> Int
forall a. Eq a -> (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: CompletionOptions -> Int
$chash :: CompletionOptions -> Int
hashWithSalt :: Int -> CompletionOptions -> Int
$chashWithSalt :: Int -> CompletionOptions -> Int
Hashable)
deriving forall ann. [CompletionOptions] -> Doc ann
forall ann. CompletionOptions -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
prettyList :: forall ann. [CompletionOptions] -> Doc ann
$cprettyList :: forall ann. [CompletionOptions] -> Doc ann
pretty :: forall ann. CompletionOptions -> Doc ann
$cpretty :: forall ann. CompletionOptions -> Doc ann
Pretty via (ViaJSON CompletionOptions)
instance Aeson.ToJSON CompletionOptions where
toJSON :: CompletionOptions -> Value
toJSON (CompletionOptions Maybe Bool
arg0 Maybe [Text]
arg1 Maybe [Text]
arg2 Maybe Bool
arg3 Maybe
(Rec
(Extend "labelDetailsSupport" (Maybe Bool) ('R '[]) .+ 'R '[]))
arg4) = [Pair] -> Value
Aeson.object forall a b. (a -> b) -> a -> b
$ forall (t :: * -> *) a. Foldable t => t [a] -> [a]
concat forall a b. (a -> b) -> a -> b
$ [String
"workDoneProgress" forall kv v. (KeyValue kv, ToJSON v) => String -> Maybe v -> [kv]
Language.LSP.Protocol.Types.Common..=? Maybe Bool
arg0
,String
"triggerCharacters" forall kv v. (KeyValue kv, ToJSON v) => String -> Maybe v -> [kv]
Language.LSP.Protocol.Types.Common..=? Maybe [Text]
arg1
,String
"allCommitCharacters" forall kv v. (KeyValue kv, ToJSON v) => String -> Maybe v -> [kv]
Language.LSP.Protocol.Types.Common..=? Maybe [Text]
arg2
,String
"resolveProvider" forall kv v. (KeyValue kv, ToJSON v) => String -> Maybe v -> [kv]
Language.LSP.Protocol.Types.Common..=? Maybe Bool
arg3
,String
"completionItem" forall kv v. (KeyValue kv, ToJSON v) => String -> Maybe v -> [kv]
Language.LSP.Protocol.Types.Common..=? Maybe
(Rec
(Extend "labelDetailsSupport" (Maybe Bool) ('R '[]) .+ 'R '[]))
arg4]
instance Aeson.FromJSON CompletionOptions where
parseJSON :: Value -> Parser CompletionOptions
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
Aeson.withObject String
"CompletionOptions" forall a b. (a -> b) -> a -> b
$ \Object
arg -> Maybe Bool
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Bool
-> Maybe
(Rec
(Extend "labelDetailsSupport" (Maybe Bool) ('R '[]) .+ 'R '[]))
-> CompletionOptions
CompletionOptions forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
arg forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Aeson..:! Key
"workDoneProgress" forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
arg forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Aeson..:! Key
"triggerCharacters" forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
arg forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Aeson..:! Key
"allCommitCharacters" forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
arg forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Aeson..:! Key
"resolveProvider" forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
arg forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Aeson..:! Key
"completionItem"