Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Data types and combinators for Ribosome.Api.Syntax.
Synopsis
- data Syntax = Syntax {
- syntaxItems :: [SyntaxItem]
- syntaxHighlights :: [Highlight]
- syntaxHiLinks :: [HiLink]
- data HiLink = HiLink {}
- data Highlight = Highlight {}
- data SyntaxItem = SyntaxItem {}
- data SyntaxItemDetail
- = Keyword { }
- | Match {
- matchGroup :: Text
- matchPattern :: Text
- | Region { }
- | Verbatim { }
- syntaxItem :: SyntaxItemDetail -> SyntaxItem
- syntaxKeyword :: Text -> Text -> SyntaxItem
- syntaxMatch :: Text -> Text -> SyntaxItem
- syntaxRegionOffset :: Text -> Text -> Text -> Maybe Text -> Text -> Text -> SyntaxItem
- syntaxRegion :: Text -> Text -> Text -> Maybe Text -> SyntaxItem
- syntaxVerbatim :: Text -> SyntaxItem
- syntaxHighlight :: Text -> [(Text, Text)] -> Highlight
Documentation
A set of syntax settings, consisting of syntax items like keyword
and match
, highlights and highlight links.
Syntax | |
|
Instances
Generic Syntax Source # | |
Show Syntax Source # | |
Default Syntax Source # | |
Defined in Ribosome.Data.Syntax | |
Eq Syntax Source # | |
type Rep Syntax Source # | |
Defined in Ribosome.Data.Syntax type Rep Syntax = D1 ('MetaData "Syntax" "Ribosome.Data.Syntax" "ribosome-0.9.9.9-9qviHqnn5IlBIAvGWfH18d" 'False) (C1 ('MetaCons "Syntax" 'PrefixI 'True) (S1 ('MetaSel ('Just "syntaxItems") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [SyntaxItem]) :*: (S1 ('MetaSel ('Just "syntaxHighlights") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Highlight]) :*: S1 ('MetaSel ('Just "syntaxHiLinks") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [HiLink])))) |
Options for a :highlight link
command.
Options for a highlight group.
Instances
data SyntaxItem Source #
A syntax item like keyword
or match
, bundled with options for the :syntax
command.
Instances
Show SyntaxItem Source # | |
Defined in Ribosome.Data.Syntax showsPrec :: Int -> SyntaxItem -> ShowS # show :: SyntaxItem -> String # showList :: [SyntaxItem] -> ShowS # | |
Eq SyntaxItem Source # | |
Defined in Ribosome.Data.Syntax (==) :: SyntaxItem -> SyntaxItem -> Bool # (/=) :: SyntaxItem -> SyntaxItem -> Bool # |
data SyntaxItemDetail Source #
Different kinds of syntax items.
Keyword | |
Match | |
| |
Region | |
| |
Verbatim | |
Instances
Show SyntaxItemDetail Source # | |
Defined in Ribosome.Data.Syntax showsPrec :: Int -> SyntaxItemDetail -> ShowS # show :: SyntaxItemDetail -> String # showList :: [SyntaxItemDetail] -> ShowS # | |
Eq SyntaxItemDetail Source # | |
Defined in Ribosome.Data.Syntax (==) :: SyntaxItemDetail -> SyntaxItemDetail -> Bool # (/=) :: SyntaxItemDetail -> SyntaxItemDetail -> Bool # |
syntaxItem :: SyntaxItemDetail -> SyntaxItem Source #
Construct a default SyntaxItem
from a SyntaxItemDetail
.
syntaxKeyword :: Text -> Text -> SyntaxItem Source #
Construct a simple keyword syntax item.
syntaxMatch :: Text -> Text -> SyntaxItem Source #
Construct a simple match syntax item.
syntaxRegionOffset :: Text -> Text -> Text -> Maybe Text -> Text -> Text -> SyntaxItem Source #
Construct a region syntax item with offsets.
syntaxRegion :: Text -> Text -> Text -> Maybe Text -> SyntaxItem Source #
Construct a simple region syntax item.
syntaxVerbatim :: Text -> SyntaxItem Source #
Construct a simple verbatim syntax item.