ribosome-0.9.9.9: Neovim plugin framework for Polysemy
Safe HaskellSafe-Inferred
LanguageHaskell2010

Ribosome.Effect.Settings

Description

The effect Settings abstracts Neovim variables

Synopsis

Documentation

data Settings :: Effect where Source #

This effects abstracts Neovim variables with associated defaults.

Constructors

Get :: MsgpackDecode a => Setting a -> Settings m a

Get the value of the setting's Neovim variable or return the default if it is undefined.

Update :: MsgpackEncode a => Setting a -> a -> Settings m ()

Set the value of the setting's Neovim variable.

get :: forall a r. MsgpackDecode a => Member Settings r => Setting a -> Sem r a Source #

Get the value of the setting's Neovim variable or return the default if it is undefined.

update :: forall a r. MsgpackEncode a => Member Settings r => Setting a -> a -> Sem r () Source #

Set the value of the setting's Neovim variable.

or :: MsgpackDecode a => Member (Settings !! SettingError) r => a -> Setting a -> Sem r a Source #

Get the setting's value or return the supplied fallback value if the Neovim variable is undefined and the setting has no default value.

maybe :: MsgpackDecode a => Member (Settings !! SettingError) r => Setting a -> Sem r (Maybe a) Source #

Get Just the setting's value or return Nothing if the Neovim variable is undefined and the setting has no default value.