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

Ribosome.Data.ScratchOptions

Description

Scratch buffer configuration.

Synopsis

Documentation

data ScratchOptions Source #

Configure the visual properties of a scratch buffer. If the option float is specified, the buffer will be opened in a floating window.

Constructors

ScratchOptions 

Fields

  • tab :: Bool

    Whether to open the buffer in a new tab.

  • vertical :: Bool

    Whether to split the current window vertically, only relevant for non-floating windows.

  • wrap :: Bool

    Whether to set the wrap option in the window, to disable breaking long lines.

  • focus :: Bool

    Whether to move the cursor to the window after opening it.

  • resize :: Bool

    Whether to adapt the buffer's size to the number of lines, for horizontal splits.

  • bottom :: Bool

    Whether to place the window at the bottom of the stack, only relevant for non-floating windows.

  • modify :: Bool

    Whether to set the modifiable option for the buffer.

  • float :: Maybe FloatOptions

    If Just, creates a floating window with the given config.

  • size :: Maybe Int

    The initial size of the window.

  • maxSize :: Maybe Int

    When resizing automatically, do not exceed this size.

  • syntax :: [Syntax]

    A set of syntax rules to apply to the buffer.

  • mappings :: [Mapping]

    A set of key mappings to define buffer-locally. See Ribosome.Mappings.

  • filetype :: Maybe Text

    The value for the filetype option.

  • name :: ScratchId

    The ID of the scratch buffer.

Instances

Instances details
Generic ScratchOptions Source # 
Instance details

Defined in Ribosome.Data.ScratchOptions

Associated Types

type Rep ScratchOptions :: Type -> Type #

Show ScratchOptions Source # 
Instance details

Defined in Ribosome.Data.ScratchOptions

Default ScratchOptions Source # 
Instance details

Defined in Ribosome.Data.ScratchOptions

Methods

def :: ScratchOptions #

Eq ScratchOptions Source # 
Instance details

Defined in Ribosome.Data.ScratchOptions

type Rep ScratchOptions Source # 
Instance details

Defined in Ribosome.Data.ScratchOptions

type Rep ScratchOptions = D1 ('MetaData "ScratchOptions" "Ribosome.Data.ScratchOptions" "ribosome-0.9.9.9-9qviHqnn5IlBIAvGWfH18d" 'False) (C1 ('MetaCons "ScratchOptions" 'PrefixI 'True) (((S1 ('MetaSel ('Just "tab") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: (S1 ('MetaSel ('Just "vertical") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "wrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool))) :*: ((S1 ('MetaSel ('Just "focus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "resize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)) :*: (S1 ('MetaSel ('Just "bottom") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "modify") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)))) :*: ((S1 ('MetaSel ('Just "float") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe FloatOptions)) :*: (S1 ('MetaSel ('Just "size") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Int)) :*: S1 ('MetaSel ('Just "maxSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Int)))) :*: ((S1 ('MetaSel ('Just "syntax") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Syntax]) :*: S1 ('MetaSel ('Just "mappings") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Mapping])) :*: (S1 ('MetaSel ('Just "filetype") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ScratchId))))))

scratch :: ScratchId -> ScratchOptions Source #

The default configuration, setting all flags to False except for $sel:resize:ScratchOptions and $sel:bottom:ScratchOptions, and everything else to mempty.