-- |The 'Settings' API, an effect for accessing Neovim variables with defaults.
module Ribosome.Settings (
  module Ribosome.Data.Setting,
  module Ribosome.Data.SettingError,
  module Ribosome.Settings,
  module Ribosome.Effect.Settings,
) where

import Ribosome.Data.Setting (Setting (..))
import Ribosome.Data.SettingError (SettingError (..))
import Ribosome.Effect.Settings (Settings, get, maybe, or, update)

-- |The vertical margin for floating windows used by @ribosome-menu@.
menuMarginVertical :: Setting Float
menuMarginVertical :: Setting Float
menuMarginVertical =
  Text -> Bool -> Maybe Float -> Setting Float
forall a. Text -> Bool -> Maybe a -> Setting a
Setting Text
"ribosome_menu_margin_vertical" Bool
False (Float -> Maybe Float
forall a. a -> Maybe a
Just Float
0.2)

-- |The horizontal margin for floating windows used by @ribosome-menu@.
menuMarginHorizontal :: Setting Float
menuMarginHorizontal :: Setting Float
menuMarginHorizontal =
  Text -> Bool -> Maybe Float -> Setting Float
forall a. Text -> Bool -> Maybe a -> Setting a
Setting Text
"ribosome_menu_margin_horizontal" Bool
False (Float -> Maybe Float
forall a. a -> Maybe a
Just Float
0.1)