Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data Editor
- focused :: Lens' Editor Int
- buffers :: Lens' Editor [Buffer]
- exiting :: Lens' Editor Bool
- ext :: forall a. (Show a, Typeable a, Default a) => Lens' Editor a
- allBufExt :: forall a. (Show a, Typeable a) => Traversal' Editor (Maybe a)
- bufExt :: forall a. (Show a, Typeable a, Default a) => Lens' Buffer a
- focusedBuf :: Lens' Editor Buffer
- range :: Range -> Lens' Buffer YiString
Accessing/Storing state
This is the primary state of the editor.
focused
is the index of the currently selected buffer (this will likely change)
buffers
is a lens into all buffers.
exiting
Whether the editor is in the process of exiting. Can be set inside an Action
:
exiting .= True
ext :: forall a. (Show a, Typeable a, Default a) => Lens' Editor a Source #
ext
is a lens which will focus the extension state that matches the type
inferred as the focal point. It's a little bit of magic, if you treat the
focus as a member of your extension state it should just work out.
This lens falls back on the extension's Default
instance (when getting) if
nothing has yet been stored.
allBufExt :: forall a. (Show a, Typeable a) => Traversal' Editor (Maybe a) Source #
A lens over the extensions of all buffers. This is useful for setting defaults or altering extension state across all buffers.
bufExt :: forall a. (Show a, Typeable a, Default a) => Lens' Buffer a Source #
bufExt
is a lens which will focus a given extension's state within a
buffer (within a BufAction
). The lens will automagically focus
the required extension by using type inference. It's a little bit of magic,
if you treat the focus as a member of your extension state it should just
work out.
This lens falls back on the extension's Default
instance (when getting) if
nothing has yet been stored.
focusedBuf :: Lens' Editor Buffer Source #
focusedBuf
is a lens which focuses the currently selected buffer.