{-# OPTIONS_GHC -Wno-unused-imports #-}
{-# OPTIONS_GHC -Wno-unused-matches #-}
{-# OPTIONS_GHC -Wno-deprecations #-}
module Language.LSP.Protocol.Internal.Types.ServerCompletionItemOptions 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.Aeson as Aeson
import qualified Data.Row.Hashable as Hashable
import qualified Language.LSP.Protocol.Types.Common
data ServerCompletionItemOptions = ServerCompletionItemOptions
{
ServerCompletionItemOptions -> Maybe Bool
_labelDetailsSupport :: (Maybe Bool)
}
deriving stock (Int -> ServerCompletionItemOptions -> ShowS
[ServerCompletionItemOptions] -> ShowS
ServerCompletionItemOptions -> String
(Int -> ServerCompletionItemOptions -> ShowS)
-> (ServerCompletionItemOptions -> String)
-> ([ServerCompletionItemOptions] -> ShowS)
-> Show ServerCompletionItemOptions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ServerCompletionItemOptions -> ShowS
showsPrec :: Int -> ServerCompletionItemOptions -> ShowS
$cshow :: ServerCompletionItemOptions -> String
show :: ServerCompletionItemOptions -> String
$cshowList :: [ServerCompletionItemOptions] -> ShowS
showList :: [ServerCompletionItemOptions] -> ShowS
Show, ServerCompletionItemOptions -> ServerCompletionItemOptions -> Bool
(ServerCompletionItemOptions
-> ServerCompletionItemOptions -> Bool)
-> (ServerCompletionItemOptions
-> ServerCompletionItemOptions -> Bool)
-> Eq ServerCompletionItemOptions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ServerCompletionItemOptions -> ServerCompletionItemOptions -> Bool
== :: ServerCompletionItemOptions -> ServerCompletionItemOptions -> Bool
$c/= :: ServerCompletionItemOptions -> ServerCompletionItemOptions -> Bool
/= :: ServerCompletionItemOptions -> ServerCompletionItemOptions -> Bool
Eq, Eq ServerCompletionItemOptions
Eq ServerCompletionItemOptions =>
(ServerCompletionItemOptions
-> ServerCompletionItemOptions -> Ordering)
-> (ServerCompletionItemOptions
-> ServerCompletionItemOptions -> Bool)
-> (ServerCompletionItemOptions
-> ServerCompletionItemOptions -> Bool)
-> (ServerCompletionItemOptions
-> ServerCompletionItemOptions -> Bool)
-> (ServerCompletionItemOptions
-> ServerCompletionItemOptions -> Bool)
-> (ServerCompletionItemOptions
-> ServerCompletionItemOptions -> ServerCompletionItemOptions)
-> (ServerCompletionItemOptions
-> ServerCompletionItemOptions -> ServerCompletionItemOptions)
-> Ord ServerCompletionItemOptions
ServerCompletionItemOptions -> ServerCompletionItemOptions -> Bool
ServerCompletionItemOptions
-> ServerCompletionItemOptions -> Ordering
ServerCompletionItemOptions
-> ServerCompletionItemOptions -> ServerCompletionItemOptions
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 :: ServerCompletionItemOptions
-> ServerCompletionItemOptions -> Ordering
compare :: ServerCompletionItemOptions
-> ServerCompletionItemOptions -> Ordering
$c< :: ServerCompletionItemOptions -> ServerCompletionItemOptions -> Bool
< :: ServerCompletionItemOptions -> ServerCompletionItemOptions -> Bool
$c<= :: ServerCompletionItemOptions -> ServerCompletionItemOptions -> Bool
<= :: ServerCompletionItemOptions -> ServerCompletionItemOptions -> Bool
$c> :: ServerCompletionItemOptions -> ServerCompletionItemOptions -> Bool
> :: ServerCompletionItemOptions -> ServerCompletionItemOptions -> Bool
$c>= :: ServerCompletionItemOptions -> ServerCompletionItemOptions -> Bool
>= :: ServerCompletionItemOptions -> ServerCompletionItemOptions -> Bool
$cmax :: ServerCompletionItemOptions
-> ServerCompletionItemOptions -> ServerCompletionItemOptions
max :: ServerCompletionItemOptions
-> ServerCompletionItemOptions -> ServerCompletionItemOptions
$cmin :: ServerCompletionItemOptions
-> ServerCompletionItemOptions -> ServerCompletionItemOptions
min :: ServerCompletionItemOptions
-> ServerCompletionItemOptions -> ServerCompletionItemOptions
Ord, (forall x.
ServerCompletionItemOptions -> Rep ServerCompletionItemOptions x)
-> (forall x.
Rep ServerCompletionItemOptions x -> ServerCompletionItemOptions)
-> Generic ServerCompletionItemOptions
forall x.
Rep ServerCompletionItemOptions x -> ServerCompletionItemOptions
forall x.
ServerCompletionItemOptions -> Rep ServerCompletionItemOptions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x.
ServerCompletionItemOptions -> Rep ServerCompletionItemOptions x
from :: forall x.
ServerCompletionItemOptions -> Rep ServerCompletionItemOptions x
$cto :: forall x.
Rep ServerCompletionItemOptions x -> ServerCompletionItemOptions
to :: forall x.
Rep ServerCompletionItemOptions x -> ServerCompletionItemOptions
Generic)
deriving anyclass (ServerCompletionItemOptions -> ()
(ServerCompletionItemOptions -> ())
-> NFData ServerCompletionItemOptions
forall a. (a -> ()) -> NFData a
$crnf :: ServerCompletionItemOptions -> ()
rnf :: ServerCompletionItemOptions -> ()
NFData, Eq ServerCompletionItemOptions
Eq ServerCompletionItemOptions =>
(Int -> ServerCompletionItemOptions -> Int)
-> (ServerCompletionItemOptions -> Int)
-> Hashable ServerCompletionItemOptions
Int -> ServerCompletionItemOptions -> Int
ServerCompletionItemOptions -> Int
forall a. Eq a => (Int -> a -> Int) -> (a -> Int) -> Hashable a
$chashWithSalt :: Int -> ServerCompletionItemOptions -> Int
hashWithSalt :: Int -> ServerCompletionItemOptions -> Int
$chash :: ServerCompletionItemOptions -> Int
hash :: ServerCompletionItemOptions -> Int
Hashable)
deriving (forall ann. ServerCompletionItemOptions -> Doc ann)
-> (forall ann. [ServerCompletionItemOptions] -> Doc ann)
-> Pretty ServerCompletionItemOptions
forall ann. [ServerCompletionItemOptions] -> Doc ann
forall ann. ServerCompletionItemOptions -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
$cpretty :: forall ann. ServerCompletionItemOptions -> Doc ann
pretty :: forall ann. ServerCompletionItemOptions -> Doc ann
$cprettyList :: forall ann. [ServerCompletionItemOptions] -> Doc ann
prettyList :: forall ann. [ServerCompletionItemOptions] -> Doc ann
Pretty via (ViaJSON ServerCompletionItemOptions)
instance Aeson.ToJSON ServerCompletionItemOptions where
toJSON :: ServerCompletionItemOptions -> Value
toJSON (ServerCompletionItemOptions Maybe Bool
arg0) = [Pair] -> Value
Aeson.object ([Pair] -> Value) -> [Pair] -> Value
forall a b. (a -> b) -> a -> b
$ [[Pair]] -> [Pair]
forall (t :: * -> *) a. Foldable t => t [a] -> [a]
concat ([[Pair]] -> [Pair]) -> [[Pair]] -> [Pair]
forall a b. (a -> b) -> a -> b
$ [String
"labelDetailsSupport" String -> Maybe Bool -> [Pair]
forall e kv v.
(KeyValue e kv, ToJSON v) =>
String -> Maybe v -> [kv]
Language.LSP.Protocol.Types.Common..=? Maybe Bool
arg0]
instance Aeson.FromJSON ServerCompletionItemOptions where
parseJSON :: Value -> Parser ServerCompletionItemOptions
parseJSON = String
-> (Object -> Parser ServerCompletionItemOptions)
-> Value
-> Parser ServerCompletionItemOptions
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Aeson.withObject String
"ServerCompletionItemOptions" ((Object -> Parser ServerCompletionItemOptions)
-> Value -> Parser ServerCompletionItemOptions)
-> (Object -> Parser ServerCompletionItemOptions)
-> Value
-> Parser ServerCompletionItemOptions
forall a b. (a -> b) -> a -> b
$ \Object
arg -> Maybe Bool -> ServerCompletionItemOptions
ServerCompletionItemOptions (Maybe Bool -> ServerCompletionItemOptions)
-> Parser (Maybe Bool) -> Parser ServerCompletionItemOptions
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
arg Object -> Key -> Parser (Maybe Bool)
forall v. FromJSON v => Object -> Key -> Parser (Maybe v)
Language.LSP.Protocol.Types.Common..:!? Key
"labelDetailsSupport"