rasa-ext-style-0.1.4: Rasa Ext managing rendering styles

Safe HaskellNone
LanguageHaskell2010

Rasa.Ext.Style

Synopsis

Documentation

style :: Action () Source #

The main export for the style extension. Add this to your user config.

e.g.

rasa $ do
   style
   ...

styles :: HasBufExts s => Lens' s [Span CrdRange Style] Source #

A lens over the styles stored in the current buffer.

addStyle :: CrdRange -> Style -> BufAction () Source #

Applies a style over a given range in the buffer's style list.

fg :: Color -> Style Source #

Create a new Style with the given Color as the foreground.

bg :: Color -> Style Source #

Create a new Style with the given Color as the background.

data Color Source #

These represent the possible colors for fg or bg. DefColor represents the terminal's default color.

Instances

Eq Color Source # 

Methods

(==) :: Color -> Color -> Bool #

(/=) :: Color -> Color -> Bool #

Show Color Source # 

Methods

showsPrec :: Int -> Color -> ShowS #

show :: Color -> String #

showList :: [Color] -> ShowS #

data Flair Source #

These represent the possible extra attributes which may be applied. DefFlair represents the terminal's default text attributes.

Instances

Eq Flair Source # 

Methods

(==) :: Flair -> Flair -> Bool #

(/=) :: Flair -> Flair -> Bool #

Show Flair Source # 

Methods

showsPrec :: Int -> Flair -> ShowS #

show :: Flair -> String #

showList :: [Flair] -> ShowS #

newtype Style Source #

A container which holds a foreground color, background color, and a flair. a Nothing represents that we should not change that attribute.

Constructors

Style (Maybe Color, Maybe Color, Maybe Flair) 

Instances

Eq Style Source # 

Methods

(==) :: Style -> Style -> Bool #

(/=) :: Style -> Style -> Bool #

Show Style Source # 

Methods

showsPrec :: Int -> Style -> ShowS #

show :: Style -> String #

showList :: [Style] -> ShowS #

Monoid Style Source #

The monoid instance replaces any attributes which have a Just in the new Style and persists any that are Nothing in the new style (using Alternative for Maybe)

Methods

mempty :: Style #

mappend :: Style -> Style -> Style #

mconcat :: [Style] -> Style #

Default Style Source # 

Methods

def :: Style #