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

Ribosome.Effect.Scratch

Description

Scratch buffers

Synopsis

Documentation

data Scratch :: Effect where Source #

This effect manages scratch buffers, that is, transient buffers displaying text not associated with a file. See ScratchOptions for configuration.

Constructors

Show :: Foldable t => t Text -> ScratchOptions -> Scratch m ScratchState

Open a new scratch buffer and set its content to the supplied text.

Update :: Foldable t => ScratchId -> t Text -> Scratch m ScratchState

Find a previously defined scratch buffer, ensure it is open and set its content to the supplied text.

Delete :: ScratchId -> Scratch m ()

Close a scratch buffer.

Get :: Scratch m [ScratchState]

Return the state of all currently managed scratch buffers.

Find :: ScratchId -> Scratch m (Maybe ScratchState)

Look up a scratch buffer by its ID.

open :: Member Scratch r => ScratchOptions -> Sem r ScratchState Source #

Create an empty scratch buffer.