diff --git a/README.md b/README.md
index ca58c5d9a..f6378d3b8 100644
--- a/README.md
+++ b/README.md
@@ -230,17 +230,22 @@ formatter outputs raw tokens. The latter is useful for debugging lexers.
### Styles
-Chroma styles use the [same syntax](http://pygments.org/docs/styles/) as Pygments.
+Chroma styles are defined in XML. The style entries use the
+[same syntax](http://pygments.org/docs/styles/) as Pygments.
-All Pygments styles have been converted to Chroma using the `_tools/style.py` script.
+All Pygments styles have been converted to Chroma using the `_tools/style.py`
+script.
-When you work with one of [Chroma's styles](https://github.com/alecthomas/chroma/tree/master/styles), know that the `chroma.Background` token type provides the default style for tokens. It does so by defining a foreground color and background color.
+When you work with one of [Chroma's styles](https://github.com/alecthomas/chroma/tree/master/styles),
+know that the `Background` token type provides the default style for tokens. It does so
+by defining a foreground color and background color.
-For example, this gives each token name not defined in the style a default color of `#f8f8f8` and uses `#000000` for the highlighted code block's background:
+For example, this gives each token name not defined in the style a default color
+of `#f8f8f8` and uses `#000000` for the highlighted code block's background:
-~~~go
-chroma.Background: "#f8f8f2 bg:#000000",
-~~~
+```xml
+
+```
Also, token types in a style file are hierarchical. For instance, when `CommentSpecial` is not defined, Chroma uses the token style from `Comment`. So when several comment tokens use the same color, you'll only need to define `Comment` and override the one that has a different color.
diff --git a/bin/.stringer-0.1.11.pkg b/bin/.enumer-1.5.7.pkg
similarity index 100%
rename from bin/.stringer-0.1.11.pkg
rename to bin/.enumer-1.5.7.pkg
diff --git a/bin/enumer b/bin/enumer
new file mode 120000
index 000000000..4e25d678c
--- /dev/null
+++ b/bin/enumer
@@ -0,0 +1 @@
+.enumer-1.5.7.pkg
\ No newline at end of file
diff --git a/bin/stringer b/bin/stringer
deleted file mode 120000
index 51f658623..000000000
--- a/bin/stringer
+++ /dev/null
@@ -1 +0,0 @@
-.stringer-0.1.11.pkg
\ No newline at end of file
diff --git a/formatters/html/html.go b/formatters/html/html.go
index 8b682b72c..6dc54d927 100644
--- a/formatters/html/html.go
+++ b/formatters/html/html.go
@@ -520,7 +520,7 @@ func (f *Formatter) styleToCSS(style *chroma.Style) map[chroma.TokenType]string
classes[chroma.LineNumbersTable] = lineNumbersStyle + classes[chroma.LineNumbersTable]
classes[chroma.LineTable] = "border-spacing: 0; padding: 0; margin: 0; border: 0;" + classes[chroma.LineTable]
classes[chroma.LineTableTD] = "vertical-align: top; padding: 0; margin: 0; border: 0;" + classes[chroma.LineTableTD]
- classes[chroma.LineLink] = "outline: none; text-decoration:none; color:inherit" + classes[chroma.LineLink]
+ classes[chroma.LineLink] = "outline: none; text-decoration: none; color: inherit" + classes[chroma.LineLink]
return classes
}
diff --git a/formatters/html/html_test.go b/formatters/html/html_test.go
index 174ee9398..3ed1c36b3 100644
--- a/formatters/html/html_test.go
+++ b/formatters/html/html_test.go
@@ -222,7 +222,7 @@ func TestTableLinkeableLineNumbers(t *testing.T) {
assert.Contains(t, buf.String(), `id="line1">1`)
assert.Contains(t, buf.String(), `id="line5">5`)
- assert.Contains(t, buf.String(), `/* LineLinks */ .chroma .lnlinks { outline: none; text-decoration:none; color:inherit }`, buf.String())
+ assert.Contains(t, buf.String(), `/* LineLink */ .chroma .lnlinks { outline: none; text-decoration: none; color: inherit }`, buf.String())
}
func TestTableLineNumberSpacing(t *testing.T) {
diff --git a/serialise.go b/serialise.go
index 084396b55..2b727db8a 100644
--- a/serialise.go
+++ b/serialise.go
@@ -372,13 +372,12 @@ func (t *TokenType) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
if err := d.DecodeElement(&el, &start); err != nil {
return err
}
- for tt, text := range _TokenType_map {
- if text == el.Type {
- *t = tt
- return nil
- }
+ tt, err := TokenTypeString(el.Type)
+ if err != nil {
+ return err
}
- return fmt.Errorf("unknown TokenType %q", el.Type)
+ *t = tt
+ return nil
}
func (t TokenType) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
diff --git a/style.go b/style.go
index 8edea1325..a739c1957 100644
--- a/style.go
+++ b/style.go
@@ -1,7 +1,10 @@
package chroma
import (
+ "encoding/xml"
"fmt"
+ "io"
+ "sort"
"strings"
)
@@ -49,6 +52,10 @@ type StyleEntry struct {
NoInherit bool
}
+func (s StyleEntry) MarshalText() ([]byte, error) {
+ return []byte(s.String()), nil
+}
+
func (s StyleEntry) String() string {
out := []string{}
if s.Bold != Pass {
@@ -216,6 +223,13 @@ func (s *StyleBuilder) Build() (*Style, error) {
// StyleEntries mapping TokenType to colour definition.
type StyleEntries map[TokenType]string
+// NewXMLStyle parses an XML style definition.
+func NewXMLStyle(r io.Reader) (*Style, error) {
+ dec := xml.NewDecoder(r)
+ style := &Style{}
+ return style, dec.Decode(style)
+}
+
// NewStyle creates a new style definition.
func NewStyle(name string, entries StyleEntries) (*Style, error) {
return NewStyleBuilder(name).AddAll(entries).Build()
@@ -239,6 +253,89 @@ type Style struct {
parent *Style
}
+func (s *Style) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
+ if s.parent != nil {
+ return fmt.Errorf("cannot marshal style with parent")
+ }
+ start.Name = xml.Name{Local: "style"}
+ start.Attr = []xml.Attr{{Name: xml.Name{Local: "name"}, Value: s.Name}}
+ if err := e.EncodeToken(start); err != nil {
+ return err
+ }
+ sorted := make([]TokenType, 0, len(s.entries))
+ for ttype := range s.entries {
+ sorted = append(sorted, ttype)
+ }
+ sort.Slice(sorted, func(i, j int) bool { return sorted[i] < sorted[j] })
+ for _, ttype := range sorted {
+ entry := s.entries[ttype]
+ el := xml.StartElement{Name: xml.Name{Local: "entry"}}
+ el.Attr = []xml.Attr{
+ {Name: xml.Name{Local: "type"}, Value: ttype.String()},
+ {Name: xml.Name{Local: "style"}, Value: entry.String()},
+ }
+ if err := e.EncodeToken(el); err != nil {
+ return err
+ }
+ if err := e.EncodeToken(xml.EndElement{Name: el.Name}); err != nil {
+ return err
+ }
+ }
+ return e.EncodeToken(xml.EndElement{Name: start.Name})
+}
+
+func (s *Style) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
+ for _, attr := range start.Attr {
+ if attr.Name.Local == "name" {
+ s.Name = attr.Value
+ } else {
+ return fmt.Errorf("unexpected attribute %s", attr.Name.Local)
+ }
+ }
+ if s.Name == "" {
+ return fmt.Errorf("missing style name attribute")
+ }
+ s.entries = map[TokenType]StyleEntry{}
+ for {
+ tok, err := d.Token()
+ if err != nil {
+ return err
+ }
+ switch el := tok.(type) {
+ case xml.StartElement:
+ if el.Name.Local != "entry" {
+ return fmt.Errorf("unexpected element %s", el.Name.Local)
+ }
+ var ttype TokenType
+ var entry StyleEntry
+ for _, attr := range el.Attr {
+ switch attr.Name.Local {
+ case "type":
+ ttype, err = TokenTypeString(attr.Value)
+ if err != nil {
+ return err
+ }
+
+ case "style":
+ entry, err = ParseStyleEntry(attr.Value)
+ if err != nil {
+ return err
+ }
+
+ default:
+ return fmt.Errorf("unexpected attribute %s", attr.Name.Local)
+ }
+ }
+ s.entries[ttype] = entry
+
+ case xml.EndElement:
+ if el.Name.Local == start.Name.Local {
+ return nil
+ }
+ }
+ }
+}
+
// Types that are styled.
func (s *Style) Types() []TokenType {
dedupe := map[TokenType]bool{}
@@ -319,6 +416,15 @@ func (s *Style) synthesisable(ttype TokenType) bool {
return ttype == LineHighlight || ttype == LineNumbers || ttype == LineNumbersTable
}
+// MustParseStyleEntry parses a Pygments style entry or panics.
+func MustParseStyleEntry(entry string) StyleEntry {
+ out, err := ParseStyleEntry(entry)
+ if err != nil {
+ panic(err)
+ }
+ return out
+}
+
// ParseStyleEntry parses a Pygments style entry.
func ParseStyleEntry(entry string) (StyleEntry, error) { // nolint: gocyclo
out := StyleEntry{}
diff --git a/style_test.go b/style_test.go
index 7e4835fe3..d3eee833e 100644
--- a/style_test.go
+++ b/style_test.go
@@ -1,6 +1,7 @@
package chroma
import (
+ "encoding/xml"
"testing"
assert "github.com/alecthomas/assert/v2"
@@ -101,3 +102,21 @@ func TestStyleBuilderTransform(t *testing.T) {
assert.Equal(t, "#ff0000", orig.Get(NameVariable).Colour.String())
assert.Equal(t, "#ff3300", deriv.Get(NameVariableGlobal).Colour.String())
}
+
+func TestStyleMarshaller(t *testing.T) {
+ expected, err := NewStyle("test", StyleEntries{
+ Whitespace: "bg:#ffffff",
+ Text: "#000000 underline",
+ })
+ assert.NoError(t, err)
+ data, err := xml.MarshalIndent(expected, "", " ")
+ assert.NoError(t, err)
+ assert.Equal(t, ``, string(data))
+ actual := &Style{}
+ err = xml.Unmarshal(data, actual)
+ assert.NoError(t, err)
+ assert.Equal(t, expected, actual)
+}
diff --git a/styles/abap.go b/styles/abap.go
deleted file mode 100644
index 2807dc78f..000000000
--- a/styles/abap.go
+++ /dev/null
@@ -1,18 +0,0 @@
-package styles
-
-import (
- "github.com/alecthomas/chroma/v2"
-)
-
-// Abap style.
-var Abap = Register(chroma.MustNewStyle("abap", chroma.StyleEntries{
- chroma.Comment: "italic #888",
- chroma.CommentSpecial: "#888",
- chroma.Keyword: "#00f",
- chroma.OperatorWord: "#00f",
- chroma.Name: "#000",
- chroma.LiteralNumber: "#3af",
- chroma.LiteralString: "#5a2",
- chroma.Error: "#F00",
- chroma.Background: " bg:#ffffff",
-}))
diff --git a/styles/abap.xml b/styles/abap.xml
new file mode 100644
index 000000000..36ea2f1d0
--- /dev/null
+++ b/styles/abap.xml
@@ -0,0 +1,11 @@
+
\ No newline at end of file
diff --git a/styles/algol.go b/styles/algol.go
deleted file mode 100644
index b38715eec..000000000
--- a/styles/algol.go
+++ /dev/null
@@ -1,25 +0,0 @@
-package styles
-
-import (
- "github.com/alecthomas/chroma/v2"
-)
-
-// Algol style.
-var Algol = Register(chroma.MustNewStyle("algol", chroma.StyleEntries{
- chroma.Comment: "italic #888",
- chroma.CommentPreproc: "bold noitalic #888",
- chroma.CommentSpecial: "bold noitalic #888",
- chroma.Keyword: "underline bold",
- chroma.KeywordDeclaration: "italic",
- chroma.NameBuiltin: "bold italic",
- chroma.NameBuiltinPseudo: "bold italic",
- chroma.NameNamespace: "bold italic #666",
- chroma.NameClass: "bold italic #666",
- chroma.NameFunction: "bold italic #666",
- chroma.NameVariable: "bold italic #666",
- chroma.NameConstant: "bold italic #666",
- chroma.OperatorWord: "bold",
- chroma.LiteralString: "italic #666",
- chroma.Error: "border:#FF0000",
- chroma.Background: " bg:#ffffff",
-}))
diff --git a/styles/algol.xml b/styles/algol.xml
new file mode 100644
index 000000000..e8a6dc1b8
--- /dev/null
+++ b/styles/algol.xml
@@ -0,0 +1,18 @@
+
\ No newline at end of file
diff --git a/styles/algol_nu.go b/styles/algol_nu.go
deleted file mode 100644
index 487086d4a..000000000
--- a/styles/algol_nu.go
+++ /dev/null
@@ -1,25 +0,0 @@
-package styles
-
-import (
- "github.com/alecthomas/chroma/v2"
-)
-
-// AlgolNu style.
-var AlgolNu = Register(chroma.MustNewStyle("algol_nu", chroma.StyleEntries{
- chroma.Comment: "italic #888",
- chroma.CommentPreproc: "bold noitalic #888",
- chroma.CommentSpecial: "bold noitalic #888",
- chroma.Keyword: "bold",
- chroma.KeywordDeclaration: "italic",
- chroma.NameBuiltin: "bold italic",
- chroma.NameBuiltinPseudo: "bold italic",
- chroma.NameNamespace: "bold italic #666",
- chroma.NameClass: "bold italic #666",
- chroma.NameFunction: "bold italic #666",
- chroma.NameVariable: "bold italic #666",
- chroma.NameConstant: "bold italic #666",
- chroma.OperatorWord: "bold",
- chroma.LiteralString: "italic #666",
- chroma.Error: "border:#FF0000",
- chroma.Background: " bg:#ffffff",
-}))
diff --git a/styles/algol_nu.xml b/styles/algol_nu.xml
new file mode 100644
index 000000000..7fa340f32
--- /dev/null
+++ b/styles/algol_nu.xml
@@ -0,0 +1,18 @@
+
\ No newline at end of file
diff --git a/styles/api.go b/styles/api.go
index 8c0dbe078..c532f63d0 100644
--- a/styles/api.go
+++ b/styles/api.go
@@ -1,16 +1,44 @@
package styles
import (
+ "embed" // Imported for side-effects.
+ "io/fs"
"sort"
"github.com/alecthomas/chroma/v2"
)
+//go:embed *.xml
+var embedded embed.FS
+
// Registry of Styles.
-var Registry = map[string]*chroma.Style{}
+var Registry = func() map[string]*chroma.Style {
+ registry := map[string]*chroma.Style{}
+ // Register all embedded styles.
+ files, err := fs.ReadDir(embedded, ".")
+ if err != nil {
+ panic(err)
+ }
+ for _, file := range files {
+ if file.IsDir() {
+ continue
+ }
+ r, err := embedded.Open(file.Name())
+ if err != nil {
+ panic(err)
+ }
+ style, err := chroma.NewXMLStyle(r)
+ if err != nil {
+ panic(err)
+ }
+ registry[style.Name] = style
+ _ = r.Close()
+ }
+ return registry
+}()
// Fallback style. Reassign to change the default fallback style.
-var Fallback = SwapOff
+var Fallback = Registry["swapoff"]
// Register a chroma.Style.
func Register(style *chroma.Style) *chroma.Style {
diff --git a/styles/arduino.go b/styles/arduino.go
deleted file mode 100644
index 3099b7e89..000000000
--- a/styles/arduino.go
+++ /dev/null
@@ -1,25 +0,0 @@
-package styles
-
-import (
- "github.com/alecthomas/chroma/v2"
-)
-
-// Arduino style.
-var Arduino = Register(chroma.MustNewStyle("arduino", chroma.StyleEntries{
- chroma.Error: "#a61717",
- chroma.Comment: "#95a5a6",
- chroma.CommentPreproc: "#728E00",
- chroma.Keyword: "#728E00",
- chroma.KeywordConstant: "#00979D",
- chroma.KeywordPseudo: "#00979D",
- chroma.KeywordReserved: "#00979D",
- chroma.KeywordType: "#00979D",
- chroma.Operator: "#728E00",
- chroma.Name: "#434f54",
- chroma.NameBuiltin: "#728E00",
- chroma.NameFunction: "#D35400",
- chroma.NameOther: "#728E00",
- chroma.LiteralNumber: "#8A7B52",
- chroma.LiteralString: "#7F8C8D",
- chroma.Background: " bg:#ffffff",
-}))
diff --git a/styles/arduino.xml b/styles/arduino.xml
new file mode 100644
index 000000000..d9891dc53
--- /dev/null
+++ b/styles/arduino.xml
@@ -0,0 +1,18 @@
+
\ No newline at end of file
diff --git a/styles/autumn.go b/styles/autumn.go
deleted file mode 100644
index df225005c..000000000
--- a/styles/autumn.go
+++ /dev/null
@@ -1,43 +0,0 @@
-package styles
-
-import (
- "github.com/alecthomas/chroma/v2"
-)
-
-// Autumn style.
-var Autumn = Register(chroma.MustNewStyle("autumn", chroma.StyleEntries{
- chroma.TextWhitespace: "#bbbbbb",
- chroma.Comment: "italic #aaaaaa",
- chroma.CommentPreproc: "noitalic #4c8317",
- chroma.CommentSpecial: "italic #0000aa",
- chroma.Keyword: "#0000aa",
- chroma.KeywordType: "#00aaaa",
- chroma.OperatorWord: "#0000aa",
- chroma.NameBuiltin: "#00aaaa",
- chroma.NameFunction: "#00aa00",
- chroma.NameClass: "underline #00aa00",
- chroma.NameNamespace: "underline #00aaaa",
- chroma.NameVariable: "#aa0000",
- chroma.NameConstant: "#aa0000",
- chroma.NameEntity: "bold #800",
- chroma.NameAttribute: "#1e90ff",
- chroma.NameTag: "bold #1e90ff",
- chroma.NameDecorator: "#888888",
- chroma.LiteralString: "#aa5500",
- chroma.LiteralStringSymbol: "#0000aa",
- chroma.LiteralStringRegex: "#009999",
- chroma.LiteralNumber: "#009999",
- chroma.GenericHeading: "bold #000080",
- chroma.GenericSubheading: "bold #800080",
- chroma.GenericDeleted: "#aa0000",
- chroma.GenericInserted: "#00aa00",
- chroma.GenericError: "#aa0000",
- chroma.GenericEmph: "italic",
- chroma.GenericStrong: "bold",
- chroma.GenericPrompt: "#555555",
- chroma.GenericOutput: "#888888",
- chroma.GenericTraceback: "#aa0000",
- chroma.GenericUnderline: "underline",
- chroma.Error: "#F00 bg:#FAA",
- chroma.Background: " bg:#ffffff",
-}))
diff --git a/styles/autumn.xml b/styles/autumn.xml
new file mode 100644
index 000000000..74d2eae98
--- /dev/null
+++ b/styles/autumn.xml
@@ -0,0 +1,36 @@
+
\ No newline at end of file
diff --git a/styles/average.go b/styles/average.go
deleted file mode 100644
index b1276e2ac..000000000
--- a/styles/average.go
+++ /dev/null
@@ -1,81 +0,0 @@
-package styles
-
-import (
- "github.com/alecthomas/chroma/v2"
-)
-
-// Average style.
-var Average = Register(chroma.MustNewStyle("average", chroma.StyleEntries{
- chroma.Comment: "#757575",
- chroma.CommentHashbang: "#757575",
- chroma.CommentMultiline: "#757575",
- chroma.CommentPreproc: "#757575",
- chroma.CommentSingle: "#757575",
- chroma.CommentSpecial: "#757575",
- chroma.Generic: "#757575",
- chroma.GenericDeleted: "#ec0000",
- chroma.GenericEmph: "#757575 underline",
- chroma.GenericError: "#ec0000",
- chroma.GenericHeading: "#757575 bold",
- chroma.GenericInserted: "#757575 bold",
- chroma.GenericOutput: "#757575",
- chroma.GenericPrompt: "#757575",
- chroma.GenericStrong: "#757575 italic",
- chroma.GenericSubheading: "#757575 bold",
- chroma.GenericTraceback: "#757575",
- chroma.GenericUnderline: "underline",
- chroma.Error: "#ec0000",
- chroma.Keyword: "#ec0000",
- chroma.KeywordConstant: "#ec0000",
- chroma.KeywordDeclaration: "#ec0000",
- chroma.KeywordNamespace: "#ec0000",
- chroma.KeywordPseudo: "#ec0000",
- chroma.KeywordReserved: "#ec0000",
- chroma.KeywordType: "#5f5fff",
- chroma.Literal: "#757575",
- chroma.LiteralDate: "#757575",
- chroma.Name: "#757575",
- chroma.NameAttribute: "#5f5fff",
- chroma.NameBuiltin: "#ec0000",
- chroma.NameBuiltinPseudo: "#757575",
- chroma.NameClass: "#5f5fff",
- chroma.NameConstant: "#008900",
- chroma.NameDecorator: "#008900",
- chroma.NameEntity: "#757575",
- chroma.NameException: "#757575",
- chroma.NameFunction: "#5f5fff",
- chroma.NameLabel: "#ec0000",
- chroma.NameNamespace: "#757575",
- chroma.NameOther: "#757575",
- chroma.NameTag: "#ec0000",
- chroma.NameVariable: "#ec0000",
- chroma.NameVariableClass: "#ec0000",
- chroma.NameVariableGlobal: "#ec0000",
- chroma.NameVariableInstance: "#ec0000",
- chroma.LiteralNumber: "#008900",
- chroma.LiteralNumberBin: "#008900",
- chroma.LiteralNumberFloat: "#008900",
- chroma.LiteralNumberHex: "#008900",
- chroma.LiteralNumberInteger: "#008900",
- chroma.LiteralNumberIntegerLong: "#008900",
- chroma.LiteralNumberOct: "#008900",
- chroma.Operator: "#ec0000",
- chroma.OperatorWord: "#ec0000",
- chroma.Other: "#757575",
- chroma.Punctuation: "#757575",
- chroma.LiteralString: "#008900",
- chroma.LiteralStringBacktick: "#008900",
- chroma.LiteralStringChar: "#008900",
- chroma.LiteralStringDoc: "#008900",
- chroma.LiteralStringDouble: "#008900",
- chroma.LiteralStringEscape: "#008900",
- chroma.LiteralStringHeredoc: "#008900",
- chroma.LiteralStringInterpol: "#008900",
- chroma.LiteralStringOther: "#008900",
- chroma.LiteralStringRegex: "#008900",
- chroma.LiteralStringSingle: "#008900",
- chroma.LiteralStringSymbol: "#008900",
- chroma.Text: "#757575",
- chroma.TextWhitespace: "#757575",
- chroma.Background: " bg:#000000",
-}))
diff --git a/styles/average.xml b/styles/average.xml
new file mode 100644
index 000000000..79bdb95f3
--- /dev/null
+++ b/styles/average.xml
@@ -0,0 +1,74 @@
+
\ No newline at end of file
diff --git a/styles/base16-snazzy.go b/styles/base16-snazzy.go
deleted file mode 100644
index 731dba8d4..000000000
--- a/styles/base16-snazzy.go
+++ /dev/null
@@ -1,81 +0,0 @@
-package styles
-
-import (
- "github.com/alecthomas/chroma/v2"
-)
-
-// Base16Snazzy style
-var Base16Snazzy = Register(chroma.MustNewStyle("base16-snazzy", chroma.StyleEntries{
- chroma.Comment: "#78787e",
- chroma.CommentHashbang: "#78787e",
- chroma.CommentMultiline: "#78787e",
- chroma.CommentPreproc: "#78787e",
- chroma.CommentSingle: "#78787e",
- chroma.CommentSpecial: "#78787e",
- chroma.Generic: "#e2e4e5",
- chroma.GenericDeleted: "#ff5c57",
- chroma.GenericEmph: "#e2e4e5 underline",
- chroma.GenericError: "#ff5c57",
- chroma.GenericHeading: "#e2e4e5 bold",
- chroma.GenericInserted: "#e2e4e5 bold",
- chroma.GenericOutput: "#43454f",
- chroma.GenericPrompt: "#e2e4e5",
- chroma.GenericStrong: "#e2e4e5 italic",
- chroma.GenericSubheading: "#e2e4e5 bold",
- chroma.GenericTraceback: "#e2e4e5",
- chroma.GenericUnderline: "underline",
- chroma.Error: "#ff5c57",
- chroma.Keyword: "#ff6ac1",
- chroma.KeywordConstant: "#ff6ac1",
- chroma.KeywordDeclaration: "#ff5c57",
- chroma.KeywordNamespace: "#ff6ac1",
- chroma.KeywordPseudo: "#ff6ac1",
- chroma.KeywordReserved: "#ff6ac1",
- chroma.KeywordType: "#9aedfe",
- chroma.Literal: "#e2e4e5",
- chroma.LiteralDate: "#e2e4e5",
- chroma.Name: "#e2e4e5",
- chroma.NameAttribute: "#57c7ff",
- chroma.NameBuiltin: "#ff5c57",
- chroma.NameBuiltinPseudo: "#e2e4e5",
- chroma.NameClass: "#f3f99d",
- chroma.NameConstant: "#ff9f43",
- chroma.NameDecorator: "#ff9f43",
- chroma.NameEntity: "#e2e4e5",
- chroma.NameException: "#e2e4e5",
- chroma.NameFunction: "#57c7ff",
- chroma.NameLabel: "#ff5c57",
- chroma.NameNamespace: "#e2e4e5",
- chroma.NameOther: "#e2e4e5",
- chroma.NameTag: "#ff6ac1",
- chroma.NameVariable: "#ff5c57",
- chroma.NameVariableClass: "#ff5c57",
- chroma.NameVariableGlobal: "#ff5c57",
- chroma.NameVariableInstance: "#ff5c57",
- chroma.LiteralNumber: "#ff9f43",
- chroma.LiteralNumberBin: "#ff9f43",
- chroma.LiteralNumberFloat: "#ff9f43",
- chroma.LiteralNumberHex: "#ff9f43",
- chroma.LiteralNumberInteger: "#ff9f43",
- chroma.LiteralNumberIntegerLong: "#ff9f43",
- chroma.LiteralNumberOct: "#ff9f43",
- chroma.Operator: "#ff6ac1",
- chroma.OperatorWord: "#ff6ac1",
- chroma.Other: "#e2e4e5",
- chroma.Punctuation: "#e2e4e5",
- chroma.LiteralString: "#5af78e",
- chroma.LiteralStringBacktick: "#5af78e",
- chroma.LiteralStringChar: "#5af78e",
- chroma.LiteralStringDoc: "#5af78e",
- chroma.LiteralStringDouble: "#5af78e",
- chroma.LiteralStringEscape: "#5af78e",
- chroma.LiteralStringHeredoc: "#5af78e",
- chroma.LiteralStringInterpol: "#5af78e",
- chroma.LiteralStringOther: "#5af78e",
- chroma.LiteralStringRegex: "#5af78e",
- chroma.LiteralStringSingle: "#5af78e",
- chroma.LiteralStringSymbol: "#5af78e",
- chroma.Text: "#e2e4e5",
- chroma.TextWhitespace: "#e2e4e5",
- chroma.Background: " bg:#282a36",
-}))
diff --git a/styles/base16-snazzy.xml b/styles/base16-snazzy.xml
new file mode 100644
index 000000000..a05ba24e5
--- /dev/null
+++ b/styles/base16-snazzy.xml
@@ -0,0 +1,74 @@
+
\ No newline at end of file
diff --git a/styles/borland.go b/styles/borland.go
deleted file mode 100644
index 4d192b188..000000000
--- a/styles/borland.go
+++ /dev/null
@@ -1,33 +0,0 @@
-package styles
-
-import (
- "github.com/alecthomas/chroma/v2"
-)
-
-// Borland style.
-var Borland = Register(chroma.MustNewStyle("borland", chroma.StyleEntries{
- chroma.TextWhitespace: "#bbbbbb",
- chroma.Comment: "italic #008800",
- chroma.CommentPreproc: "noitalic #008080",
- chroma.CommentSpecial: "noitalic bold",
- chroma.LiteralString: "#0000FF",
- chroma.LiteralStringChar: "#800080",
- chroma.LiteralNumber: "#0000FF",
- chroma.Keyword: "bold #000080",
- chroma.OperatorWord: "bold",
- chroma.NameTag: "bold #000080",
- chroma.NameAttribute: "#FF0000",
- chroma.GenericHeading: "#999999",
- chroma.GenericSubheading: "#aaaaaa",
- chroma.GenericDeleted: "bg:#ffdddd #000000",
- chroma.GenericInserted: "bg:#ddffdd #000000",
- chroma.GenericError: "#aa0000",
- chroma.GenericEmph: "italic",
- chroma.GenericStrong: "bold",
- chroma.GenericPrompt: "#555555",
- chroma.GenericOutput: "#888888",
- chroma.GenericTraceback: "#aa0000",
- chroma.GenericUnderline: "underline",
- chroma.Error: "bg:#e3d2d2 #a61717",
- chroma.Background: " bg:#ffffff",
-}))
diff --git a/styles/borland.xml b/styles/borland.xml
new file mode 100644
index 000000000..0d8f574c6
--- /dev/null
+++ b/styles/borland.xml
@@ -0,0 +1,26 @@
+
\ No newline at end of file
diff --git a/styles/bw.go b/styles/bw.go
deleted file mode 100644
index 2f41f208b..000000000
--- a/styles/bw.go
+++ /dev/null
@@ -1,30 +0,0 @@
-package styles
-
-import (
- "github.com/alecthomas/chroma/v2"
-)
-
-// BlackWhite style.
-var BlackWhite = Register(chroma.MustNewStyle("bw", chroma.StyleEntries{
- chroma.Comment: "italic",
- chroma.CommentPreproc: "noitalic",
- chroma.Keyword: "bold",
- chroma.KeywordPseudo: "nobold",
- chroma.KeywordType: "nobold",
- chroma.OperatorWord: "bold",
- chroma.NameClass: "bold",
- chroma.NameNamespace: "bold",
- chroma.NameException: "bold",
- chroma.NameEntity: "bold",
- chroma.NameTag: "bold",
- chroma.LiteralString: "italic",
- chroma.LiteralStringInterpol: "bold",
- chroma.LiteralStringEscape: "bold",
- chroma.GenericHeading: "bold",
- chroma.GenericSubheading: "bold",
- chroma.GenericEmph: "italic",
- chroma.GenericStrong: "bold",
- chroma.GenericPrompt: "bold",
- chroma.Error: "border:#FF0000",
- chroma.Background: " bg:#ffffff",
-}))
diff --git a/styles/bw.xml b/styles/bw.xml
new file mode 100644
index 000000000..fb0e868d1
--- /dev/null
+++ b/styles/bw.xml
@@ -0,0 +1,23 @@
+
\ No newline at end of file
diff --git a/styles/catppuccin-frappe.go b/styles/catppuccin-frappe.go
deleted file mode 100644
index 36f966ac5..000000000
--- a/styles/catppuccin-frappe.go
+++ /dev/null
@@ -1,71 +0,0 @@
-package styles
-
-import (
- "github.com/alecthomas/chroma/v2"
-)
-
-var (
- ctpFrappePink = "#f4b8e4"
- ctpFrappeMauve = "#ca9ee6"
- ctpFrappeRed = "#e78284"
- ctpFrappeMaroon = "#ea999c"
- ctpFrappePeach = "#ef9f76"
- ctpFrappeYellow = "#e5c890"
- ctpFrappeGreen = "#a6d189"
- ctpFrappeSky = "#99d1db"
- ctpFrappeBlue = "#8caaee"
- ctpFrappeLavender = "#babbf1"
- ctpFrappeText = "#c6d0f5"
- ctpFrappeOverlay0 = "#737994"
- ctpFrappeSurface2 = "#626880"
- ctpFrappeSurface0 = "#414559"
- ctpFrappeBase = "#303446"
-)
-
-// CatppuccinFrappe a soothing low-saturation, low-contrast dark pastel theme for the high-spirited
-var CatppuccinFrappe = Register(chroma.MustNewStyle("catppuccin-frappe", chroma.StyleEntries{
- chroma.TextWhitespace: ctpFrappeSurface0,
- chroma.Comment: "italic " + ctpFrappeSurface2,
- chroma.CommentPreproc: ctpFrappeBlue,
- chroma.Keyword: ctpFrappeMauve,
- chroma.KeywordPseudo: "bold " + ctpFrappeMauve,
- chroma.KeywordType: ctpFrappeYellow,
- chroma.KeywordConstant: "italic " + ctpFrappeMauve,
- chroma.Operator: ctpFrappeSky,
- chroma.OperatorWord: "bold " + ctpFrappeSky,
- chroma.Name: ctpFrappeLavender,
- chroma.NameBuiltin: "italic " + ctpFrappeText,
- chroma.NameFunction: ctpFrappeSky,
- chroma.NameClass: ctpFrappeYellow,
- chroma.NameNamespace: ctpFrappeYellow,
- chroma.NameException: ctpFrappeMaroon,
- chroma.NameVariable: ctpFrappePeach,
- chroma.NameConstant: ctpFrappeYellow,
- chroma.NameLabel: ctpFrappeYellow,
- chroma.NameEntity: ctpFrappePink,
- chroma.NameAttribute: ctpFrappeYellow,
- chroma.NameTag: ctpFrappeMauve,
- chroma.NameDecorator: ctpFrappePink,
- chroma.NameOther: ctpFrappePeach,
- chroma.Punctuation: ctpFrappeText,
- chroma.LiteralString: ctpFrappeGreen,
- chroma.LiteralStringDoc: ctpFrappeGreen,
- chroma.LiteralStringInterpol: ctpFrappeGreen,
- chroma.LiteralStringEscape: ctpFrappeBlue,
- chroma.LiteralStringRegex: ctpFrappeBlue,
- chroma.LiteralStringSymbol: ctpFrappeGreen,
- chroma.LiteralStringOther: ctpFrappeGreen,
- chroma.LiteralNumber: ctpFrappePeach,
- chroma.GenericHeading: "bold " + ctpFrappeSky,
- chroma.GenericSubheading: "bold " + ctpFrappeSky,
- chroma.GenericDeleted: ctpFrappeMaroon,
- chroma.GenericInserted: ctpFrappeGreen,
- chroma.GenericError: ctpFrappeMaroon,
- chroma.GenericEmph: "italic",
- chroma.GenericStrong: "bold",
- chroma.GenericPrompt: "bold " + ctpFrappeOverlay0,
- chroma.GenericOutput: ctpFrappePeach,
- chroma.GenericTraceback: ctpFrappeMaroon,
- chroma.Error: ctpFrappeRed,
- chroma.Background: ctpFrappePeach + " bg:" + ctpFrappeBase,
-}))
diff --git a/styles/catppuccin-frappe.xml b/styles/catppuccin-frappe.xml
new file mode 100644
index 000000000..b739c1401
--- /dev/null
+++ b/styles/catppuccin-frappe.xml
@@ -0,0 +1,46 @@
+
\ No newline at end of file
diff --git a/styles/catppuccin-latte.go b/styles/catppuccin-latte.go
deleted file mode 100644
index 800d3094b..000000000
--- a/styles/catppuccin-latte.go
+++ /dev/null
@@ -1,71 +0,0 @@
-package styles
-
-import (
- "github.com/alecthomas/chroma/v2"
-)
-
-var (
- ctpLattePink = "#ea76cb"
- ctpLatteMauve = "#8839ef"
- ctpLatteRed = "#d20f39"
- ctpLatteMaroon = "#e64553"
- ctpLattePeach = "#fe640b"
- ctpLatteYellow = "#df8e1d"
- ctpLatteGreen = "#40a02b"
- ctpLatteSky = "#04a5e5"
- ctpLatteBlue = "#1e66f5"
- ctpLatteLavender = "#7287fd"
- ctpLatteText = "#4c4f69"
- ctpLatteOverlay0 = "#9ca0b0"
- ctpLatteSurface2 = "#acb0be"
- ctpLatteSurface0 = "#ccd0da"
- ctpLatteBase = "#eff1f5"
-)
-
-// CatppuccinLatte a soothing light pastel theme for the high-spirited
-var CatppuccinLatte = Register(chroma.MustNewStyle("catppuccin-latte", chroma.StyleEntries{
- chroma.TextWhitespace: ctpLatteSurface0,
- chroma.Comment: "italic " + ctpLatteSurface2,
- chroma.CommentPreproc: ctpLatteBlue,
- chroma.Keyword: ctpLatteMauve,
- chroma.KeywordPseudo: "bold " + ctpLatteMauve,
- chroma.KeywordType: ctpLatteYellow,
- chroma.KeywordConstant: "italic " + ctpLatteMauve,
- chroma.Operator: ctpLatteSky,
- chroma.OperatorWord: "bold " + ctpLatteSky,
- chroma.Name: ctpLatteLavender,
- chroma.NameBuiltin: "italic " + ctpLattePeach,
- chroma.NameFunction: ctpLatteSky,
- chroma.NameClass: ctpLatteYellow,
- chroma.NameNamespace: ctpLatteYellow,
- chroma.NameException: ctpLatteMaroon,
- chroma.NameVariable: ctpLattePeach,
- chroma.NameConstant: ctpLatteYellow,
- chroma.NameLabel: ctpLatteYellow,
- chroma.NameEntity: ctpLattePink,
- chroma.NameAttribute: ctpLatteYellow,
- chroma.NameTag: ctpLatteMauve,
- chroma.NameDecorator: ctpLattePink,
- chroma.NameOther: ctpLattePeach,
- chroma.Punctuation: ctpLatteText,
- chroma.LiteralString: ctpLatteGreen,
- chroma.LiteralStringDoc: ctpLatteGreen,
- chroma.LiteralStringInterpol: ctpLatteGreen,
- chroma.LiteralStringEscape: ctpLatteBlue,
- chroma.LiteralStringRegex: ctpLatteBlue,
- chroma.LiteralStringSymbol: ctpLatteGreen,
- chroma.LiteralStringOther: ctpLatteGreen,
- chroma.LiteralNumber: ctpLattePeach,
- chroma.GenericHeading: "bold " + ctpLatteSky,
- chroma.GenericSubheading: "bold " + ctpLatteSky,
- chroma.GenericDeleted: ctpLatteMaroon,
- chroma.GenericInserted: ctpLatteGreen,
- chroma.GenericError: ctpLatteMaroon,
- chroma.GenericEmph: "italic",
- chroma.GenericStrong: "bold",
- chroma.GenericPrompt: "bold " + ctpLatteOverlay0,
- chroma.GenericOutput: ctpLattePeach,
- chroma.GenericTraceback: ctpLatteMaroon,
- chroma.Error: ctpLatteRed,
- chroma.Background: ctpLattePeach + " bg:" + ctpLatteBase,
-}))
diff --git a/styles/catppuccin-latte.xml b/styles/catppuccin-latte.xml
new file mode 100644
index 000000000..7c6bddd06
--- /dev/null
+++ b/styles/catppuccin-latte.xml
@@ -0,0 +1,46 @@
+
\ No newline at end of file
diff --git a/styles/catppuccin-macchiato.go b/styles/catppuccin-macchiato.go
deleted file mode 100644
index c99f77fff..000000000
--- a/styles/catppuccin-macchiato.go
+++ /dev/null
@@ -1,71 +0,0 @@
-package styles
-
-import (
- "github.com/alecthomas/chroma/v2"
-)
-
-var (
- ctpMacchiatoPink = "#f5bde6"
- ctpMacchiatoMauve = "#c6a0f6"
- ctpMacchiatoRed = "#ed8796"
- ctpMacchiatoMaroon = "#ee99a0"
- ctpMacchiatoPeach = "#f5a97f"
- ctpMacchiatoYellow = "#eed49f"
- ctpMacchiatoGreen = "#a6da95"
- ctpMacchiatoSky = "#91d7e3"
- ctpMacchiatoBlue = "#8aadf4"
- ctpMacchiatoLavender = "#b7bdf8"
- ctpMacchiatoText = "#cad3f5"
- ctpMacchiatoOverlay0 = "#6e738d"
- ctpMacchiatoSurface2 = "#5b6078"
- ctpMacchiatoSurface0 = "#363a4f"
- ctpMacchiatoBase = "#24273a"
-)
-
-// CatppuccinMacchiato a soothing mid-saturation, mid-contrast dark pastel theme for the high-spirited
-var CatppuccinMacchiato = Register(chroma.MustNewStyle("catppuccin-macchiato", chroma.StyleEntries{
- chroma.TextWhitespace: ctpMacchiatoSurface0,
- chroma.Comment: "italic " + ctpMacchiatoSurface2,
- chroma.CommentPreproc: ctpMacchiatoBlue,
- chroma.Keyword: ctpMacchiatoMauve,
- chroma.KeywordPseudo: "bold " + ctpMacchiatoMauve,
- chroma.KeywordType: ctpMacchiatoYellow,
- chroma.KeywordConstant: "italic " + ctpMacchiatoMauve,
- chroma.Operator: ctpMacchiatoSky,
- chroma.OperatorWord: "bold " + ctpMacchiatoSky,
- chroma.Name: ctpMacchiatoLavender,
- chroma.NameBuiltin: "italic " + ctpMacchiatoPeach,
- chroma.NameFunction: ctpMacchiatoSky,
- chroma.NameClass: ctpMacchiatoYellow,
- chroma.NameNamespace: ctpMacchiatoYellow,
- chroma.NameException: ctpMacchiatoMaroon,
- chroma.NameVariable: ctpMacchiatoPeach,
- chroma.NameConstant: ctpMacchiatoYellow,
- chroma.NameLabel: ctpMacchiatoYellow,
- chroma.NameEntity: ctpMacchiatoPink,
- chroma.NameAttribute: ctpMacchiatoYellow,
- chroma.NameTag: ctpMacchiatoMauve,
- chroma.NameDecorator: ctpMacchiatoPink,
- chroma.NameOther: ctpMacchiatoPeach,
- chroma.Punctuation: ctpMacchiatoText,
- chroma.LiteralString: ctpMacchiatoGreen,
- chroma.LiteralStringDoc: ctpMacchiatoGreen,
- chroma.LiteralStringInterpol: ctpMacchiatoGreen,
- chroma.LiteralStringEscape: ctpMacchiatoBlue,
- chroma.LiteralStringRegex: ctpMacchiatoBlue,
- chroma.LiteralStringSymbol: ctpMacchiatoGreen,
- chroma.LiteralStringOther: ctpMacchiatoGreen,
- chroma.LiteralNumber: ctpMacchiatoPeach,
- chroma.GenericHeading: "bold " + ctpMacchiatoSky,
- chroma.GenericSubheading: "bold " + ctpMacchiatoSky,
- chroma.GenericDeleted: ctpMacchiatoMaroon,
- chroma.GenericInserted: ctpMacchiatoGreen,
- chroma.GenericError: ctpMacchiatoMaroon,
- chroma.GenericEmph: "italic",
- chroma.GenericStrong: "bold",
- chroma.GenericPrompt: "bold " + ctpMacchiatoOverlay0,
- chroma.GenericOutput: ctpMacchiatoPeach,
- chroma.GenericTraceback: ctpMacchiatoMaroon,
- chroma.Error: ctpMacchiatoRed,
- chroma.Background: ctpMacchiatoPeach + " bg:" + ctpMacchiatoBase,
-}))
diff --git a/styles/catppuccin-macchiato.xml b/styles/catppuccin-macchiato.xml
new file mode 100644
index 000000000..c9d25e2df
--- /dev/null
+++ b/styles/catppuccin-macchiato.xml
@@ -0,0 +1,46 @@
+
\ No newline at end of file
diff --git a/styles/catppuccin-mocha.go b/styles/catppuccin-mocha.go
deleted file mode 100644
index 6f1eafbbd..000000000
--- a/styles/catppuccin-mocha.go
+++ /dev/null
@@ -1,71 +0,0 @@
-package styles
-
-import (
- "github.com/alecthomas/chroma/v2"
-)
-
-var (
- ctpMochaPink = "#f5c2e7"
- ctpMochaMauve = "#cba6f7"
- ctpMochaRed = "#f38ba8"
- ctpMochaMaroon = "#eba0ac"
- ctpMochaPeach = "#fab387"
- ctpMochaYellow = "#f9e2af"
- ctpMochaGreen = "#a6e3a1"
- ctpMochaSky = "#89dceb"
- ctpMochaBlue = "#89b4fa"
- ctpMochaLavender = "#b4befe"
- ctpMochaText = "#cdd6f4"
- ctpMochaOverlay0 = "#6c7086"
- ctpMochaSurface2 = "#585b70"
- ctpMochaSurface0 = "#313244"
- ctpMochaBase = "#1e1e2e"
-)
-
-// CatppuccinMocha a soothing high-saturation, high-contrast dark pastel theme for the high-spirited
-var CatppuccinMocha = Register(chroma.MustNewStyle("catppuccin-mocha", chroma.StyleEntries{
- chroma.TextWhitespace: ctpMochaSurface0,
- chroma.Comment: "italic " + ctpMochaSurface2,
- chroma.CommentPreproc: ctpMochaBlue,
- chroma.Keyword: ctpMochaMauve,
- chroma.KeywordPseudo: "bold " + ctpMochaMauve,
- chroma.KeywordType: ctpMochaYellow,
- chroma.KeywordConstant: "italic " + ctpMochaMauve,
- chroma.Operator: ctpMochaSky,
- chroma.OperatorWord: "bold " + ctpMochaSky,
- chroma.Name: ctpMochaLavender,
- chroma.NameBuiltin: "italic " + ctpMochaPeach,
- chroma.NameFunction: ctpMochaSky,
- chroma.NameClass: ctpMochaYellow,
- chroma.NameNamespace: ctpMochaYellow,
- chroma.NameException: ctpMochaMaroon,
- chroma.NameVariable: ctpMochaPeach,
- chroma.NameConstant: ctpMochaYellow,
- chroma.NameLabel: ctpMochaYellow,
- chroma.NameEntity: ctpMochaPink,
- chroma.NameAttribute: ctpMochaYellow,
- chroma.NameTag: ctpMochaMauve,
- chroma.NameDecorator: ctpMochaPink,
- chroma.NameOther: ctpMochaPeach,
- chroma.Punctuation: ctpMochaText,
- chroma.LiteralString: ctpMochaGreen,
- chroma.LiteralStringDoc: ctpMochaGreen,
- chroma.LiteralStringInterpol: ctpMochaGreen,
- chroma.LiteralStringEscape: ctpMochaBlue,
- chroma.LiteralStringRegex: ctpMochaBlue,
- chroma.LiteralStringSymbol: ctpMochaGreen,
- chroma.LiteralStringOther: ctpMochaGreen,
- chroma.LiteralNumber: ctpMochaPeach,
- chroma.GenericHeading: "bold " + ctpMochaSky,
- chroma.GenericSubheading: "bold " + ctpMochaSky,
- chroma.GenericDeleted: ctpMochaMaroon,
- chroma.GenericInserted: ctpMochaGreen,
- chroma.GenericError: ctpMochaMaroon,
- chroma.GenericEmph: "italic",
- chroma.GenericStrong: "bold",
- chroma.GenericPrompt: "bold " + ctpMochaOverlay0,
- chroma.GenericOutput: ctpMochaPeach,
- chroma.GenericTraceback: ctpMochaMaroon,
- chroma.Error: ctpMochaRed,
- chroma.Background: ctpMochaPeach + " bg:" + ctpMochaBase,
-}))
diff --git a/styles/catppuccin-mocha.xml b/styles/catppuccin-mocha.xml
new file mode 100644
index 000000000..4d69ae386
--- /dev/null
+++ b/styles/catppuccin-mocha.xml
@@ -0,0 +1,46 @@
+
\ No newline at end of file
diff --git a/styles/colorful.go b/styles/colorful.go
deleted file mode 100644
index 69f0373d7..000000000
--- a/styles/colorful.go
+++ /dev/null
@@ -1,59 +0,0 @@
-package styles
-
-import (
- "github.com/alecthomas/chroma/v2"
-)
-
-// Colorful style.
-var Colorful = Register(chroma.MustNewStyle("colorful", chroma.StyleEntries{
- chroma.TextWhitespace: "#bbbbbb",
- chroma.Comment: "#888",
- chroma.CommentPreproc: "#579",
- chroma.CommentSpecial: "bold #cc0000",
- chroma.Keyword: "bold #080",
- chroma.KeywordPseudo: "#038",
- chroma.KeywordType: "#339",
- chroma.Operator: "#333",
- chroma.OperatorWord: "bold #000",
- chroma.NameBuiltin: "#007020",
- chroma.NameFunction: "bold #06B",
- chroma.NameClass: "bold #B06",
- chroma.NameNamespace: "bold #0e84b5",
- chroma.NameException: "bold #F00",
- chroma.NameVariable: "#963",
- chroma.NameVariableInstance: "#33B",
- chroma.NameVariableClass: "#369",
- chroma.NameVariableGlobal: "bold #d70",
- chroma.NameConstant: "bold #036",
- chroma.NameLabel: "bold #970",
- chroma.NameEntity: "bold #800",
- chroma.NameAttribute: "#00C",
- chroma.NameTag: "#070",
- chroma.NameDecorator: "bold #555",
- chroma.LiteralString: "bg:#fff0f0",
- chroma.LiteralStringChar: "#04D bg:",
- chroma.LiteralStringDoc: "#D42 bg:",
- chroma.LiteralStringInterpol: "bg:#eee",
- chroma.LiteralStringEscape: "bold #666",
- chroma.LiteralStringRegex: "bg:#fff0ff #000",
- chroma.LiteralStringSymbol: "#A60 bg:",
- chroma.LiteralStringOther: "#D20",
- chroma.LiteralNumber: "bold #60E",
- chroma.LiteralNumberInteger: "bold #00D",
- chroma.LiteralNumberFloat: "bold #60E",
- chroma.LiteralNumberHex: "bold #058",
- chroma.LiteralNumberOct: "bold #40E",
- chroma.GenericHeading: "bold #000080",
- chroma.GenericSubheading: "bold #800080",
- chroma.GenericDeleted: "#A00000",
- chroma.GenericInserted: "#00A000",
- chroma.GenericError: "#FF0000",
- chroma.GenericEmph: "italic",
- chroma.GenericStrong: "bold",
- chroma.GenericPrompt: "bold #c65d09",
- chroma.GenericOutput: "#888",
- chroma.GenericTraceback: "#04D",
- chroma.GenericUnderline: "underline",
- chroma.Error: "#F00 bg:#FAA",
- chroma.Background: " bg:#ffffff",
-}))
diff --git a/styles/colorful.xml b/styles/colorful.xml
new file mode 100644
index 000000000..32442d716
--- /dev/null
+++ b/styles/colorful.xml
@@ -0,0 +1,52 @@
+
\ No newline at end of file
diff --git a/styles/compat.go b/styles/compat.go
new file mode 100644
index 000000000..4a6aaa665
--- /dev/null
+++ b/styles/compat.go
@@ -0,0 +1,66 @@
+package styles
+
+// Present for backwards compatibility.
+//
+// Deprecated: use styles.Get(name) instead.
+var (
+ Abap = Registry["abap"]
+ Algol = Registry["algol"]
+ AlgolNu = Registry["algol_nu"]
+ Arduino = Registry["arduino"]
+ Autumn = Registry["autumn"]
+ Average = Registry["average"]
+ Base16Snazzy = Registry["base16-snazzy"]
+ Borland = Registry["borland"]
+ BlackWhite = Registry["bw"]
+ CatppuccinFrappe = Registry["catppuccin-frappe"]
+ CatppuccinLatte = Registry["catppuccin-latte"]
+ CatppuccinMacchiato = Registry["catppuccin-macchiato"]
+ CatppuccinMocha = Registry["catppuccin-mocha"]
+ Colorful = Registry["colorful"]
+ DoomOne = Registry["doom-one"]
+ DoomOne2 = Registry["doom-one2"]
+ Dracula = Registry["dracula"]
+ Emacs = Registry["emacs"]
+ Friendly = Registry["friendly"]
+ Fruity = Registry["fruity"]
+ GitHubDark = Registry["github-dark"]
+ GitHub = Registry["github"]
+ GruvboxLight = Registry["gruvbox-light"]
+ Gruvbox = Registry["gruvbox"]
+ HrDark = Registry["hrdark"]
+ HrHighContrast = Registry["hr_high_contrast"]
+ Igor = Registry["igor"]
+ Lovelace = Registry["lovelace"]
+ Manni = Registry["manni"]
+ ModusOperandi = Registry["modus-operandi"]
+ ModusVivendi = Registry["modus-vivendi"]
+ Monokai = Registry["monokai"]
+ MonokaiLight = Registry["monokailight"]
+ Murphy = Registry["murphy"]
+ Native = Registry["native"]
+ Nord = Registry["nord"]
+ OnesEnterprise = Registry["onesenterprise"]
+ ParaisoDark = Registry["paraiso-dark"]
+ ParaisoLight = Registry["paraiso-light"]
+ Pastie = Registry["pastie"]
+ Perldoc = Registry["perldoc"]
+ Pygments = Registry["pygments"]
+ RainbowDash = Registry["rainbow_dash"]
+ RosePineDawn = Registry["rose-pine-dawn"]
+ RosePineMoon = Registry["rose-pine-moon"]
+ RosePine = Registry["rose-pine"]
+ Rrt = Registry["rrt"]
+ SolarizedDark = Registry["solarized-dark"]
+ SolarizedDark256 = Registry["solarized-dark256"]
+ SolarizedLight = Registry["solarized-light"]
+ SwapOff = Registry["swapoff"]
+ Tango = Registry["tango"]
+ Trac = Registry["trac"]
+ Vim = Registry["vim"]
+ VisualStudio = Registry["vs"]
+ Vulcan = Registry["vulcan"]
+ WitchHazel = Registry["witchhazel"]
+ XcodeDark = Registry["xcode-dark"]
+ Xcode = Registry["xcode"]
+)
diff --git a/styles/doom-one.go b/styles/doom-one.go
deleted file mode 100644
index 8bca8aa93..000000000
--- a/styles/doom-one.go
+++ /dev/null
@@ -1,58 +0,0 @@
-package styles
-
-import (
- "github.com/alecthomas/chroma/v2"
-)
-
-// Doom One style. Inspired by Atom One and Doom Emacs's Atom One theme
-var DoomOne = Register(chroma.MustNewStyle("doom-one", chroma.StyleEntries{
- chroma.Text: "#b0c4de",
- chroma.Error: "#b0c4de",
- chroma.Comment: "italic #8a93a5",
- chroma.CommentHashbang: "bold",
- chroma.Keyword: "#c678dd",
- chroma.KeywordType: "#ef8383",
- chroma.KeywordConstant: "bold #b756ff",
- chroma.Operator: "#c7bf54",
- chroma.OperatorWord: "bold #b756ff",
- chroma.Punctuation: "#b0c4de",
- chroma.Name: "#c1abea",
- chroma.NameAttribute: "#b3d23c",
- chroma.NameBuiltin: "#ef8383",
- chroma.NameClass: "#76a9f9",
- chroma.NameConstant: "bold #b756ff",
- chroma.NameDecorator: "#e5c07b",
- chroma.NameEntity: "#bda26f",
- chroma.NameException: "bold #fd7474",
- chroma.NameFunction: "#00b1f7",
- chroma.NameProperty: "#cebc3a",
- chroma.NameLabel: "#f5a40d",
- chroma.NameNamespace: "#76a9f9",
- chroma.NameTag: "#e06c75",
- chroma.NameVariable: "#DCAEEA",
- chroma.NameVariableGlobal: "bold #DCAEEA",
- chroma.NameVariableInstance: "#e06c75",
- chroma.Literal: "#98c379",
- chroma.Number: "#d19a66",
- chroma.String: "#98c379",
- chroma.StringDoc: "#7e97c3",
- chroma.StringDouble: "#63c381",
- chroma.StringEscape: "bold #d26464",
- chroma.StringHeredoc: "#98c379",
- chroma.StringInterpol: "#98c379",
- chroma.StringOther: "#70b33f",
- chroma.StringRegex: "#56b6c2",
- chroma.StringSingle: "#98c379",
- chroma.StringSymbol: "#56b6c2",
- chroma.Generic: "#b0c4de",
- chroma.GenericEmph: "italic",
- chroma.GenericHeading: "bold #a2cbff",
- chroma.GenericInserted: "#a6e22e",
- chroma.GenericOutput: "#a6e22e",
- chroma.GenericUnderline: "underline",
- chroma.GenericPrompt: "#a6e22e",
- chroma.GenericStrong: "bold",
- chroma.GenericSubheading: "#a2cbff",
- chroma.GenericTraceback: "#a2cbff",
- chroma.Background: "#b0c4de bg:#282c34",
-}))
diff --git a/styles/doom-one.xml b/styles/doom-one.xml
new file mode 100644
index 000000000..1f5127ef9
--- /dev/null
+++ b/styles/doom-one.xml
@@ -0,0 +1,51 @@
+
\ No newline at end of file
diff --git a/styles/doom-one2.go b/styles/doom-one2.go
deleted file mode 100644
index 080f6d7e5..000000000
--- a/styles/doom-one2.go
+++ /dev/null
@@ -1,71 +0,0 @@
-package styles
-
-import (
- "github.com/alecthomas/chroma/v2"
-)
-
-// Doom One 2 style. Inspired by Atom One and Doom Emacs's Atom One theme
-var DoomOne2 = Register(chroma.MustNewStyle("doom-one2", chroma.StyleEntries{
- chroma.Text: "#b0c4de",
- chroma.Error: "#b0c4de",
- chroma.Comment: "italic #8a93a5",
- chroma.CommentHashbang: "bold",
- chroma.Keyword: "#76a9f9",
- chroma.KeywordConstant: "#e5c07b",
- chroma.KeywordType: "#e5c07b",
- chroma.Operator: "#54b1c7",
- chroma.OperatorWord: "bold #b756ff",
- chroma.Punctuation: "#abb2bf",
- chroma.Name: "#aa89ea",
- chroma.NameAttribute: "#cebc3a",
- chroma.NameBuiltin: "#e5c07b",
- chroma.NameClass: "#ca72ff",
- chroma.NameConstant: "bold",
- chroma.NameDecorator: "#e5c07b",
- chroma.NameEntity: "#bda26f",
- chroma.NameException: "bold #fd7474",
- chroma.NameFunction: "#00b1f7",
- chroma.NameProperty: "#cebc3a",
- chroma.NameLabel: "#f5a40d",
- chroma.NameNamespace: "#ca72ff",
- chroma.NameTag: "#76a9f9",
- chroma.NameVariable: "#DCAEEA",
- chroma.NameVariableClass: "#DCAEEA",
- chroma.NameVariableGlobal: "bold #DCAEEA",
- chroma.NameVariableInstance: "#e06c75",
- chroma.NameVariableMagic: "#DCAEEA",
- chroma.Literal: "#98c379",
- chroma.LiteralDate: "#98c379",
- chroma.Number: "#d19a66",
- chroma.NumberBin: "#d19a66",
- chroma.NumberFloat: "#d19a66",
- chroma.NumberHex: "#d19a66",
- chroma.NumberInteger: "#d19a66",
- chroma.NumberIntegerLong: "#d19a66",
- chroma.NumberOct: "#d19a66",
- chroma.String: "#98c379",
- chroma.StringAffix: "#98c379",
- chroma.StringBacktick: "#98c379",
- chroma.StringDelimiter: "#98c379",
- chroma.StringDoc: "#7e97c3",
- chroma.StringDouble: "#63c381",
- chroma.StringEscape: "bold #d26464",
- chroma.StringHeredoc: "#98c379",
- chroma.StringInterpol: "#98c379",
- chroma.StringOther: "#70b33f",
- chroma.StringRegex: "#56b6c2",
- chroma.StringSingle: "#98c379",
- chroma.StringSymbol: "#56b6c2",
- chroma.Generic: "#b0c4de",
- chroma.GenericDeleted: "#b0c4de",
- chroma.GenericEmph: "italic",
- chroma.GenericHeading: "bold #a2cbff",
- chroma.GenericInserted: "#a6e22e",
- chroma.GenericOutput: "#a6e22e",
- chroma.GenericUnderline: "underline",
- chroma.GenericPrompt: "#a6e22e",
- chroma.GenericStrong: "bold",
- chroma.GenericSubheading: "#a2cbff",
- chroma.GenericTraceback: "#a2cbff",
- chroma.Background: "#b0c4de bg:#282c34",
-}))
diff --git a/styles/doom-one2.xml b/styles/doom-one2.xml
new file mode 100644
index 000000000..f47debaf0
--- /dev/null
+++ b/styles/doom-one2.xml
@@ -0,0 +1,64 @@
+
\ No newline at end of file
diff --git a/styles/dracula.go b/styles/dracula.go
deleted file mode 100644
index 67fdfca1b..000000000
--- a/styles/dracula.go
+++ /dev/null
@@ -1,81 +0,0 @@
-package styles
-
-import (
- "github.com/alecthomas/chroma/v2"
-)
-
-// Dracula Style
-var Dracula = Register(chroma.MustNewStyle("dracula", chroma.StyleEntries{
- chroma.Comment: "#6272a4",
- chroma.CommentHashbang: "#6272a4",
- chroma.CommentMultiline: "#6272a4",
- chroma.CommentPreproc: "#ff79c6",
- chroma.CommentSingle: "#6272a4",
- chroma.CommentSpecial: "#6272a4",
- chroma.Generic: "#f8f8f2",
- chroma.GenericDeleted: "#ff5555",
- chroma.GenericEmph: "#f8f8f2 underline",
- chroma.GenericError: "#f8f8f2",
- chroma.GenericHeading: "#f8f8f2 bold",
- chroma.GenericInserted: "#50fa7b bold",
- chroma.GenericOutput: "#44475a",
- chroma.GenericPrompt: "#f8f8f2",
- chroma.GenericStrong: "#f8f8f2",
- chroma.GenericSubheading: "#f8f8f2 bold",
- chroma.GenericTraceback: "#f8f8f2",
- chroma.GenericUnderline: "underline",
- chroma.Error: "#f8f8f2",
- chroma.Keyword: "#ff79c6",
- chroma.KeywordConstant: "#ff79c6",
- chroma.KeywordDeclaration: "#8be9fd italic",
- chroma.KeywordNamespace: "#ff79c6",
- chroma.KeywordPseudo: "#ff79c6",
- chroma.KeywordReserved: "#ff79c6",
- chroma.KeywordType: "#8be9fd",
- chroma.Literal: "#f8f8f2",
- chroma.LiteralDate: "#f8f8f2",
- chroma.Name: "#f8f8f2",
- chroma.NameAttribute: "#50fa7b",
- chroma.NameBuiltin: "#8be9fd italic",
- chroma.NameBuiltinPseudo: "#f8f8f2",
- chroma.NameClass: "#50fa7b",
- chroma.NameConstant: "#f8f8f2",
- chroma.NameDecorator: "#f8f8f2",
- chroma.NameEntity: "#f8f8f2",
- chroma.NameException: "#f8f8f2",
- chroma.NameFunction: "#50fa7b",
- chroma.NameLabel: "#8be9fd italic",
- chroma.NameNamespace: "#f8f8f2",
- chroma.NameOther: "#f8f8f2",
- chroma.NameTag: "#ff79c6",
- chroma.NameVariable: "#8be9fd italic",
- chroma.NameVariableClass: "#8be9fd italic",
- chroma.NameVariableGlobal: "#8be9fd italic",
- chroma.NameVariableInstance: "#8be9fd italic",
- chroma.LiteralNumber: "#bd93f9",
- chroma.LiteralNumberBin: "#bd93f9",
- chroma.LiteralNumberFloat: "#bd93f9",
- chroma.LiteralNumberHex: "#bd93f9",
- chroma.LiteralNumberInteger: "#bd93f9",
- chroma.LiteralNumberIntegerLong: "#bd93f9",
- chroma.LiteralNumberOct: "#bd93f9",
- chroma.Operator: "#ff79c6",
- chroma.OperatorWord: "#ff79c6",
- chroma.Other: "#f8f8f2",
- chroma.Punctuation: "#f8f8f2",
- chroma.LiteralString: "#f1fa8c",
- chroma.LiteralStringBacktick: "#f1fa8c",
- chroma.LiteralStringChar: "#f1fa8c",
- chroma.LiteralStringDoc: "#f1fa8c",
- chroma.LiteralStringDouble: "#f1fa8c",
- chroma.LiteralStringEscape: "#f1fa8c",
- chroma.LiteralStringHeredoc: "#f1fa8c",
- chroma.LiteralStringInterpol: "#f1fa8c",
- chroma.LiteralStringOther: "#f1fa8c",
- chroma.LiteralStringRegex: "#f1fa8c",
- chroma.LiteralStringSingle: "#f1fa8c",
- chroma.LiteralStringSymbol: "#f1fa8c",
- chroma.Text: "#f8f8f2",
- chroma.TextWhitespace: "#f8f8f2",
- chroma.Background: " bg:#282a36",
-}))
diff --git a/styles/dracula.xml b/styles/dracula.xml
new file mode 100644
index 000000000..9df7da11c
--- /dev/null
+++ b/styles/dracula.xml
@@ -0,0 +1,74 @@
+
\ No newline at end of file
diff --git a/styles/emacs.go b/styles/emacs.go
deleted file mode 100644
index 461f19783..000000000
--- a/styles/emacs.go
+++ /dev/null
@@ -1,51 +0,0 @@
-package styles
-
-import (
- "github.com/alecthomas/chroma/v2"
-)
-
-// Emacs style.
-var Emacs = Register(chroma.MustNewStyle("emacs", chroma.StyleEntries{
- chroma.TextWhitespace: "#bbbbbb",
- chroma.Comment: "italic #008800",
- chroma.CommentPreproc: "noitalic",
- chroma.CommentSpecial: "noitalic bold",
- chroma.Keyword: "bold #AA22FF",
- chroma.KeywordPseudo: "nobold",
- chroma.KeywordType: "bold #00BB00",
- chroma.Operator: "#666666",
- chroma.OperatorWord: "bold #AA22FF",
- chroma.NameBuiltin: "#AA22FF",
- chroma.NameFunction: "#00A000",
- chroma.NameClass: "#0000FF",
- chroma.NameNamespace: "bold #0000FF",
- chroma.NameException: "bold #D2413A",
- chroma.NameVariable: "#B8860B",
- chroma.NameConstant: "#880000",
- chroma.NameLabel: "#A0A000",
- chroma.NameEntity: "bold #999999",
- chroma.NameAttribute: "#BB4444",
- chroma.NameTag: "bold #008000",
- chroma.NameDecorator: "#AA22FF",
- chroma.LiteralString: "#BB4444",
- chroma.LiteralStringDoc: "italic",
- chroma.LiteralStringInterpol: "bold #BB6688",
- chroma.LiteralStringEscape: "bold #BB6622",
- chroma.LiteralStringRegex: "#BB6688",
- chroma.LiteralStringSymbol: "#B8860B",
- chroma.LiteralStringOther: "#008000",
- chroma.LiteralNumber: "#666666",
- chroma.GenericHeading: "bold #000080",
- chroma.GenericSubheading: "bold #800080",
- chroma.GenericDeleted: "#A00000",
- chroma.GenericInserted: "#00A000",
- chroma.GenericError: "#FF0000",
- chroma.GenericEmph: "italic",
- chroma.GenericStrong: "bold",
- chroma.GenericPrompt: "bold #000080",
- chroma.GenericOutput: "#888",
- chroma.GenericTraceback: "#04D",
- chroma.GenericUnderline: "underline",
- chroma.Error: "border:#FF0000",
- chroma.Background: " bg:#f8f8f8",
-}))
diff --git a/styles/emacs.xml b/styles/emacs.xml
new file mode 100644
index 000000000..981ce8e40
--- /dev/null
+++ b/styles/emacs.xml
@@ -0,0 +1,44 @@
+
\ No newline at end of file
diff --git a/styles/friendly.go b/styles/friendly.go
deleted file mode 100644
index 572d0174c..000000000
--- a/styles/friendly.go
+++ /dev/null
@@ -1,51 +0,0 @@
-package styles
-
-import (
- "github.com/alecthomas/chroma/v2"
-)
-
-// Friendly style.
-var Friendly = Register(chroma.MustNewStyle("friendly", chroma.StyleEntries{
- chroma.TextWhitespace: "#bbbbbb",
- chroma.Comment: "italic #60a0b0",
- chroma.CommentPreproc: "noitalic #007020",
- chroma.CommentSpecial: "noitalic bg:#fff0f0",
- chroma.Keyword: "bold #007020",
- chroma.KeywordPseudo: "nobold",
- chroma.KeywordType: "nobold #902000",
- chroma.Operator: "#666666",
- chroma.OperatorWord: "bold #007020",
- chroma.NameBuiltin: "#007020",
- chroma.NameFunction: "#06287e",
- chroma.NameClass: "bold #0e84b5",
- chroma.NameNamespace: "bold #0e84b5",
- chroma.NameException: "#007020",
- chroma.NameVariable: "#bb60d5",
- chroma.NameConstant: "#60add5",
- chroma.NameLabel: "bold #002070",
- chroma.NameEntity: "bold #d55537",
- chroma.NameAttribute: "#4070a0",
- chroma.NameTag: "bold #062873",
- chroma.NameDecorator: "bold #555555",
- chroma.LiteralString: "#4070a0",
- chroma.LiteralStringDoc: "italic",
- chroma.LiteralStringInterpol: "#70a0d0",
- chroma.LiteralStringEscape: "bold #4070a0",
- chroma.LiteralStringRegex: "#235388",
- chroma.LiteralStringSymbol: "#517918",
- chroma.LiteralStringOther: "#c65d09",
- chroma.LiteralNumber: "#40a070",
- chroma.GenericHeading: "bold #000080",
- chroma.GenericSubheading: "bold #800080",
- chroma.GenericDeleted: "#A00000",
- chroma.GenericInserted: "#00A000",
- chroma.GenericError: "#FF0000",
- chroma.GenericEmph: "italic",
- chroma.GenericStrong: "bold",
- chroma.GenericPrompt: "bold #c65d09",
- chroma.GenericOutput: "#888",
- chroma.GenericTraceback: "#04D",
- chroma.GenericUnderline: "underline",
- chroma.Error: "border:#FF0000",
- chroma.Background: " bg:#f0f0f0",
-}))
diff --git a/styles/friendly.xml b/styles/friendly.xml
new file mode 100644
index 000000000..f49801040
--- /dev/null
+++ b/styles/friendly.xml
@@ -0,0 +1,44 @@
+
\ No newline at end of file
diff --git a/styles/fruity.go b/styles/fruity.go
deleted file mode 100644
index 6ed99b7dc..000000000
--- a/styles/fruity.go
+++ /dev/null
@@ -1,26 +0,0 @@
-package styles
-
-import (
- "github.com/alecthomas/chroma/v2"
-)
-
-// Fruity style.
-var Fruity = Register(chroma.MustNewStyle("fruity", chroma.StyleEntries{
- chroma.TextWhitespace: "#888888",
- chroma.Background: "#ffffff bg:#111111",
- chroma.GenericOutput: "#444444 bg:#222222",
- chroma.Keyword: "#fb660a bold",
- chroma.KeywordPseudo: "nobold",
- chroma.LiteralNumber: "#0086f7 bold",
- chroma.NameTag: "#fb660a bold",
- chroma.NameVariable: "#fb660a",
- chroma.Comment: "#008800 bg:#0f140f italic",
- chroma.NameAttribute: "#ff0086 bold",
- chroma.LiteralString: "#0086d2",
- chroma.NameFunction: "#ff0086 bold",
- chroma.GenericHeading: "#ffffff bold",
- chroma.KeywordType: "#cdcaa9 bold",
- chroma.GenericSubheading: "#ffffff bold",
- chroma.NameConstant: "#0086d2",
- chroma.CommentPreproc: "#ff0007 bold",
-}))
diff --git a/styles/fruity.xml b/styles/fruity.xml
new file mode 100644
index 000000000..bcc06aa7b
--- /dev/null
+++ b/styles/fruity.xml
@@ -0,0 +1,19 @@
+
\ No newline at end of file
diff --git a/styles/github-dark.go b/styles/github-dark.go
deleted file mode 100644
index 48c0d61de..000000000
--- a/styles/github-dark.go
+++ /dev/null
@@ -1,86 +0,0 @@
-package styles
-
-import (
- "fmt"
-
- "github.com/alecthomas/chroma/v2"
-)
-
-var (
- // colors used from https://github.com/primer/primitives
- ghRed2 = "#ffa198"
- ghRed3 = "#ff7b72"
- ghRed9 = "#490202"
- ghOrange2 = "#ffa657"
- ghOrange3 = "#f0883e"
- ghGreen1 = "#7ee787"
- ghGreen2 = "#56d364"
- ghGreen7 = "#0f5323"
- ghBlue1 = "#a5d6ff"
- ghBlue2 = "#79c0ff"
- ghPurple2 = "#d2a8ff"
- ghGray3 = "#8b949e"
- ghGray4 = "#6e7681"
- ghFgSubtle = "#6e7681"
- ghFgDefault = "#c9d1d9"
- ghBgDefault = "#0d1117"
- ghDangerFg = "#f85149"
-)
-
-// GitHub Dark style.
-var GitHubDark = Register(chroma.MustNewStyle("github-dark", chroma.StyleEntries{
- // Default Token Style
- chroma.Background: fmt.Sprintf("bg:%s %s", ghBgDefault, ghFgDefault),
-
- chroma.LineNumbers: ghGray4,
- // has transparency in VS Code theme as `colors.codemirror.activelineBg`
- chroma.LineHighlight: ghGray4,
-
- chroma.Error: ghDangerFg,
-
- chroma.Keyword: ghRed3,
- chroma.KeywordConstant: ghBlue2,
- chroma.KeywordPseudo: ghBlue2,
-
- chroma.Name: ghFgDefault,
- chroma.NameClass: "bold " + ghOrange3,
- chroma.NameConstant: "bold " + ghBlue2,
- chroma.NameDecorator: "bold " + ghPurple2,
- chroma.NameEntity: ghOrange2,
- chroma.NameException: "bold " + ghOrange3,
- chroma.NameFunction: "bold " + ghPurple2,
- chroma.NameLabel: "bold " + ghBlue2,
- chroma.NameNamespace: ghRed3,
- chroma.NameProperty: ghBlue2,
- chroma.NameTag: ghGreen1,
- chroma.NameVariable: ghBlue2,
-
- chroma.Literal: ghBlue1,
- chroma.LiteralDate: ghBlue2,
- chroma.LiteralStringAffix: ghBlue2,
- chroma.LiteralStringDelimiter: ghBlue2,
- chroma.LiteralStringEscape: ghBlue2,
- chroma.LiteralStringHeredoc: ghBlue2,
- chroma.LiteralStringRegex: ghBlue2,
-
- chroma.Operator: "bold " + ghRed3,
-
- chroma.Comment: "italic " + ghGray3,
- chroma.CommentPreproc: "bold " + ghGray3,
- chroma.CommentSpecial: "bold italic " + ghGray3,
-
- chroma.Generic: ghFgDefault,
- chroma.GenericDeleted: fmt.Sprintf("bg:%s %s", ghRed9, ghRed2),
- chroma.GenericEmph: "italic",
- chroma.GenericError: ghRed2,
- chroma.GenericHeading: "bold " + ghBlue2,
- chroma.GenericInserted: fmt.Sprintf("bg:%s %s", ghGreen7, ghGreen2),
- chroma.GenericOutput: ghGray3,
- chroma.GenericPrompt: ghGray3,
- chroma.GenericStrong: "bold",
- chroma.GenericSubheading: ghBlue2,
- chroma.GenericTraceback: ghRed3,
- chroma.GenericUnderline: "underline",
-
- chroma.TextWhitespace: ghFgSubtle,
-}))
diff --git a/styles/github-dark.xml b/styles/github-dark.xml
new file mode 100644
index 000000000..7ade2be25
--- /dev/null
+++ b/styles/github-dark.xml
@@ -0,0 +1,45 @@
+
\ No newline at end of file
diff --git a/styles/github.go b/styles/github.go
deleted file mode 100644
index b1ef17fa3..000000000
--- a/styles/github.go
+++ /dev/null
@@ -1,51 +0,0 @@
-package styles
-
-import (
- "github.com/alecthomas/chroma/v2"
-)
-
-// GitHub style.
-var GitHub = Register(chroma.MustNewStyle("github", chroma.StyleEntries{
- chroma.CommentMultiline: "italic #999988",
- chroma.CommentPreproc: "bold #999999",
- chroma.CommentSingle: "italic #999988",
- chroma.CommentSpecial: "bold italic #999999",
- chroma.Comment: "italic #999988",
- chroma.Error: "bg:#e3d2d2 #a61717",
- chroma.GenericDeleted: "bg:#ffdddd #000000",
- chroma.GenericEmph: "italic #000000",
- chroma.GenericError: "#aa0000",
- chroma.GenericHeading: "#999999",
- chroma.GenericInserted: "bg:#ddffdd #000000",
- chroma.GenericOutput: "#888888",
- chroma.GenericPrompt: "#555555",
- chroma.GenericStrong: "bold",
- chroma.GenericSubheading: "#aaaaaa",
- chroma.GenericTraceback: "#aa0000",
- chroma.GenericUnderline: "underline",
- chroma.KeywordType: "bold #445588",
- chroma.Keyword: "bold #000000",
- chroma.LiteralNumber: "#009999",
- chroma.LiteralStringRegex: "#009926",
- chroma.LiteralStringSymbol: "#990073",
- chroma.LiteralString: "#d14",
- chroma.NameAttribute: "#008080",
- chroma.NameBuiltinPseudo: "#999999",
- chroma.NameBuiltin: "#0086B3",
- chroma.NameClass: "bold #445588",
- chroma.NameConstant: "#008080",
- chroma.NameDecorator: "bold #3c5d5d",
- chroma.NameEntity: "#800080",
- chroma.NameException: "bold #990000",
- chroma.NameFunction: "bold #990000",
- chroma.NameLabel: "bold #990000",
- chroma.NameNamespace: "#555555",
- chroma.NameTag: "#000080",
- chroma.NameVariableClass: "#008080",
- chroma.NameVariableGlobal: "#008080",
- chroma.NameVariableInstance: "#008080",
- chroma.NameVariable: "#008080",
- chroma.Operator: "bold #000000",
- chroma.TextWhitespace: "#bbbbbb",
- chroma.Background: " bg:#ffffff",
-}))
diff --git a/styles/github.xml b/styles/github.xml
new file mode 100644
index 000000000..e7caee7b6
--- /dev/null
+++ b/styles/github.xml
@@ -0,0 +1,44 @@
+
\ No newline at end of file
diff --git a/styles/gruvbox-light.go b/styles/gruvbox-light.go
deleted file mode 100644
index 6f6de7cba..000000000
--- a/styles/gruvbox-light.go
+++ /dev/null
@@ -1,40 +0,0 @@
-package styles
-
-import (
- "github.com/alecthomas/chroma/v2"
-)
-
-// Gruvbox light style.
-var GruvboxLight = Register(chroma.MustNewStyle("gruvbox-light", chroma.StyleEntries{
- chroma.CommentPreproc: "noinherit #427B58",
- chroma.Comment: "#928374 italic",
- chroma.GenericDeleted: "noinherit #282828 bg:#9D0006",
- chroma.GenericEmph: "#076678 underline",
- chroma.GenericError: "bg:#9D0006 bold",
- chroma.GenericHeading: "#79740E bold",
- chroma.GenericInserted: "noinherit #282828 bg:#79740E",
- chroma.GenericOutput: "noinherit #504945",
- chroma.GenericPrompt: "#3C3836",
- chroma.GenericStrong: "#3C3836",
- chroma.GenericSubheading: "#79740E bold",
- chroma.GenericTraceback: "bg:#3C3836 bold",
- chroma.Generic: "#3C3836",
- chroma.KeywordType: "noinherit #B57614",
- chroma.Keyword: "noinherit #AF3A03",
- chroma.NameAttribute: "#79740E bold",
- chroma.NameBuiltin: "#B57614",
- chroma.NameConstant: "noinherit #d3869b",
- chroma.NameEntity: "noinherit #B57614",
- chroma.NameException: "noinherit #fb4934",
- chroma.NameFunction: "#B57614",
- chroma.NameLabel: "noinherit #9D0006",
- chroma.NameTag: "noinherit #9D0006",
- chroma.NameVariable: "noinherit #3C3836",
- chroma.Name: "#3C3836",
- chroma.LiteralNumberFloat: "noinherit #8F3F71",
- chroma.LiteralNumber: "noinherit #8F3F71",
- chroma.Operator: "#AF3A03",
- chroma.LiteralStringSymbol: "#076678",
- chroma.LiteralString: "noinherit #79740E",
- chroma.Background: "noinherit #3C3836 bg:#FBF1C7 bg:#FBF1C7",
-}))
diff --git a/styles/gruvbox-light.xml b/styles/gruvbox-light.xml
new file mode 100644
index 000000000..8c4f0642c
--- /dev/null
+++ b/styles/gruvbox-light.xml
@@ -0,0 +1,33 @@
+
\ No newline at end of file
diff --git a/styles/gruvbox.go b/styles/gruvbox.go
deleted file mode 100644
index 44ccf9be2..000000000
--- a/styles/gruvbox.go
+++ /dev/null
@@ -1,40 +0,0 @@
-package styles
-
-import (
- "github.com/alecthomas/chroma/v2"
-)
-
-// Gruvbox style.
-var Gruvbox = Register(chroma.MustNewStyle("gruvbox", chroma.StyleEntries{
- chroma.CommentPreproc: "noinherit #8ec07c",
- chroma.Comment: "#928374 italic",
- chroma.GenericDeleted: "noinherit #282828 bg:#fb4934",
- chroma.GenericEmph: "#83a598 underline",
- chroma.GenericError: "bg:#fb4934 bold",
- chroma.GenericHeading: "#b8bb26 bold",
- chroma.GenericInserted: "noinherit #282828 bg:#b8bb26",
- chroma.GenericOutput: "noinherit #504945",
- chroma.GenericPrompt: "#ebdbb2",
- chroma.GenericStrong: "#ebdbb2",
- chroma.GenericSubheading: "#b8bb26 bold",
- chroma.GenericTraceback: "bg:#fb4934 bold",
- chroma.Generic: "#ebdbb2",
- chroma.KeywordType: "noinherit #fabd2f",
- chroma.Keyword: "noinherit #fe8019",
- chroma.NameAttribute: "#b8bb26 bold",
- chroma.NameBuiltin: "#fabd2f",
- chroma.NameConstant: "noinherit #d3869b",
- chroma.NameEntity: "noinherit #fabd2f",
- chroma.NameException: "noinherit #fb4934",
- chroma.NameFunction: "#fabd2f",
- chroma.NameLabel: "noinherit #fb4934",
- chroma.NameTag: "noinherit #fb4934",
- chroma.NameVariable: "noinherit #ebdbb2",
- chroma.Name: "#ebdbb2",
- chroma.LiteralNumberFloat: "noinherit #d3869b",
- chroma.LiteralNumber: "noinherit #d3869b",
- chroma.Operator: "#fe8019",
- chroma.LiteralStringSymbol: "#83a598",
- chroma.LiteralString: "noinherit #b8bb26",
- chroma.Background: "noinherit #ebdbb2 bg:#282828 bg:#282828",
-}))
diff --git a/styles/gruvbox.xml b/styles/gruvbox.xml
new file mode 100644
index 000000000..2f6a0a2a0
--- /dev/null
+++ b/styles/gruvbox.xml
@@ -0,0 +1,33 @@
+
\ No newline at end of file
diff --git a/styles/hr_dark.go b/styles/hr_dark.go
deleted file mode 100644
index 74867f619..000000000
--- a/styles/hr_dark.go
+++ /dev/null
@@ -1,17 +0,0 @@
-package styles
-
-import (
- "github.com/alecthomas/chroma/v2"
-)
-
-// Theme based on HackerRank Dark Editor theme
-var HrDark = Register(chroma.MustNewStyle("hrdark", chroma.StyleEntries{
- chroma.Comment: "italic #828b96",
- chroma.Keyword: "#ff636f",
- chroma.OperatorWord: "#ff636f",
- chroma.Name: "#58a1dd",
- chroma.Literal: "#a6be9d",
- chroma.Operator: "#ff636f",
- chroma.Background: "#1d2432",
- chroma.Other: "#fff",
-}))
diff --git a/styles/hr_high_contrast.go b/styles/hr_high_contrast.go
deleted file mode 100644
index 6bf2eb205..000000000
--- a/styles/hr_high_contrast.go
+++ /dev/null
@@ -1,19 +0,0 @@
-package styles
-
-import (
- "github.com/alecthomas/chroma/v2"
-)
-
-// Theme based on HackerRank High Contrast Editor Theme
-var HrHighContrast = Register(chroma.MustNewStyle("hr_high_contrast", chroma.StyleEntries{
- chroma.Comment: "#5a8349",
- chroma.Keyword: "#467faf",
- chroma.OperatorWord: "#467faf",
- chroma.Name: "#ffffff",
- chroma.LiteralString: "#a87662",
- chroma.LiteralNumber: "#fff",
- chroma.LiteralStringBoolean: "#467faf",
- chroma.Operator: "#e4e400",
- chroma.Background: "#000",
- chroma.Other: "#d5d500",
-}))
diff --git a/styles/hr_high_contrast.xml b/styles/hr_high_contrast.xml
new file mode 100644
index 000000000..61cde204a
--- /dev/null
+++ b/styles/hr_high_contrast.xml
@@ -0,0 +1,12 @@
+
\ No newline at end of file
diff --git a/styles/hrdark.xml b/styles/hrdark.xml
new file mode 100644
index 000000000..bc7a6f315
--- /dev/null
+++ b/styles/hrdark.xml
@@ -0,0 +1,10 @@
+
\ No newline at end of file
diff --git a/styles/igor.go b/styles/igor.go
deleted file mode 100644
index fef8eeef2..000000000
--- a/styles/igor.go
+++ /dev/null
@@ -1,16 +0,0 @@
-package styles
-
-import (
- "github.com/alecthomas/chroma/v2"
-)
-
-// Igor style.
-var Igor = Register(chroma.MustNewStyle("igor", chroma.StyleEntries{
- chroma.Comment: "italic #FF0000",
- chroma.Keyword: "#0000FF",
- chroma.NameFunction: "#C34E00",
- chroma.NameDecorator: "#CC00A3",
- chroma.NameClass: "#007575",
- chroma.LiteralString: "#009C00",
- chroma.Background: " bg:#ffffff",
-}))
diff --git a/styles/igor.xml b/styles/igor.xml
new file mode 100644
index 000000000..773c83b60
--- /dev/null
+++ b/styles/igor.xml
@@ -0,0 +1,9 @@
+
\ No newline at end of file
diff --git a/styles/lovelace.go b/styles/lovelace.go
deleted file mode 100644
index 90999202c..000000000
--- a/styles/lovelace.go
+++ /dev/null
@@ -1,60 +0,0 @@
-package styles
-
-import (
- "github.com/alecthomas/chroma/v2"
-)
-
-// Lovelace style.
-var Lovelace = Register(chroma.MustNewStyle("lovelace", chroma.StyleEntries{
- chroma.TextWhitespace: "#a89028",
- chroma.Comment: "italic #888888",
- chroma.CommentHashbang: "#287088",
- chroma.CommentMultiline: "#888888",
- chroma.CommentPreproc: "noitalic #289870",
- chroma.Keyword: "#2838b0",
- chroma.KeywordConstant: "italic #444444",
- chroma.KeywordDeclaration: "italic",
- chroma.KeywordType: "italic",
- chroma.Operator: "#666666",
- chroma.OperatorWord: "#a848a8",
- chroma.Punctuation: "#888888",
- chroma.NameAttribute: "#388038",
- chroma.NameBuiltin: "#388038",
- chroma.NameBuiltinPseudo: "italic",
- chroma.NameClass: "#287088",
- chroma.NameConstant: "#b85820",
- chroma.NameDecorator: "#287088",
- chroma.NameEntity: "#709030",
- chroma.NameException: "#908828",
- chroma.NameFunction: "#785840",
- chroma.NameFunctionMagic: "#b85820",
- chroma.NameLabel: "#289870",
- chroma.NameNamespace: "#289870",
- chroma.NameTag: "#2838b0",
- chroma.NameVariable: "#b04040",
- chroma.NameVariableGlobal: "#908828",
- chroma.NameVariableMagic: "#b85820",
- chroma.LiteralString: "#b83838",
- chroma.LiteralStringAffix: "#444444",
- chroma.LiteralStringChar: "#a848a8",
- chroma.LiteralStringDelimiter: "#b85820",
- chroma.LiteralStringDoc: "italic #b85820",
- chroma.LiteralStringEscape: "#709030",
- chroma.LiteralStringInterpol: "underline",
- chroma.LiteralStringOther: "#a848a8",
- chroma.LiteralStringRegex: "#a848a8",
- chroma.LiteralNumber: "#444444",
- chroma.GenericDeleted: "#c02828",
- chroma.GenericEmph: "italic",
- chroma.GenericError: "#c02828",
- chroma.GenericHeading: "#666666",
- chroma.GenericSubheading: "#444444",
- chroma.GenericInserted: "#388038",
- chroma.GenericOutput: "#666666",
- chroma.GenericPrompt: "#444444",
- chroma.GenericStrong: "bold",
- chroma.GenericTraceback: "#2838b0",
- chroma.GenericUnderline: "underline",
- chroma.Error: "bg:#a848a8",
- chroma.Background: " bg:#ffffff",
-}))
diff --git a/styles/lovelace.xml b/styles/lovelace.xml
new file mode 100644
index 000000000..e336c930a
--- /dev/null
+++ b/styles/lovelace.xml
@@ -0,0 +1,53 @@
+
\ No newline at end of file
diff --git a/styles/manni.go b/styles/manni.go
deleted file mode 100644
index c95817610..000000000
--- a/styles/manni.go
+++ /dev/null
@@ -1,51 +0,0 @@
-package styles
-
-import (
- "github.com/alecthomas/chroma/v2"
-)
-
-// Manni style.
-var Manni = Register(chroma.MustNewStyle("manni", chroma.StyleEntries{
- chroma.TextWhitespace: "#bbbbbb",
- chroma.Comment: "italic #0099FF",
- chroma.CommentPreproc: "noitalic #009999",
- chroma.CommentSpecial: "bold",
- chroma.Keyword: "bold #006699",
- chroma.KeywordPseudo: "nobold",
- chroma.KeywordType: "#007788",
- chroma.Operator: "#555555",
- chroma.OperatorWord: "bold #000000",
- chroma.NameBuiltin: "#336666",
- chroma.NameFunction: "#CC00FF",
- chroma.NameClass: "bold #00AA88",
- chroma.NameNamespace: "bold #00CCFF",
- chroma.NameException: "bold #CC0000",
- chroma.NameVariable: "#003333",
- chroma.NameConstant: "#336600",
- chroma.NameLabel: "#9999FF",
- chroma.NameEntity: "bold #999999",
- chroma.NameAttribute: "#330099",
- chroma.NameTag: "bold #330099",
- chroma.NameDecorator: "#9999FF",
- chroma.LiteralString: "#CC3300",
- chroma.LiteralStringDoc: "italic",
- chroma.LiteralStringInterpol: "#AA0000",
- chroma.LiteralStringEscape: "bold #CC3300",
- chroma.LiteralStringRegex: "#33AAAA",
- chroma.LiteralStringSymbol: "#FFCC33",
- chroma.LiteralStringOther: "#CC3300",
- chroma.LiteralNumber: "#FF6600",
- chroma.GenericHeading: "bold #003300",
- chroma.GenericSubheading: "bold #003300",
- chroma.GenericDeleted: "border:#CC0000 bg:#FFCCCC",
- chroma.GenericInserted: "border:#00CC00 bg:#CCFFCC",
- chroma.GenericError: "#FF0000",
- chroma.GenericEmph: "italic",
- chroma.GenericStrong: "bold",
- chroma.GenericPrompt: "bold #000099",
- chroma.GenericOutput: "#AAAAAA",
- chroma.GenericTraceback: "#99CC66",
- chroma.GenericUnderline: "underline",
- chroma.Error: "bg:#FFAAAA #AA0000",
- chroma.Background: " bg:#f0f3f3",
-}))
diff --git a/styles/manni.xml b/styles/manni.xml
new file mode 100644
index 000000000..99324bd3b
--- /dev/null
+++ b/styles/manni.xml
@@ -0,0 +1,44 @@
+
\ No newline at end of file
diff --git a/styles/modus-operandi.go b/styles/modus-operandi.go
deleted file mode 100644
index 69d02c186..000000000
--- a/styles/modus-operandi.go
+++ /dev/null
@@ -1,20 +0,0 @@
-package styles
-
-import (
- "github.com/alecthomas/chroma/v2"
-)
-
-// Modus Operandi (light) style.
-var ModusOperandi = Register(chroma.MustNewStyle("modus-operandi", chroma.StyleEntries{
- chroma.Keyword: "#5317ac",
- chroma.KeywordConstant: "#0000c0",
- chroma.KeywordType: "#005a5f",
- chroma.Comment: "#505050",
- chroma.NameVariable: "#00538b",
- chroma.Operator: "#00538b",
- chroma.NameFunction: "#721045",
- chroma.NameBuiltin: "#8f0075",
- chroma.Literal: "#0000c0",
- chroma.String: "#2544bb",
- chroma.Background: "#000000 bg:#ffffff",
-}))
diff --git a/styles/modus-operandi.xml b/styles/modus-operandi.xml
new file mode 100644
index 000000000..023137aae
--- /dev/null
+++ b/styles/modus-operandi.xml
@@ -0,0 +1,13 @@
+
\ No newline at end of file
diff --git a/styles/modus-vivendi.go b/styles/modus-vivendi.go
deleted file mode 100644
index 7223a7e93..000000000
--- a/styles/modus-vivendi.go
+++ /dev/null
@@ -1,20 +0,0 @@
-package styles
-
-import (
- "github.com/alecthomas/chroma/v2"
-)
-
-// Modus Vivendi (dark) style.
-var ModusVivendi = Register(chroma.MustNewStyle("modus-vivendi", chroma.StyleEntries{
- chroma.Keyword: "#b6a0ff",
- chroma.KeywordConstant: "#00bcff",
- chroma.KeywordType: "#6ae4b9",
- chroma.Comment: "#a8a8a8",
- chroma.NameVariable: "#00d3d0",
- chroma.Operator: "#00d3d0",
- chroma.NameFunction: "#feacd0",
- chroma.NameBuiltin: "#f78fe7",
- chroma.Literal: "#00bcff",
- chroma.String: "#79a8ff",
- chroma.Background: "#ffffff bg:#000000",
-}))
diff --git a/styles/modus-vivendi.xml b/styles/modus-vivendi.xml
new file mode 100644
index 000000000..8da663dcc
--- /dev/null
+++ b/styles/modus-vivendi.xml
@@ -0,0 +1,13 @@
+
\ No newline at end of file
diff --git a/styles/monokai.go b/styles/monokai.go
deleted file mode 100644
index 85647a296..000000000
--- a/styles/monokai.go
+++ /dev/null
@@ -1,36 +0,0 @@
-package styles
-
-import (
- "github.com/alecthomas/chroma/v2"
-)
-
-// Monokai style.
-var Monokai = Register(chroma.MustNewStyle("monokai", chroma.StyleEntries{
- chroma.Text: "#f8f8f2",
- chroma.Error: "#960050 bg:#1e0010",
- chroma.Comment: "#75715e",
- chroma.Keyword: "#66d9ef",
- chroma.KeywordNamespace: "#f92672",
- chroma.Operator: "#f92672",
- chroma.Punctuation: "#f8f8f2",
- chroma.Name: "#f8f8f2",
- chroma.NameAttribute: "#a6e22e",
- chroma.NameClass: "#a6e22e",
- chroma.NameConstant: "#66d9ef",
- chroma.NameDecorator: "#a6e22e",
- chroma.NameException: "#a6e22e",
- chroma.NameFunction: "#a6e22e",
- chroma.NameOther: "#a6e22e",
- chroma.NameTag: "#f92672",
- chroma.LiteralNumber: "#ae81ff",
- chroma.Literal: "#ae81ff",
- chroma.LiteralDate: "#e6db74",
- chroma.LiteralString: "#e6db74",
- chroma.LiteralStringEscape: "#ae81ff",
- chroma.GenericDeleted: "#f92672",
- chroma.GenericEmph: "italic",
- chroma.GenericInserted: "#a6e22e",
- chroma.GenericStrong: "bold",
- chroma.GenericSubheading: "#75715e",
- chroma.Background: "bg:#272822",
-}))
diff --git a/styles/monokai.xml b/styles/monokai.xml
new file mode 100644
index 000000000..1a789ddec
--- /dev/null
+++ b/styles/monokai.xml
@@ -0,0 +1,29 @@
+
\ No newline at end of file
diff --git a/styles/monokailight.go b/styles/monokailight.go
deleted file mode 100644
index 74af78e5e..000000000
--- a/styles/monokailight.go
+++ /dev/null
@@ -1,33 +0,0 @@
-package styles
-
-import (
- "github.com/alecthomas/chroma/v2"
-)
-
-// MonokaiLight style.
-var MonokaiLight = Register(chroma.MustNewStyle("monokailight", chroma.StyleEntries{
- chroma.Text: "#272822",
- chroma.Error: "#960050 bg:#1e0010",
- chroma.Comment: "#75715e",
- chroma.Keyword: "#00a8c8",
- chroma.KeywordNamespace: "#f92672",
- chroma.Operator: "#f92672",
- chroma.Punctuation: "#111111",
- chroma.Name: "#111111",
- chroma.NameAttribute: "#75af00",
- chroma.NameClass: "#75af00",
- chroma.NameConstant: "#00a8c8",
- chroma.NameDecorator: "#75af00",
- chroma.NameException: "#75af00",
- chroma.NameFunction: "#75af00",
- chroma.NameOther: "#75af00",
- chroma.NameTag: "#f92672",
- chroma.LiteralNumber: "#ae81ff",
- chroma.Literal: "#ae81ff",
- chroma.LiteralDate: "#d88200",
- chroma.LiteralString: "#d88200",
- chroma.LiteralStringEscape: "#8045FF",
- chroma.GenericEmph: "italic",
- chroma.GenericStrong: "bold",
- chroma.Background: " bg:#fafafa",
-}))
diff --git a/styles/monokailight.xml b/styles/monokailight.xml
new file mode 100644
index 000000000..85cd23e00
--- /dev/null
+++ b/styles/monokailight.xml
@@ -0,0 +1,26 @@
+
\ No newline at end of file
diff --git a/styles/murphy.go b/styles/murphy.go
deleted file mode 100644
index d0d6ae081..000000000
--- a/styles/murphy.go
+++ /dev/null
@@ -1,59 +0,0 @@
-package styles
-
-import (
- "github.com/alecthomas/chroma/v2"
-)
-
-// Murphy style.
-var Murphy = Register(chroma.MustNewStyle("murphy", chroma.StyleEntries{
- chroma.TextWhitespace: "#bbbbbb",
- chroma.Comment: "#666 italic",
- chroma.CommentPreproc: "#579 noitalic",
- chroma.CommentSpecial: "#c00 bold",
- chroma.Keyword: "bold #289",
- chroma.KeywordPseudo: "#08f",
- chroma.KeywordType: "#66f",
- chroma.Operator: "#333",
- chroma.OperatorWord: "bold #000",
- chroma.NameBuiltin: "#072",
- chroma.NameFunction: "bold #5ed",
- chroma.NameClass: "bold #e9e",
- chroma.NameNamespace: "bold #0e84b5",
- chroma.NameException: "bold #F00",
- chroma.NameVariable: "#036",
- chroma.NameVariableInstance: "#aaf",
- chroma.NameVariableClass: "#ccf",
- chroma.NameVariableGlobal: "#f84",
- chroma.NameConstant: "bold #5ed",
- chroma.NameLabel: "bold #970",
- chroma.NameEntity: "#800",
- chroma.NameAttribute: "#007",
- chroma.NameTag: "#070",
- chroma.NameDecorator: "bold #555",
- chroma.LiteralString: "bg:#e0e0ff",
- chroma.LiteralStringChar: "#88F bg:",
- chroma.LiteralStringDoc: "#D42 bg:",
- chroma.LiteralStringInterpol: "bg:#eee",
- chroma.LiteralStringEscape: "bold #666",
- chroma.LiteralStringRegex: "bg:#e0e0ff #000",
- chroma.LiteralStringSymbol: "#fc8 bg:",
- chroma.LiteralStringOther: "#f88",
- chroma.LiteralNumber: "bold #60E",
- chroma.LiteralNumberInteger: "bold #66f",
- chroma.LiteralNumberFloat: "bold #60E",
- chroma.LiteralNumberHex: "bold #058",
- chroma.LiteralNumberOct: "bold #40E",
- chroma.GenericHeading: "bold #000080",
- chroma.GenericSubheading: "bold #800080",
- chroma.GenericDeleted: "#A00000",
- chroma.GenericInserted: "#00A000",
- chroma.GenericError: "#FF0000",
- chroma.GenericEmph: "italic",
- chroma.GenericStrong: "bold",
- chroma.GenericPrompt: "bold #c65d09",
- chroma.GenericOutput: "#888",
- chroma.GenericTraceback: "#04D",
- chroma.GenericUnderline: "underline",
- chroma.Error: "#F00 bg:#FAA",
- chroma.Background: " bg:#ffffff",
-}))
diff --git a/styles/murphy.xml b/styles/murphy.xml
new file mode 100644
index 000000000..112d6205c
--- /dev/null
+++ b/styles/murphy.xml
@@ -0,0 +1,52 @@
+
\ No newline at end of file
diff --git a/styles/native.go b/styles/native.go
deleted file mode 100644
index 2c6dfdb41..000000000
--- a/styles/native.go
+++ /dev/null
@@ -1,42 +0,0 @@
-package styles
-
-import (
- "github.com/alecthomas/chroma/v2"
-)
-
-// Native style.
-var Native = Register(chroma.MustNewStyle("native", chroma.StyleEntries{
- chroma.Background: "#d0d0d0 bg:#202020",
- chroma.TextWhitespace: "#666666",
- chroma.Comment: "italic #999999",
- chroma.CommentPreproc: "noitalic bold #cd2828",
- chroma.CommentSpecial: "noitalic bold #e50808 bg:#520000",
- chroma.Keyword: "bold #6ab825",
- chroma.KeywordPseudo: "nobold",
- chroma.OperatorWord: "bold #6ab825",
- chroma.LiteralString: "#ed9d13",
- chroma.LiteralStringOther: "#ffa500",
- chroma.LiteralNumber: "#3677a9",
- chroma.NameBuiltin: "#24909d",
- chroma.NameVariable: "#40ffff",
- chroma.NameConstant: "#40ffff",
- chroma.NameClass: "underline #447fcf",
- chroma.NameFunction: "#447fcf",
- chroma.NameNamespace: "underline #447fcf",
- chroma.NameException: "#bbbbbb",
- chroma.NameTag: "bold #6ab825",
- chroma.NameAttribute: "#bbbbbb",
- chroma.NameDecorator: "#ffa500",
- chroma.GenericHeading: "bold #ffffff",
- chroma.GenericSubheading: "underline #ffffff",
- chroma.GenericDeleted: "#d22323",
- chroma.GenericInserted: "#589819",
- chroma.GenericError: "#d22323",
- chroma.GenericEmph: "italic",
- chroma.GenericStrong: "bold",
- chroma.GenericPrompt: "#aaaaaa",
- chroma.GenericOutput: "#cccccc",
- chroma.GenericTraceback: "#d22323",
- chroma.GenericUnderline: "underline",
- chroma.Error: "bg:#e3d2d2 #a61717",
-}))
diff --git a/styles/native.xml b/styles/native.xml
new file mode 100644
index 000000000..43eea7fd5
--- /dev/null
+++ b/styles/native.xml
@@ -0,0 +1,35 @@
+
\ No newline at end of file
diff --git a/styles/nord.go b/styles/nord.go
deleted file mode 100644
index 77635412e..000000000
--- a/styles/nord.go
+++ /dev/null
@@ -1,75 +0,0 @@
-package styles
-
-import (
- "github.com/alecthomas/chroma/v2"
-)
-
-var (
- // colors and palettes based on https://www.nordtheme.com/docs/colors-and-palettes
- nord0 = "#2e3440"
- nord1 = "#3b4252" // nolint
- nord2 = "#434c5e" // nolint
- nord3 = "#4c566a"
- nord3b = "#616e87"
-
- nord4 = "#d8dee9"
- nord5 = "#e5e9f0" // nolint
- nord6 = "#eceff4"
-
- nord7 = "#8fbcbb"
- nord8 = "#88c0d0"
- nord9 = "#81a1c1"
- nord10 = "#5e81ac"
-
- nord11 = "#bf616a"
- nord12 = "#d08770"
- nord13 = "#ebcb8b"
- nord14 = "#a3be8c"
- nord15 = "#b48ead"
-)
-
-// Nord, an arctic, north-bluish color palette
-var Nord = Register(chroma.MustNewStyle("nord", chroma.StyleEntries{
- chroma.TextWhitespace: nord4,
- chroma.Comment: "italic " + nord3b,
- chroma.CommentPreproc: nord10,
- chroma.Keyword: "bold " + nord9,
- chroma.KeywordPseudo: "nobold " + nord9,
- chroma.KeywordType: "nobold " + nord9,
- chroma.Operator: nord9,
- chroma.OperatorWord: "bold " + nord9,
- chroma.Name: nord4,
- chroma.NameBuiltin: nord9,
- chroma.NameFunction: nord8,
- chroma.NameClass: nord7,
- chroma.NameNamespace: nord7,
- chroma.NameException: nord11,
- chroma.NameVariable: nord4,
- chroma.NameConstant: nord7,
- chroma.NameLabel: nord7,
- chroma.NameEntity: nord12,
- chroma.NameAttribute: nord7,
- chroma.NameTag: nord9,
- chroma.NameDecorator: nord12,
- chroma.Punctuation: nord6,
- chroma.LiteralString: nord14,
- chroma.LiteralStringDoc: nord3b,
- chroma.LiteralStringInterpol: nord14,
- chroma.LiteralStringEscape: nord13,
- chroma.LiteralStringRegex: nord13,
- chroma.LiteralStringSymbol: nord14,
- chroma.LiteralStringOther: nord14,
- chroma.LiteralNumber: nord15,
- chroma.GenericHeading: "bold " + nord8,
- chroma.GenericSubheading: "bold " + nord8,
- chroma.GenericDeleted: nord11,
- chroma.GenericInserted: nord14,
- chroma.GenericError: nord11,
- chroma.GenericEmph: "italic",
- chroma.GenericStrong: "bold",
- chroma.GenericPrompt: "bold " + nord3,
- chroma.GenericOutput: nord4,
- chroma.GenericTraceback: nord11,
- chroma.Error: nord11,
- chroma.Background: nord4 + " bg:" + nord0,
-}))
diff --git a/styles/nord.xml b/styles/nord.xml
new file mode 100644
index 000000000..0698fdd55
--- /dev/null
+++ b/styles/nord.xml
@@ -0,0 +1,44 @@
+
\ No newline at end of file
diff --git a/styles/onesenterprise.go b/styles/onesenterprise.go
deleted file mode 100644
index 7273b03b6..000000000
--- a/styles/onesenterprise.go
+++ /dev/null
@@ -1,17 +0,0 @@
-package styles
-
-import (
- "github.com/alecthomas/chroma/v2"
-)
-
-// 1S:Designer color palette
-var OnesEnterprise = Register(chroma.MustNewStyle("onesenterprise", chroma.StyleEntries{
- chroma.Text: "#000000",
- chroma.Comment: "#008000",
- chroma.CommentPreproc: "#963200",
- chroma.Operator: "#FF0000",
- chroma.Keyword: "#FF0000",
- chroma.Punctuation: "#FF0000",
- chroma.LiteralString: "#000000",
- chroma.Name: "#0000FF",
-}))
diff --git a/styles/onesenterprise.xml b/styles/onesenterprise.xml
new file mode 100644
index 000000000..ce86db3fb
--- /dev/null
+++ b/styles/onesenterprise.xml
@@ -0,0 +1,10 @@
+
\ No newline at end of file
diff --git a/styles/paraiso-dark.go b/styles/paraiso-dark.go
deleted file mode 100644
index d0c534acc..000000000
--- a/styles/paraiso-dark.go
+++ /dev/null
@@ -1,44 +0,0 @@
-package styles
-
-import (
- "github.com/alecthomas/chroma/v2"
-)
-
-// ParaisoDark style.
-var ParaisoDark = Register(chroma.MustNewStyle("paraiso-dark", chroma.StyleEntries{
- chroma.Text: "#e7e9db",
- chroma.Error: "#ef6155",
- chroma.Comment: "#776e71",
- chroma.Keyword: "#815ba4",
- chroma.KeywordNamespace: "#5bc4bf",
- chroma.KeywordType: "#fec418",
- chroma.Operator: "#5bc4bf",
- chroma.Punctuation: "#e7e9db",
- chroma.Name: "#e7e9db",
- chroma.NameAttribute: "#06b6ef",
- chroma.NameClass: "#fec418",
- chroma.NameConstant: "#ef6155",
- chroma.NameDecorator: "#5bc4bf",
- chroma.NameException: "#ef6155",
- chroma.NameFunction: "#06b6ef",
- chroma.NameNamespace: "#fec418",
- chroma.NameOther: "#06b6ef",
- chroma.NameTag: "#5bc4bf",
- chroma.NameVariable: "#ef6155",
- chroma.LiteralNumber: "#f99b15",
- chroma.Literal: "#f99b15",
- chroma.LiteralDate: "#48b685",
- chroma.LiteralString: "#48b685",
- chroma.LiteralStringChar: "#e7e9db",
- chroma.LiteralStringDoc: "#776e71",
- chroma.LiteralStringEscape: "#f99b15",
- chroma.LiteralStringInterpol: "#f99b15",
- chroma.GenericDeleted: "#ef6155",
- chroma.GenericEmph: "italic",
- chroma.GenericHeading: "bold #e7e9db",
- chroma.GenericInserted: "#48b685",
- chroma.GenericPrompt: "bold #776e71",
- chroma.GenericStrong: "bold",
- chroma.GenericSubheading: "bold #5bc4bf",
- chroma.Background: "bg:#2f1e2e",
-}))
diff --git a/styles/paraiso-dark.xml b/styles/paraiso-dark.xml
new file mode 100644
index 000000000..788db3f7c
--- /dev/null
+++ b/styles/paraiso-dark.xml
@@ -0,0 +1,37 @@
+
\ No newline at end of file
diff --git a/styles/paraiso-light.go b/styles/paraiso-light.go
deleted file mode 100644
index 4048b2629..000000000
--- a/styles/paraiso-light.go
+++ /dev/null
@@ -1,44 +0,0 @@
-package styles
-
-import (
- "github.com/alecthomas/chroma/v2"
-)
-
-// ParaisoLight style.
-var ParaisoLight = Register(chroma.MustNewStyle("paraiso-light", chroma.StyleEntries{
- chroma.Text: "#2f1e2e",
- chroma.Error: "#ef6155",
- chroma.Comment: "#8d8687",
- chroma.Keyword: "#815ba4",
- chroma.KeywordNamespace: "#5bc4bf",
- chroma.KeywordType: "#fec418",
- chroma.Operator: "#5bc4bf",
- chroma.Punctuation: "#2f1e2e",
- chroma.Name: "#2f1e2e",
- chroma.NameAttribute: "#06b6ef",
- chroma.NameClass: "#fec418",
- chroma.NameConstant: "#ef6155",
- chroma.NameDecorator: "#5bc4bf",
- chroma.NameException: "#ef6155",
- chroma.NameFunction: "#06b6ef",
- chroma.NameNamespace: "#fec418",
- chroma.NameOther: "#06b6ef",
- chroma.NameTag: "#5bc4bf",
- chroma.NameVariable: "#ef6155",
- chroma.LiteralNumber: "#f99b15",
- chroma.Literal: "#f99b15",
- chroma.LiteralDate: "#48b685",
- chroma.LiteralString: "#48b685",
- chroma.LiteralStringChar: "#2f1e2e",
- chroma.LiteralStringDoc: "#8d8687",
- chroma.LiteralStringEscape: "#f99b15",
- chroma.LiteralStringInterpol: "#f99b15",
- chroma.GenericDeleted: "#ef6155",
- chroma.GenericEmph: "italic",
- chroma.GenericHeading: "bold #2f1e2e",
- chroma.GenericInserted: "#48b685",
- chroma.GenericPrompt: "bold #8d8687",
- chroma.GenericStrong: "bold",
- chroma.GenericSubheading: "bold #5bc4bf",
- chroma.Background: "bg:#e7e9db",
-}))
diff --git a/styles/paraiso-light.xml b/styles/paraiso-light.xml
new file mode 100644
index 000000000..06a63bae1
--- /dev/null
+++ b/styles/paraiso-light.xml
@@ -0,0 +1,37 @@
+
\ No newline at end of file
diff --git a/styles/pastie.go b/styles/pastie.go
deleted file mode 100644
index 8e41b50d7..000000000
--- a/styles/pastie.go
+++ /dev/null
@@ -1,52 +0,0 @@
-package styles
-
-import (
- "github.com/alecthomas/chroma/v2"
-)
-
-// Pastie style.
-var Pastie = Register(chroma.MustNewStyle("pastie", chroma.StyleEntries{
- chroma.TextWhitespace: "#bbbbbb",
- chroma.Comment: "#888888",
- chroma.CommentPreproc: "bold #cc0000",
- chroma.CommentSpecial: "bg:#fff0f0 bold #cc0000",
- chroma.LiteralString: "bg:#fff0f0 #dd2200",
- chroma.LiteralStringRegex: "bg:#fff0ff #008800",
- chroma.LiteralStringOther: "bg:#f0fff0 #22bb22",
- chroma.LiteralStringSymbol: "#aa6600",
- chroma.LiteralStringInterpol: "#3333bb",
- chroma.LiteralStringEscape: "#0044dd",
- chroma.OperatorWord: "#008800",
- chroma.Keyword: "bold #008800",
- chroma.KeywordPseudo: "nobold",
- chroma.KeywordType: "#888888",
- chroma.NameClass: "bold #bb0066",
- chroma.NameException: "bold #bb0066",
- chroma.NameFunction: "bold #0066bb",
- chroma.NameProperty: "bold #336699",
- chroma.NameNamespace: "bold #bb0066",
- chroma.NameBuiltin: "#003388",
- chroma.NameVariable: "#336699",
- chroma.NameVariableClass: "#336699",
- chroma.NameVariableInstance: "#3333bb",
- chroma.NameVariableGlobal: "#dd7700",
- chroma.NameConstant: "bold #003366",
- chroma.NameTag: "bold #bb0066",
- chroma.NameAttribute: "#336699",
- chroma.NameDecorator: "#555555",
- chroma.NameLabel: "italic #336699",
- chroma.LiteralNumber: "bold #0000DD",
- chroma.GenericHeading: "#333",
- chroma.GenericSubheading: "#666",
- chroma.GenericDeleted: "bg:#ffdddd #000000",
- chroma.GenericInserted: "bg:#ddffdd #000000",
- chroma.GenericError: "#aa0000",
- chroma.GenericEmph: "italic",
- chroma.GenericStrong: "bold",
- chroma.GenericPrompt: "#555555",
- chroma.GenericOutput: "#888888",
- chroma.GenericTraceback: "#aa0000",
- chroma.GenericUnderline: "underline",
- chroma.Error: "bg:#e3d2d2 #a61717",
- chroma.Background: " bg:#ffffff",
-}))
diff --git a/styles/pastie.xml b/styles/pastie.xml
new file mode 100644
index 000000000..a3b0abde5
--- /dev/null
+++ b/styles/pastie.xml
@@ -0,0 +1,45 @@
+
\ No newline at end of file
diff --git a/styles/perldoc.go b/styles/perldoc.go
deleted file mode 100644
index 813b713b2..000000000
--- a/styles/perldoc.go
+++ /dev/null
@@ -1,44 +0,0 @@
-package styles
-
-import (
- "github.com/alecthomas/chroma/v2"
-)
-
-// Perldoc style.
-var Perldoc = Register(chroma.MustNewStyle("perldoc", chroma.StyleEntries{
- chroma.TextWhitespace: "#bbbbbb",
- chroma.Comment: "#228B22",
- chroma.CommentPreproc: "#1e889b",
- chroma.CommentSpecial: "#8B008B bold",
- chroma.LiteralString: "#CD5555",
- chroma.LiteralStringHeredoc: "#1c7e71 italic",
- chroma.LiteralStringRegex: "#1c7e71",
- chroma.LiteralStringOther: "#cb6c20",
- chroma.LiteralNumber: "#B452CD",
- chroma.OperatorWord: "#8B008B",
- chroma.Keyword: "#8B008B bold",
- chroma.KeywordType: "#00688B",
- chroma.NameClass: "#008b45 bold",
- chroma.NameException: "#008b45 bold",
- chroma.NameFunction: "#008b45",
- chroma.NameNamespace: "#008b45 underline",
- chroma.NameVariable: "#00688B",
- chroma.NameConstant: "#00688B",
- chroma.NameDecorator: "#707a7c",
- chroma.NameTag: "#8B008B bold",
- chroma.NameAttribute: "#658b00",
- chroma.NameBuiltin: "#658b00",
- chroma.GenericHeading: "bold #000080",
- chroma.GenericSubheading: "bold #800080",
- chroma.GenericDeleted: "#aa0000",
- chroma.GenericInserted: "#00aa00",
- chroma.GenericError: "#aa0000",
- chroma.GenericEmph: "italic",
- chroma.GenericStrong: "bold",
- chroma.GenericPrompt: "#555555",
- chroma.GenericOutput: "#888888",
- chroma.GenericTraceback: "#aa0000",
- chroma.GenericUnderline: "underline",
- chroma.Error: "bg:#e3d2d2 #a61717",
- chroma.Background: " bg:#eeeedd",
-}))
diff --git a/styles/perldoc.xml b/styles/perldoc.xml
new file mode 100644
index 000000000..9e5564c3f
--- /dev/null
+++ b/styles/perldoc.xml
@@ -0,0 +1,37 @@
+
\ No newline at end of file
diff --git a/styles/pygments.go b/styles/pygments.go
deleted file mode 100644
index 856e387b6..000000000
--- a/styles/pygments.go
+++ /dev/null
@@ -1,55 +0,0 @@
-package styles
-
-import (
- "github.com/alecthomas/chroma/v2"
-)
-
-// Pygments default theme.
-var Pygments = Register(chroma.MustNewStyle("pygments", chroma.StyleEntries{
- chroma.Whitespace: "#bbbbbb",
- chroma.Comment: "italic #408080",
- chroma.CommentPreproc: "noitalic #BC7A00",
-
- chroma.Keyword: "bold #008000",
- chroma.KeywordPseudo: "nobold",
- chroma.KeywordType: "nobold #B00040",
-
- chroma.Operator: "#666666",
- chroma.OperatorWord: "bold #AA22FF",
-
- chroma.NameBuiltin: "#008000",
- chroma.NameFunction: "#0000FF",
- chroma.NameClass: "bold #0000FF",
- chroma.NameNamespace: "bold #0000FF",
- chroma.NameException: "bold #D2413A",
- chroma.NameVariable: "#19177C",
- chroma.NameConstant: "#880000",
- chroma.NameLabel: "#A0A000",
- chroma.NameEntity: "bold #999999",
- chroma.NameAttribute: "#7D9029",
- chroma.NameTag: "bold #008000",
- chroma.NameDecorator: "#AA22FF",
-
- chroma.String: "#BA2121",
- chroma.StringDoc: "italic",
- chroma.StringInterpol: "bold #BB6688",
- chroma.StringEscape: "bold #BB6622",
- chroma.StringRegex: "#BB6688",
- chroma.StringSymbol: "#19177C",
- chroma.StringOther: "#008000",
- chroma.Number: "#666666",
-
- chroma.GenericHeading: "bold #000080",
- chroma.GenericSubheading: "bold #800080",
- chroma.GenericDeleted: "#A00000",
- chroma.GenericInserted: "#00A000",
- chroma.GenericError: "#FF0000",
- chroma.GenericEmph: "italic",
- chroma.GenericStrong: "bold",
- chroma.GenericPrompt: "bold #000080",
- chroma.GenericOutput: "#888",
- chroma.GenericTraceback: "#04D",
- chroma.GenericUnderline: "underline",
-
- chroma.Error: "border:#FF0000",
-}))
diff --git a/styles/pygments.xml b/styles/pygments.xml
new file mode 100644
index 000000000..a3d0d8bab
--- /dev/null
+++ b/styles/pygments.xml
@@ -0,0 +1,42 @@
+
\ No newline at end of file
diff --git a/styles/rainbow_dash.go b/styles/rainbow_dash.go
deleted file mode 100644
index b681eb1e0..000000000
--- a/styles/rainbow_dash.go
+++ /dev/null
@@ -1,47 +0,0 @@
-package styles
-
-import (
- "github.com/alecthomas/chroma/v2"
-)
-
-// RainbowDash style.
-var RainbowDash = Register(chroma.MustNewStyle("rainbow_dash", chroma.StyleEntries{
- chroma.Comment: "italic #0080ff",
- chroma.CommentPreproc: "noitalic",
- chroma.CommentSpecial: "bold",
- chroma.Error: "bg:#cc0000 #ffffff",
- chroma.GenericDeleted: "border:#c5060b bg:#ffcccc",
- chroma.GenericEmph: "italic",
- chroma.GenericError: "#ff0000",
- chroma.GenericHeading: "bold #2c5dcd",
- chroma.GenericInserted: "border:#00cc00 bg:#ccffcc",
- chroma.GenericOutput: "#aaaaaa",
- chroma.GenericPrompt: "bold #2c5dcd",
- chroma.GenericStrong: "bold",
- chroma.GenericSubheading: "bold #2c5dcd",
- chroma.GenericTraceback: "#c5060b",
- chroma.GenericUnderline: "underline",
- chroma.Keyword: "bold #2c5dcd",
- chroma.KeywordPseudo: "nobold",
- chroma.KeywordType: "#5918bb",
- chroma.NameAttribute: "italic #2c5dcd",
- chroma.NameBuiltin: "bold #5918bb",
- chroma.NameClass: "underline",
- chroma.NameConstant: "#318495",
- chroma.NameDecorator: "bold #ff8000",
- chroma.NameEntity: "bold #5918bb",
- chroma.NameException: "bold #5918bb",
- chroma.NameFunction: "bold #ff8000",
- chroma.NameTag: "bold #2c5dcd",
- chroma.LiteralNumber: "bold #5918bb",
- chroma.Operator: "#2c5dcd",
- chroma.OperatorWord: "bold",
- chroma.LiteralString: "#00cc66",
- chroma.LiteralStringDoc: "italic",
- chroma.LiteralStringEscape: "bold #c5060b",
- chroma.LiteralStringOther: "#318495",
- chroma.LiteralStringSymbol: "bold #c5060b",
- chroma.Text: "#4d4d4d",
- chroma.TextWhitespace: "#cbcbcb",
- chroma.Background: " bg:#ffffff",
-}))
diff --git a/styles/rainbow_dash.xml b/styles/rainbow_dash.xml
new file mode 100644
index 000000000..5b0fe49d6
--- /dev/null
+++ b/styles/rainbow_dash.xml
@@ -0,0 +1,40 @@
+
\ No newline at end of file
diff --git a/styles/rose-pine-dawn.go b/styles/rose-pine-dawn.go
deleted file mode 100644
index d6c641d50..000000000
--- a/styles/rose-pine-dawn.go
+++ /dev/null
@@ -1,50 +0,0 @@
-package styles
-
-import (
- "github.com/alecthomas/chroma/v2"
-)
-
-var (
- dawnBase = "#faf4ed"
- dawnOverlay = "#f2e9e1"
- dawnMuted = "#9893a5"
- dawnSubtle = "#797593"
- dawnText = "#575279"
- dawnLove = "#b4637a"
- dawnGold = "#ea9d34"
- dawnRose = "#d7827e"
- dawnPine = "#286983"
- dawnFoam = "#56949f"
- dawnIris = "#907aa9"
-)
-
-// RosePine (dawn) style.
-var RosePineDawn = Register(chroma.MustNewStyle("rose-pine-dawn", chroma.StyleEntries{
- chroma.Text: dawnText,
- chroma.Error: dawnLove,
- chroma.Comment: dawnMuted,
- chroma.Keyword: dawnPine,
- chroma.KeywordNamespace: dawnIris,
- chroma.Operator: dawnSubtle,
- chroma.Punctuation: dawnSubtle,
- chroma.Name: dawnRose,
- chroma.NameAttribute: dawnRose,
- chroma.NameClass: dawnFoam,
- chroma.NameConstant: dawnGold,
- chroma.NameDecorator: dawnSubtle,
- chroma.NameException: dawnPine,
- chroma.NameFunction: dawnRose,
- chroma.NameOther: dawnText,
- chroma.NameTag: dawnRose,
- chroma.LiteralNumber: dawnGold,
- chroma.Literal: dawnGold,
- chroma.LiteralDate: dawnGold,
- chroma.LiteralString: dawnGold,
- chroma.LiteralStringEscape: dawnPine,
- chroma.GenericDeleted: dawnLove,
- chroma.GenericEmph: "italic",
- chroma.GenericInserted: dawnFoam,
- chroma.GenericStrong: "bold",
- chroma.GenericSubheading: dawnOverlay,
- chroma.Background: "bg:" + dawnBase,
-}))
diff --git a/styles/rose-pine-dawn.xml b/styles/rose-pine-dawn.xml
new file mode 100644
index 000000000..c3313f5c7
--- /dev/null
+++ b/styles/rose-pine-dawn.xml
@@ -0,0 +1,29 @@
+
\ No newline at end of file
diff --git a/styles/rose-pine-moon.go b/styles/rose-pine-moon.go
deleted file mode 100644
index 137f18d12..000000000
--- a/styles/rose-pine-moon.go
+++ /dev/null
@@ -1,50 +0,0 @@
-package styles
-
-import (
- "github.com/alecthomas/chroma/v2"
-)
-
-var (
- moonBase = "#232136"
- moonOverlay = "#393552"
- moonMuted = "#6e6a86"
- moonSubtle = "#908caa"
- moonText = "#e0def4"
- moonLove = "#eb6f92"
- moonGold = "#f6c177"
- moonRose = "#ea9a97"
- moonPine = "#3e8fb0"
- moonFoam = "#9ccfd8"
- moonIris = "#c4a7e7"
-)
-
-// RosePine (moon) style.
-var RosePineMoon = Register(chroma.MustNewStyle("rose-pine-moon", chroma.StyleEntries{
- chroma.Text: moonText,
- chroma.Error: moonLove,
- chroma.Comment: moonMuted,
- chroma.Keyword: moonPine,
- chroma.KeywordNamespace: moonIris,
- chroma.Operator: moonSubtle,
- chroma.Punctuation: moonSubtle,
- chroma.Name: moonRose,
- chroma.NameAttribute: moonRose,
- chroma.NameClass: moonFoam,
- chroma.NameConstant: moonGold,
- chroma.NameDecorator: moonSubtle,
- chroma.NameException: moonPine,
- chroma.NameFunction: moonRose,
- chroma.NameOther: moonText,
- chroma.NameTag: moonRose,
- chroma.LiteralNumber: moonGold,
- chroma.Literal: moonGold,
- chroma.LiteralDate: moonGold,
- chroma.LiteralString: moonGold,
- chroma.LiteralStringEscape: moonPine,
- chroma.GenericDeleted: moonLove,
- chroma.GenericEmph: "italic",
- chroma.GenericInserted: moonFoam,
- chroma.GenericStrong: "bold",
- chroma.GenericSubheading: moonOverlay,
- chroma.Background: "bg:" + moonBase,
-}))
diff --git a/styles/rose-pine-moon.xml b/styles/rose-pine-moon.xml
new file mode 100644
index 000000000..890bd01e1
--- /dev/null
+++ b/styles/rose-pine-moon.xml
@@ -0,0 +1,29 @@
+
\ No newline at end of file
diff --git a/styles/rose-pine.go b/styles/rose-pine.go
deleted file mode 100644
index c6bae398d..000000000
--- a/styles/rose-pine.go
+++ /dev/null
@@ -1,50 +0,0 @@
-package styles
-
-import (
- "github.com/alecthomas/chroma/v2"
-)
-
-var (
- base = "#191724"
- overlay = "#26233a"
- muted = "#6e6a86"
- subtle = "#908caa"
- text = "#e0def4"
- love = "#eb6f92"
- gold = "#f6c177"
- rose = "#ebbcba"
- pine = "#31748f"
- foam = "#9ccfd8"
- iris = "#c4a7e7"
-)
-
-// RosePine (Main) style.
-var RosePine = Register(chroma.MustNewStyle("rose-pine", chroma.StyleEntries{
- chroma.Text: text,
- chroma.Error: love,
- chroma.Comment: muted,
- chroma.Keyword: pine,
- chroma.KeywordNamespace: iris,
- chroma.Operator: subtle,
- chroma.Punctuation: subtle,
- chroma.Name: rose,
- chroma.NameAttribute: rose,
- chroma.NameClass: foam,
- chroma.NameConstant: gold,
- chroma.NameDecorator: subtle,
- chroma.NameException: pine,
- chroma.NameFunction: rose,
- chroma.NameOther: text,
- chroma.NameTag: rose,
- chroma.LiteralNumber: gold,
- chroma.Literal: gold,
- chroma.LiteralDate: gold,
- chroma.LiteralString: gold,
- chroma.LiteralStringEscape: pine,
- chroma.GenericDeleted: love,
- chroma.GenericEmph: "italic",
- chroma.GenericInserted: foam,
- chroma.GenericStrong: "bold",
- chroma.GenericSubheading: overlay,
- chroma.Background: "bg:" + base,
-}))
diff --git a/styles/rose-pine.xml b/styles/rose-pine.xml
new file mode 100644
index 000000000..305b42c6a
--- /dev/null
+++ b/styles/rose-pine.xml
@@ -0,0 +1,29 @@
+
\ No newline at end of file
diff --git a/styles/rrt.go b/styles/rrt.go
deleted file mode 100644
index 6eda8c440..000000000
--- a/styles/rrt.go
+++ /dev/null
@@ -1,20 +0,0 @@
-package styles
-
-import (
- "github.com/alecthomas/chroma/v2"
-)
-
-// Rrt style.
-var Rrt = Register(chroma.MustNewStyle("rrt", chroma.StyleEntries{
- chroma.CommentPreproc: "#e5e5e5",
- chroma.Comment: "#00ff00",
- chroma.KeywordType: "#ee82ee",
- chroma.Keyword: "#ff0000",
- chroma.LiteralNumber: "#ff6600",
- chroma.LiteralStringSymbol: "#ff6600",
- chroma.LiteralString: "#87ceeb",
- chroma.NameFunction: "#ffff00",
- chroma.NameConstant: "#7fffd4",
- chroma.NameVariable: "#eedd82",
- chroma.Background: "#f8f8f2 bg:#000000",
-}))
diff --git a/styles/rrt.xml b/styles/rrt.xml
new file mode 100644
index 000000000..5f1daaa2c
--- /dev/null
+++ b/styles/rrt.xml
@@ -0,0 +1,13 @@
+
\ No newline at end of file
diff --git a/styles/solarized-dark.go b/styles/solarized-dark.go
deleted file mode 100644
index 91ce4d906..000000000
--- a/styles/solarized-dark.go
+++ /dev/null
@@ -1,46 +0,0 @@
-package styles
-
-import (
- "github.com/alecthomas/chroma/v2"
-)
-
-// SolarizedDark style.
-var SolarizedDark = Register(chroma.MustNewStyle("solarized-dark", chroma.StyleEntries{
- chroma.Keyword: "#719e07",
- chroma.KeywordConstant: "#CB4B16",
- chroma.KeywordDeclaration: "#268BD2",
- chroma.KeywordReserved: "#268BD2",
- chroma.KeywordType: "#DC322F",
- chroma.NameAttribute: "#93A1A1",
- chroma.NameBuiltin: "#B58900",
- chroma.NameBuiltinPseudo: "#268BD2",
- chroma.NameClass: "#268BD2",
- chroma.NameConstant: "#CB4B16",
- chroma.NameDecorator: "#268BD2",
- chroma.NameEntity: "#CB4B16",
- chroma.NameException: "#CB4B16",
- chroma.NameFunction: "#268BD2",
- chroma.NameTag: "#268BD2",
- chroma.NameVariable: "#268BD2",
- chroma.LiteralString: "#2AA198",
- chroma.LiteralStringBacktick: "#586E75",
- chroma.LiteralStringChar: "#2AA198",
- chroma.LiteralStringDoc: "#93A1A1",
- chroma.LiteralStringEscape: "#CB4B16",
- chroma.LiteralStringHeredoc: "#93A1A1",
- chroma.LiteralStringRegex: "#DC322F",
- chroma.LiteralNumber: "#2AA198",
- chroma.Operator: "#719e07",
- chroma.Comment: "#586E75",
- chroma.CommentPreproc: "#719e07",
- chroma.CommentSpecial: "#719e07",
- chroma.GenericDeleted: "#DC322F",
- chroma.GenericEmph: "italic",
- chroma.GenericError: "#DC322F bold",
- chroma.GenericHeading: "#CB4B16",
- chroma.GenericInserted: "#719e07",
- chroma.GenericStrong: "bold",
- chroma.GenericSubheading: "#268BD2",
- chroma.Background: "#93A1A1 bg:#002B36",
- chroma.Other: "#CB4B16",
-}))
diff --git a/styles/solarized-dark.xml b/styles/solarized-dark.xml
new file mode 100644
index 000000000..a3cf46fdd
--- /dev/null
+++ b/styles/solarized-dark.xml
@@ -0,0 +1,39 @@
+
\ No newline at end of file
diff --git a/styles/solarized-dark256.go b/styles/solarized-dark256.go
deleted file mode 100644
index 8e313928a..000000000
--- a/styles/solarized-dark256.go
+++ /dev/null
@@ -1,48 +0,0 @@
-package styles
-
-import (
- "github.com/alecthomas/chroma/v2"
-)
-
-// SolarizedDark256 style.
-var SolarizedDark256 = Register(chroma.MustNewStyle("solarized-dark256", chroma.StyleEntries{
- chroma.Keyword: "#5f8700",
- chroma.KeywordConstant: "#d75f00",
- chroma.KeywordDeclaration: "#0087ff",
- chroma.KeywordNamespace: "#d75f00",
- chroma.KeywordReserved: "#0087ff",
- chroma.KeywordType: "#af0000",
- chroma.NameAttribute: "#8a8a8a",
- chroma.NameBuiltin: "#0087ff",
- chroma.NameBuiltinPseudo: "#0087ff",
- chroma.NameClass: "#0087ff",
- chroma.NameConstant: "#d75f00",
- chroma.NameDecorator: "#0087ff",
- chroma.NameEntity: "#d75f00",
- chroma.NameException: "#af8700",
- chroma.NameFunction: "#0087ff",
- chroma.NameTag: "#0087ff",
- chroma.NameVariable: "#0087ff",
- chroma.LiteralString: "#00afaf",
- chroma.LiteralStringBacktick: "#4e4e4e",
- chroma.LiteralStringChar: "#00afaf",
- chroma.LiteralStringDoc: "#00afaf",
- chroma.LiteralStringEscape: "#af0000",
- chroma.LiteralStringHeredoc: "#00afaf",
- chroma.LiteralStringRegex: "#af0000",
- chroma.LiteralNumber: "#00afaf",
- chroma.Operator: "#8a8a8a",
- chroma.OperatorWord: "#5f8700",
- chroma.Comment: "#4e4e4e",
- chroma.CommentPreproc: "#5f8700",
- chroma.CommentSpecial: "#5f8700",
- chroma.GenericDeleted: "#af0000",
- chroma.GenericEmph: "italic",
- chroma.GenericError: "#af0000 bold",
- chroma.GenericHeading: "#d75f00",
- chroma.GenericInserted: "#5f8700",
- chroma.GenericStrong: "bold",
- chroma.GenericSubheading: "#0087ff",
- chroma.Background: "#8a8a8a bg:#1c1c1c",
- chroma.Other: "#d75f00",
-}))
diff --git a/styles/solarized-dark256.xml b/styles/solarized-dark256.xml
new file mode 100644
index 000000000..977cfbe3f
--- /dev/null
+++ b/styles/solarized-dark256.xml
@@ -0,0 +1,41 @@
+
\ No newline at end of file
diff --git a/styles/solarized-light.go b/styles/solarized-light.go
deleted file mode 100644
index 517fd0282..000000000
--- a/styles/solarized-light.go
+++ /dev/null
@@ -1,24 +0,0 @@
-package styles
-
-import (
- "github.com/alecthomas/chroma/v2"
-)
-
-// SolarizedLight style.
-var SolarizedLight = Register(chroma.MustNewStyle("solarized-light", chroma.StyleEntries{
- chroma.Text: "bg: #eee8d5 #586e75",
- chroma.Keyword: "#859900",
- chroma.KeywordConstant: "bold",
- chroma.KeywordNamespace: "#dc322f bold",
- chroma.KeywordType: "bold",
- chroma.Name: "#268bd2",
- chroma.NameBuiltin: "#cb4b16",
- chroma.NameClass: "#cb4b16",
- chroma.NameTag: "bold",
- chroma.Literal: "#2aa198",
- chroma.LiteralNumber: "bold",
- chroma.OperatorWord: "#859900",
- chroma.Comment: "#93a1a1 italic",
- chroma.Generic: "#d33682",
- chroma.Background: " bg:#eee8d5",
-}))
diff --git a/styles/solarized-light.xml b/styles/solarized-light.xml
new file mode 100644
index 000000000..4fbc1d4a6
--- /dev/null
+++ b/styles/solarized-light.xml
@@ -0,0 +1,17 @@
+
\ No newline at end of file
diff --git a/styles/swapoff.go b/styles/swapoff.go
deleted file mode 100644
index 0cf7135e3..000000000
--- a/styles/swapoff.go
+++ /dev/null
@@ -1,25 +0,0 @@
-package styles
-
-import (
- "github.com/alecthomas/chroma/v2"
-)
-
-// SwapOff theme.
-var SwapOff = Register(chroma.MustNewStyle("swapoff", chroma.StyleEntries{
- chroma.Background: "#lightgray bg:#black",
- chroma.Number: "bold #ansiyellow",
- chroma.Comment: "#ansiteal",
- chroma.CommentPreproc: "bold #ansigreen",
- chroma.String: "bold #ansiturquoise",
- chroma.Keyword: "bold #ansiwhite",
- chroma.NameKeyword: "bold #ansiwhite",
- chroma.NameBuiltin: "bold #ansiwhite",
- chroma.GenericHeading: "bold",
- chroma.GenericSubheading: "bold",
- chroma.GenericStrong: "bold",
- chroma.GenericUnderline: "underline",
- chroma.NameTag: "bold",
- chroma.NameAttribute: "#ansiteal",
- chroma.Error: "#ansired",
- chroma.LiteralDate: "bold #ansiyellow",
-}))
diff --git a/styles/swapoff.xml b/styles/swapoff.xml
new file mode 100644
index 000000000..8a398df8d
--- /dev/null
+++ b/styles/swapoff.xml
@@ -0,0 +1,18 @@
+
\ No newline at end of file
diff --git a/styles/tango.go b/styles/tango.go
deleted file mode 100644
index 5608752d5..000000000
--- a/styles/tango.go
+++ /dev/null
@@ -1,79 +0,0 @@
-package styles
-
-import (
- "github.com/alecthomas/chroma/v2"
-)
-
-// Tango style.
-var Tango = Register(chroma.MustNewStyle("tango", chroma.StyleEntries{
- chroma.TextWhitespace: "underline #f8f8f8",
- chroma.Error: "#a40000 border:#ef2929",
- chroma.Other: "#000000",
- chroma.Comment: "italic #8f5902",
- chroma.CommentMultiline: "italic #8f5902",
- chroma.CommentPreproc: "italic #8f5902",
- chroma.CommentSingle: "italic #8f5902",
- chroma.CommentSpecial: "italic #8f5902",
- chroma.Keyword: "bold #204a87",
- chroma.KeywordConstant: "bold #204a87",
- chroma.KeywordDeclaration: "bold #204a87",
- chroma.KeywordNamespace: "bold #204a87",
- chroma.KeywordPseudo: "bold #204a87",
- chroma.KeywordReserved: "bold #204a87",
- chroma.KeywordType: "bold #204a87",
- chroma.Operator: "bold #ce5c00",
- chroma.OperatorWord: "bold #204a87",
- chroma.Punctuation: "bold #000000",
- chroma.Name: "#000000",
- chroma.NameAttribute: "#c4a000",
- chroma.NameBuiltin: "#204a87",
- chroma.NameBuiltinPseudo: "#3465a4",
- chroma.NameClass: "#000000",
- chroma.NameConstant: "#000000",
- chroma.NameDecorator: "bold #5c35cc",
- chroma.NameEntity: "#ce5c00",
- chroma.NameException: "bold #cc0000",
- chroma.NameFunction: "#000000",
- chroma.NameProperty: "#000000",
- chroma.NameLabel: "#f57900",
- chroma.NameNamespace: "#000000",
- chroma.NameOther: "#000000",
- chroma.NameTag: "bold #204a87",
- chroma.NameVariable: "#000000",
- chroma.NameVariableClass: "#000000",
- chroma.NameVariableGlobal: "#000000",
- chroma.NameVariableInstance: "#000000",
- chroma.LiteralNumber: "bold #0000cf",
- chroma.LiteralNumberFloat: "bold #0000cf",
- chroma.LiteralNumberHex: "bold #0000cf",
- chroma.LiteralNumberInteger: "bold #0000cf",
- chroma.LiteralNumberIntegerLong: "bold #0000cf",
- chroma.LiteralNumberOct: "bold #0000cf",
- chroma.Literal: "#000000",
- chroma.LiteralDate: "#000000",
- chroma.LiteralString: "#4e9a06",
- chroma.LiteralStringBacktick: "#4e9a06",
- chroma.LiteralStringChar: "#4e9a06",
- chroma.LiteralStringDoc: "italic #8f5902",
- chroma.LiteralStringDouble: "#4e9a06",
- chroma.LiteralStringEscape: "#4e9a06",
- chroma.LiteralStringHeredoc: "#4e9a06",
- chroma.LiteralStringInterpol: "#4e9a06",
- chroma.LiteralStringOther: "#4e9a06",
- chroma.LiteralStringRegex: "#4e9a06",
- chroma.LiteralStringSingle: "#4e9a06",
- chroma.LiteralStringSymbol: "#4e9a06",
- chroma.Generic: "#000000",
- chroma.GenericDeleted: "#a40000",
- chroma.GenericEmph: "italic #000000",
- chroma.GenericError: "#ef2929",
- chroma.GenericHeading: "bold #000080",
- chroma.GenericInserted: "#00A000",
- chroma.GenericOutput: "italic #000000",
- chroma.GenericPrompt: "#8f5902",
- chroma.GenericStrong: "bold #000000",
- chroma.GenericSubheading: "bold #800080",
- chroma.GenericTraceback: "bold #a40000",
- chroma.GenericUnderline: "underline",
- chroma.Background: " bg:#f8f8f8",
-}))
diff --git a/styles/tango.xml b/styles/tango.xml
new file mode 100644
index 000000000..5ca46bb75
--- /dev/null
+++ b/styles/tango.xml
@@ -0,0 +1,72 @@
+
\ No newline at end of file
diff --git a/styles/trac.go b/styles/trac.go
deleted file mode 100644
index c149cd2a2..000000000
--- a/styles/trac.go
+++ /dev/null
@@ -1,42 +0,0 @@
-package styles
-
-import (
- "github.com/alecthomas/chroma/v2"
-)
-
-// Trac style.
-var Trac = Register(chroma.MustNewStyle("trac", chroma.StyleEntries{
- chroma.TextWhitespace: "#bbbbbb",
- chroma.Comment: "italic #999988",
- chroma.CommentPreproc: "bold noitalic #999999",
- chroma.CommentSpecial: "bold #999999",
- chroma.Operator: "bold",
- chroma.LiteralString: "#bb8844",
- chroma.LiteralStringRegex: "#808000",
- chroma.LiteralNumber: "#009999",
- chroma.Keyword: "bold",
- chroma.KeywordType: "#445588",
- chroma.NameBuiltin: "#999999",
- chroma.NameFunction: "bold #990000",
- chroma.NameClass: "bold #445588",
- chroma.NameException: "bold #990000",
- chroma.NameNamespace: "#555555",
- chroma.NameVariable: "#008080",
- chroma.NameConstant: "#008080",
- chroma.NameTag: "#000080",
- chroma.NameAttribute: "#008080",
- chroma.NameEntity: "#800080",
- chroma.GenericHeading: "#999999",
- chroma.GenericSubheading: "#aaaaaa",
- chroma.GenericDeleted: "bg:#ffdddd #000000",
- chroma.GenericInserted: "bg:#ddffdd #000000",
- chroma.GenericError: "#aa0000",
- chroma.GenericEmph: "italic",
- chroma.GenericStrong: "bold",
- chroma.GenericPrompt: "#555555",
- chroma.GenericOutput: "#888888",
- chroma.GenericTraceback: "#aa0000",
- chroma.GenericUnderline: "underline",
- chroma.Error: "bg:#e3d2d2 #a61717",
- chroma.Background: " bg:#ffffff",
-}))
diff --git a/styles/trac.xml b/styles/trac.xml
new file mode 100644
index 000000000..9f1d26678
--- /dev/null
+++ b/styles/trac.xml
@@ -0,0 +1,35 @@
+
\ No newline at end of file
diff --git a/styles/vim.go b/styles/vim.go
deleted file mode 100644
index caa2e09ee..000000000
--- a/styles/vim.go
+++ /dev/null
@@ -1,36 +0,0 @@
-package styles
-
-import (
- "github.com/alecthomas/chroma/v2"
-)
-
-// Vim style.
-var Vim = Register(chroma.MustNewStyle("vim", chroma.StyleEntries{
- chroma.Background: "#cccccc bg:#000000",
- chroma.Comment: "#000080",
- chroma.CommentSpecial: "bold #cd0000",
- chroma.Keyword: "#cdcd00",
- chroma.KeywordDeclaration: "#00cd00",
- chroma.KeywordNamespace: "#cd00cd",
- chroma.KeywordType: "#00cd00",
- chroma.Operator: "#3399cc",
- chroma.OperatorWord: "#cdcd00",
- chroma.NameClass: "#00cdcd",
- chroma.NameBuiltin: "#cd00cd",
- chroma.NameException: "bold #666699",
- chroma.NameVariable: "#00cdcd",
- chroma.LiteralString: "#cd0000",
- chroma.LiteralNumber: "#cd00cd",
- chroma.GenericHeading: "bold #000080",
- chroma.GenericSubheading: "bold #800080",
- chroma.GenericDeleted: "#cd0000",
- chroma.GenericInserted: "#00cd00",
- chroma.GenericError: "#FF0000",
- chroma.GenericEmph: "italic",
- chroma.GenericStrong: "bold",
- chroma.GenericPrompt: "bold #000080",
- chroma.GenericOutput: "#888",
- chroma.GenericTraceback: "#04D",
- chroma.GenericUnderline: "underline",
- chroma.Error: "border:#FF0000",
-}))
diff --git a/styles/vim.xml b/styles/vim.xml
new file mode 100644
index 000000000..fec693434
--- /dev/null
+++ b/styles/vim.xml
@@ -0,0 +1,29 @@
+
\ No newline at end of file
diff --git a/styles/vs.go b/styles/vs.go
deleted file mode 100644
index c601a3139..000000000
--- a/styles/vs.go
+++ /dev/null
@@ -1,23 +0,0 @@
-package styles
-
-import (
- "github.com/alecthomas/chroma/v2"
-)
-
-// VisualStudio style.
-var VisualStudio = Register(chroma.MustNewStyle("vs", chroma.StyleEntries{
- chroma.Comment: "#008000",
- chroma.CommentPreproc: "#0000ff",
- chroma.Keyword: "#0000ff",
- chroma.OperatorWord: "#0000ff",
- chroma.KeywordType: "#2b91af",
- chroma.NameClass: "#2b91af",
- chroma.LiteralString: "#a31515",
- chroma.GenericHeading: "bold",
- chroma.GenericSubheading: "bold",
- chroma.GenericEmph: "italic",
- chroma.GenericStrong: "bold",
- chroma.GenericPrompt: "bold",
- chroma.Error: "border:#FF0000",
- chroma.Background: " bg:#ffffff",
-}))
diff --git a/styles/vs.xml b/styles/vs.xml
new file mode 100644
index 000000000..564350154
--- /dev/null
+++ b/styles/vs.xml
@@ -0,0 +1,16 @@
+
\ No newline at end of file
diff --git a/styles/vulcan.go b/styles/vulcan.go
deleted file mode 100644
index 4060422f8..000000000
--- a/styles/vulcan.go
+++ /dev/null
@@ -1,95 +0,0 @@
-package styles
-
-import (
- "github.com/alecthomas/chroma/v2"
-)
-
-var (
- // inspired by Doom Emacs's One Doom Theme
- black = "#282C34"
- grey = "#3E4460"
- grey2 = "#43454f"
- white = "#C9C9C9"
- red = "#CF5967"
- yellow = "#ECBE7B"
- green = "#82CC6A"
- cyan = "#56B6C2"
- blue = "#7FBAF5"
- blue2 = "#57C7FF"
- purple = "#BC74C4"
-)
-
-var Vulcan = Register(chroma.MustNewStyle("vulcan", chroma.StyleEntries{
- chroma.Comment: grey,
- chroma.CommentHashbang: grey + " italic",
- chroma.CommentMultiline: grey,
- chroma.CommentPreproc: blue,
- chroma.CommentSingle: grey,
- chroma.CommentSpecial: purple + " italic",
- chroma.Generic: white,
- chroma.GenericDeleted: red,
- chroma.GenericEmph: white + " underline",
- chroma.GenericError: red + " bold",
- chroma.GenericHeading: yellow + " bold",
- chroma.GenericInserted: yellow,
- chroma.GenericOutput: grey2,
- chroma.GenericPrompt: white,
- chroma.GenericStrong: red + " bold",
- chroma.GenericSubheading: red + " italic",
- chroma.GenericTraceback: white,
- chroma.GenericUnderline: "underline",
- chroma.Error: red,
- chroma.Keyword: blue,
- chroma.KeywordConstant: red + " bg:" + grey2,
- chroma.KeywordDeclaration: blue,
- chroma.KeywordNamespace: purple,
- chroma.KeywordPseudo: purple,
- chroma.KeywordReserved: blue,
- chroma.KeywordType: blue2 + " bold",
- chroma.Literal: white,
- chroma.LiteralDate: blue2,
- chroma.Name: white,
- chroma.NameAttribute: purple,
- chroma.NameBuiltin: blue,
- chroma.NameBuiltinPseudo: blue,
- chroma.NameClass: yellow,
- chroma.NameConstant: yellow,
- chroma.NameDecorator: yellow,
- chroma.NameEntity: white,
- chroma.NameException: red,
- chroma.NameFunction: blue2,
- chroma.NameLabel: red,
- chroma.NameNamespace: white,
- chroma.NameOther: white,
- chroma.NameTag: purple,
- chroma.NameVariable: purple + " italic",
- chroma.NameVariableClass: blue2 + " bold",
- chroma.NameVariableGlobal: yellow,
- chroma.NameVariableInstance: blue2,
- chroma.LiteralNumber: cyan,
- chroma.LiteralNumberBin: blue2,
- chroma.LiteralNumberFloat: cyan,
- chroma.LiteralNumberHex: blue2,
- chroma.LiteralNumberInteger: cyan,
- chroma.LiteralNumberIntegerLong: cyan,
- chroma.LiteralNumberOct: blue2,
- chroma.Operator: purple,
- chroma.OperatorWord: purple,
- chroma.Other: white,
- chroma.Punctuation: cyan,
- chroma.LiteralString: green,
- chroma.LiteralStringBacktick: blue2,
- chroma.LiteralStringChar: blue2,
- chroma.LiteralStringDoc: green,
- chroma.LiteralStringDouble: green,
- chroma.LiteralStringEscape: cyan,
- chroma.LiteralStringHeredoc: cyan,
- chroma.LiteralStringInterpol: green,
- chroma.LiteralStringOther: green,
- chroma.LiteralStringRegex: blue2,
- chroma.LiteralStringSingle: green,
- chroma.LiteralStringSymbol: green,
- chroma.Text: white,
- chroma.TextWhitespace: white,
- chroma.Background: " bg: " + black,
-}))
diff --git a/styles/vulcan.xml b/styles/vulcan.xml
new file mode 100644
index 000000000..41996ff76
--- /dev/null
+++ b/styles/vulcan.xml
@@ -0,0 +1,74 @@
+
\ No newline at end of file
diff --git a/styles/witchhazel.go b/styles/witchhazel.go
deleted file mode 100644
index 201e6972e..000000000
--- a/styles/witchhazel.go
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright 2018 Alethea Katherine Flowers
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package styles
-
-import (
- "github.com/alecthomas/chroma/v2"
-)
-
-// WitchHazel Style
-var WitchHazel = Register(chroma.MustNewStyle("witchhazel", chroma.StyleEntries{
- chroma.Text: "#F8F8F2",
- chroma.Whitespace: "#A8757B",
- chroma.Error: "#960050 bg:#1e0010",
- chroma.Comment: "#b0bec5",
- chroma.Keyword: "#C2FFDF",
- chroma.KeywordNamespace: "#FFB8D1",
- chroma.Operator: "#FFB8D1",
- chroma.Punctuation: "#F8F8F2",
- chroma.Name: "#F8F8F2",
- chroma.NameAttribute: "#ceb1ff",
- chroma.NameBuiltinPseudo: "#80cbc4",
- chroma.NameClass: "#ceb1ff",
- chroma.NameConstant: "#C5A3FF",
- chroma.NameDecorator: "#ceb1ff",
- chroma.NameException: "#ceb1ff",
- chroma.NameFunction: "#ceb1ff",
- chroma.NameProperty: "#F8F8F2",
- chroma.NameTag: "#FFB8D1",
- chroma.NameVariable: "#F8F8F2",
- chroma.Number: "#C5A3FF",
- chroma.Literal: "#ae81ff",
- chroma.LiteralDate: "#e6db74",
- chroma.String: "#1bc5e0",
- chroma.GenericDeleted: "#f92672",
- chroma.GenericEmph: "italic",
- chroma.GenericInserted: "#a6e22e",
- chroma.GenericStrong: "bold",
- chroma.GenericSubheading: "#75715e",
- chroma.Background: " bg:#433e56",
-}))
diff --git a/styles/witchhazel.xml b/styles/witchhazel.xml
new file mode 100644
index 000000000..52f229913
--- /dev/null
+++ b/styles/witchhazel.xml
@@ -0,0 +1,31 @@
+
\ No newline at end of file
diff --git a/styles/xcode-dark.go b/styles/xcode-dark.go
deleted file mode 100644
index 80a2a8324..000000000
--- a/styles/xcode-dark.go
+++ /dev/null
@@ -1,62 +0,0 @@
-package styles
-
-import (
- "github.com/alecthomas/chroma/v2"
-)
-
-var (
- // Inspired by Apple's Xcode "Default (Dark)" Theme
- background = "#1F1F24"
- plainText = "#FFFFFF"
- comments = "#6C7986"
- strings = "#FC6A5D"
- numbers = "#D0BF69"
- keywords = "#FC5FA3"
- preprocessorStatements = "#FD8F3F"
- typeDeclarations = "#5DD8FF"
- otherDeclarations = "#41A1C0"
- otherFunctionAndMethodNames = "#A167E6"
- otherTypeNames = "#D0A8FF"
-)
-
-// Xcode dark style
-var XcodeDark = Register(chroma.MustNewStyle("xcode-dark", chroma.StyleEntries{
- chroma.Background: plainText + " bg:" + background,
-
- chroma.Comment: comments,
- chroma.CommentMultiline: comments,
- chroma.CommentPreproc: preprocessorStatements,
- chroma.CommentSingle: comments,
- chroma.CommentSpecial: comments + " italic",
-
- chroma.Error: "#960050",
-
- chroma.Keyword: keywords,
- chroma.KeywordConstant: keywords,
- chroma.KeywordDeclaration: keywords,
- chroma.KeywordReserved: keywords,
-
- chroma.LiteralNumber: numbers,
- chroma.LiteralNumberBin: numbers,
- chroma.LiteralNumberFloat: numbers,
- chroma.LiteralNumberHex: numbers,
- chroma.LiteralNumberInteger: numbers,
- chroma.LiteralNumberOct: numbers,
-
- chroma.LiteralString: strings,
- chroma.LiteralStringEscape: strings,
- chroma.LiteralStringInterpol: plainText,
-
- chroma.Name: plainText,
- chroma.NameBuiltin: otherTypeNames,
- chroma.NameBuiltinPseudo: otherFunctionAndMethodNames,
- chroma.NameClass: typeDeclarations,
- chroma.NameFunction: otherDeclarations,
- chroma.NameVariable: otherDeclarations,
-
- chroma.Operator: plainText,
-
- chroma.Punctuation: plainText,
-
- chroma.Text: plainText,
-}))
diff --git a/styles/xcode-dark.xml b/styles/xcode-dark.xml
new file mode 100644
index 000000000..93439791f
--- /dev/null
+++ b/styles/xcode-dark.xml
@@ -0,0 +1,31 @@
+
\ No newline at end of file
diff --git a/styles/xcode.go b/styles/xcode.go
deleted file mode 100644
index 592c9e315..000000000
--- a/styles/xcode.go
+++ /dev/null
@@ -1,29 +0,0 @@
-package styles
-
-import (
- "github.com/alecthomas/chroma/v2"
-)
-
-// Xcode style.
-var Xcode = Register(chroma.MustNewStyle("xcode", chroma.StyleEntries{
- chroma.Comment: "#177500",
- chroma.CommentPreproc: "#633820",
- chroma.LiteralString: "#C41A16",
- chroma.LiteralStringChar: "#2300CE",
- chroma.Operator: "#000000",
- chroma.Keyword: "#A90D91",
- chroma.Name: "#000000",
- chroma.NameAttribute: "#836C28",
- chroma.NameClass: "#3F6E75",
- chroma.NameFunction: "#000000",
- chroma.NameBuiltin: "#A90D91",
- chroma.NameBuiltinPseudo: "#5B269A",
- chroma.NameVariable: "#000000",
- chroma.NameTag: "#000000",
- chroma.NameDecorator: "#000000",
- chroma.NameLabel: "#000000",
- chroma.Literal: "#1C01CE",
- chroma.LiteralNumber: "#1C01CE",
- chroma.Error: "#000000",
- chroma.Background: " bg:#ffffff",
-}))
diff --git a/styles/xcode.xml b/styles/xcode.xml
new file mode 100644
index 000000000..523d746cf
--- /dev/null
+++ b/styles/xcode.xml
@@ -0,0 +1,22 @@
+
\ No newline at end of file
diff --git a/tokentype_enumer.go b/tokentype_enumer.go
new file mode 100644
index 000000000..da5fa0c7c
--- /dev/null
+++ b/tokentype_enumer.go
@@ -0,0 +1,254 @@
+// Code generated by "enumer -text -type TokenType"; DO NOT EDIT.
+
+package chroma
+
+import (
+ "fmt"
+)
+
+const _TokenTypeName = "NoneOtherErrorCodeLineLineLinkLineTableTDLineTableLineHighlightLineNumbersTableLineNumbersLinePreWrapperBackgroundEOFTypeKeywordKeywordConstantKeywordDeclarationKeywordNamespaceKeywordPseudoKeywordReservedKeywordTypeNameNameAttributeNameBuiltinNameBuiltinPseudoNameClassNameConstantNameDecoratorNameEntityNameExceptionNameFunctionNameFunctionMagicNameKeywordNameLabelNameNamespaceNameOperatorNameOtherNamePseudoNamePropertyNameTagNameVariableNameVariableAnonymousNameVariableClassNameVariableGlobalNameVariableInstanceNameVariableMagicLiteralLiteralDateLiteralOtherLiteralStringLiteralStringAffixLiteralStringAtomLiteralStringBacktickLiteralStringBooleanLiteralStringCharLiteralStringDelimiterLiteralStringDocLiteralStringDoubleLiteralStringEscapeLiteralStringHeredocLiteralStringInterpolLiteralStringNameLiteralStringOtherLiteralStringRegexLiteralStringSingleLiteralStringSymbolLiteralNumberLiteralNumberBinLiteralNumberFloatLiteralNumberHexLiteralNumberIntegerLiteralNumberIntegerLongLiteralNumberOctOperatorOperatorWordPunctuationCommentCommentHashbangCommentMultilineCommentSingleCommentSpecialCommentPreprocCommentPreprocFileGenericGenericDeletedGenericEmphGenericErrorGenericHeadingGenericInsertedGenericOutputGenericPromptGenericStrongGenericSubheadingGenericTracebackGenericUnderlineTextTextWhitespaceTextSymbolTextPunctuation"
+
+var _TokenTypeMap = map[TokenType]string{
+ -13: _TokenTypeName[0:4],
+ -12: _TokenTypeName[4:9],
+ -11: _TokenTypeName[9:14],
+ -10: _TokenTypeName[14:22],
+ -9: _TokenTypeName[22:30],
+ -8: _TokenTypeName[30:41],
+ -7: _TokenTypeName[41:50],
+ -6: _TokenTypeName[50:63],
+ -5: _TokenTypeName[63:79],
+ -4: _TokenTypeName[79:90],
+ -3: _TokenTypeName[90:94],
+ -2: _TokenTypeName[94:104],
+ -1: _TokenTypeName[104:114],
+ 0: _TokenTypeName[114:121],
+ 1000: _TokenTypeName[121:128],
+ 1001: _TokenTypeName[128:143],
+ 1002: _TokenTypeName[143:161],
+ 1003: _TokenTypeName[161:177],
+ 1004: _TokenTypeName[177:190],
+ 1005: _TokenTypeName[190:205],
+ 1006: _TokenTypeName[205:216],
+ 2000: _TokenTypeName[216:220],
+ 2001: _TokenTypeName[220:233],
+ 2002: _TokenTypeName[233:244],
+ 2003: _TokenTypeName[244:261],
+ 2004: _TokenTypeName[261:270],
+ 2005: _TokenTypeName[270:282],
+ 2006: _TokenTypeName[282:295],
+ 2007: _TokenTypeName[295:305],
+ 2008: _TokenTypeName[305:318],
+ 2009: _TokenTypeName[318:330],
+ 2010: _TokenTypeName[330:347],
+ 2011: _TokenTypeName[347:358],
+ 2012: _TokenTypeName[358:367],
+ 2013: _TokenTypeName[367:380],
+ 2014: _TokenTypeName[380:392],
+ 2015: _TokenTypeName[392:401],
+ 2016: _TokenTypeName[401:411],
+ 2017: _TokenTypeName[411:423],
+ 2018: _TokenTypeName[423:430],
+ 2019: _TokenTypeName[430:442],
+ 2020: _TokenTypeName[442:463],
+ 2021: _TokenTypeName[463:480],
+ 2022: _TokenTypeName[480:498],
+ 2023: _TokenTypeName[498:518],
+ 2024: _TokenTypeName[518:535],
+ 3000: _TokenTypeName[535:542],
+ 3001: _TokenTypeName[542:553],
+ 3002: _TokenTypeName[553:565],
+ 3100: _TokenTypeName[565:578],
+ 3101: _TokenTypeName[578:596],
+ 3102: _TokenTypeName[596:613],
+ 3103: _TokenTypeName[613:634],
+ 3104: _TokenTypeName[634:654],
+ 3105: _TokenTypeName[654:671],
+ 3106: _TokenTypeName[671:693],
+ 3107: _TokenTypeName[693:709],
+ 3108: _TokenTypeName[709:728],
+ 3109: _TokenTypeName[728:747],
+ 3110: _TokenTypeName[747:767],
+ 3111: _TokenTypeName[767:788],
+ 3112: _TokenTypeName[788:805],
+ 3113: _TokenTypeName[805:823],
+ 3114: _TokenTypeName[823:841],
+ 3115: _TokenTypeName[841:860],
+ 3116: _TokenTypeName[860:879],
+ 3200: _TokenTypeName[879:892],
+ 3201: _TokenTypeName[892:908],
+ 3202: _TokenTypeName[908:926],
+ 3203: _TokenTypeName[926:942],
+ 3204: _TokenTypeName[942:962],
+ 3205: _TokenTypeName[962:986],
+ 3206: _TokenTypeName[986:1002],
+ 4000: _TokenTypeName[1002:1010],
+ 4001: _TokenTypeName[1010:1022],
+ 5000: _TokenTypeName[1022:1033],
+ 6000: _TokenTypeName[1033:1040],
+ 6001: _TokenTypeName[1040:1055],
+ 6002: _TokenTypeName[1055:1071],
+ 6003: _TokenTypeName[1071:1084],
+ 6004: _TokenTypeName[1084:1098],
+ 6100: _TokenTypeName[1098:1112],
+ 6101: _TokenTypeName[1112:1130],
+ 7000: _TokenTypeName[1130:1137],
+ 7001: _TokenTypeName[1137:1151],
+ 7002: _TokenTypeName[1151:1162],
+ 7003: _TokenTypeName[1162:1174],
+ 7004: _TokenTypeName[1174:1188],
+ 7005: _TokenTypeName[1188:1203],
+ 7006: _TokenTypeName[1203:1216],
+ 7007: _TokenTypeName[1216:1229],
+ 7008: _TokenTypeName[1229:1242],
+ 7009: _TokenTypeName[1242:1259],
+ 7010: _TokenTypeName[1259:1275],
+ 7011: _TokenTypeName[1275:1291],
+ 8000: _TokenTypeName[1291:1295],
+ 8001: _TokenTypeName[1295:1309],
+ 8002: _TokenTypeName[1309:1319],
+ 8003: _TokenTypeName[1319:1334],
+}
+
+func (i TokenType) String() string {
+ if str, ok := _TokenTypeMap[i]; ok {
+ return str
+ }
+ return fmt.Sprintf("TokenType(%d)", i)
+}
+
+var _TokenTypeValues = []TokenType{-13, -12, -11, -10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024, 3000, 3001, 3002, 3100, 3101, 3102, 3103, 3104, 3105, 3106, 3107, 3108, 3109, 3110, 3111, 3112, 3113, 3114, 3115, 3116, 3200, 3201, 3202, 3203, 3204, 3205, 3206, 4000, 4001, 5000, 6000, 6001, 6002, 6003, 6004, 6100, 6101, 7000, 7001, 7002, 7003, 7004, 7005, 7006, 7007, 7008, 7009, 7010, 7011, 8000, 8001, 8002, 8003}
+
+var _TokenTypeNameToValueMap = map[string]TokenType{
+ _TokenTypeName[0:4]: -13,
+ _TokenTypeName[4:9]: -12,
+ _TokenTypeName[9:14]: -11,
+ _TokenTypeName[14:22]: -10,
+ _TokenTypeName[22:30]: -9,
+ _TokenTypeName[30:41]: -8,
+ _TokenTypeName[41:50]: -7,
+ _TokenTypeName[50:63]: -6,
+ _TokenTypeName[63:79]: -5,
+ _TokenTypeName[79:90]: -4,
+ _TokenTypeName[90:94]: -3,
+ _TokenTypeName[94:104]: -2,
+ _TokenTypeName[104:114]: -1,
+ _TokenTypeName[114:121]: 0,
+ _TokenTypeName[121:128]: 1000,
+ _TokenTypeName[128:143]: 1001,
+ _TokenTypeName[143:161]: 1002,
+ _TokenTypeName[161:177]: 1003,
+ _TokenTypeName[177:190]: 1004,
+ _TokenTypeName[190:205]: 1005,
+ _TokenTypeName[205:216]: 1006,
+ _TokenTypeName[216:220]: 2000,
+ _TokenTypeName[220:233]: 2001,
+ _TokenTypeName[233:244]: 2002,
+ _TokenTypeName[244:261]: 2003,
+ _TokenTypeName[261:270]: 2004,
+ _TokenTypeName[270:282]: 2005,
+ _TokenTypeName[282:295]: 2006,
+ _TokenTypeName[295:305]: 2007,
+ _TokenTypeName[305:318]: 2008,
+ _TokenTypeName[318:330]: 2009,
+ _TokenTypeName[330:347]: 2010,
+ _TokenTypeName[347:358]: 2011,
+ _TokenTypeName[358:367]: 2012,
+ _TokenTypeName[367:380]: 2013,
+ _TokenTypeName[380:392]: 2014,
+ _TokenTypeName[392:401]: 2015,
+ _TokenTypeName[401:411]: 2016,
+ _TokenTypeName[411:423]: 2017,
+ _TokenTypeName[423:430]: 2018,
+ _TokenTypeName[430:442]: 2019,
+ _TokenTypeName[442:463]: 2020,
+ _TokenTypeName[463:480]: 2021,
+ _TokenTypeName[480:498]: 2022,
+ _TokenTypeName[498:518]: 2023,
+ _TokenTypeName[518:535]: 2024,
+ _TokenTypeName[535:542]: 3000,
+ _TokenTypeName[542:553]: 3001,
+ _TokenTypeName[553:565]: 3002,
+ _TokenTypeName[565:578]: 3100,
+ _TokenTypeName[578:596]: 3101,
+ _TokenTypeName[596:613]: 3102,
+ _TokenTypeName[613:634]: 3103,
+ _TokenTypeName[634:654]: 3104,
+ _TokenTypeName[654:671]: 3105,
+ _TokenTypeName[671:693]: 3106,
+ _TokenTypeName[693:709]: 3107,
+ _TokenTypeName[709:728]: 3108,
+ _TokenTypeName[728:747]: 3109,
+ _TokenTypeName[747:767]: 3110,
+ _TokenTypeName[767:788]: 3111,
+ _TokenTypeName[788:805]: 3112,
+ _TokenTypeName[805:823]: 3113,
+ _TokenTypeName[823:841]: 3114,
+ _TokenTypeName[841:860]: 3115,
+ _TokenTypeName[860:879]: 3116,
+ _TokenTypeName[879:892]: 3200,
+ _TokenTypeName[892:908]: 3201,
+ _TokenTypeName[908:926]: 3202,
+ _TokenTypeName[926:942]: 3203,
+ _TokenTypeName[942:962]: 3204,
+ _TokenTypeName[962:986]: 3205,
+ _TokenTypeName[986:1002]: 3206,
+ _TokenTypeName[1002:1010]: 4000,
+ _TokenTypeName[1010:1022]: 4001,
+ _TokenTypeName[1022:1033]: 5000,
+ _TokenTypeName[1033:1040]: 6000,
+ _TokenTypeName[1040:1055]: 6001,
+ _TokenTypeName[1055:1071]: 6002,
+ _TokenTypeName[1071:1084]: 6003,
+ _TokenTypeName[1084:1098]: 6004,
+ _TokenTypeName[1098:1112]: 6100,
+ _TokenTypeName[1112:1130]: 6101,
+ _TokenTypeName[1130:1137]: 7000,
+ _TokenTypeName[1137:1151]: 7001,
+ _TokenTypeName[1151:1162]: 7002,
+ _TokenTypeName[1162:1174]: 7003,
+ _TokenTypeName[1174:1188]: 7004,
+ _TokenTypeName[1188:1203]: 7005,
+ _TokenTypeName[1203:1216]: 7006,
+ _TokenTypeName[1216:1229]: 7007,
+ _TokenTypeName[1229:1242]: 7008,
+ _TokenTypeName[1242:1259]: 7009,
+ _TokenTypeName[1259:1275]: 7010,
+ _TokenTypeName[1275:1291]: 7011,
+ _TokenTypeName[1291:1295]: 8000,
+ _TokenTypeName[1295:1309]: 8001,
+ _TokenTypeName[1309:1319]: 8002,
+ _TokenTypeName[1319:1334]: 8003,
+}
+
+// TokenTypeString retrieves an enum value from the enum constants string name.
+// Throws an error if the param is not part of the enum.
+func TokenTypeString(s string) (TokenType, error) {
+ if val, ok := _TokenTypeNameToValueMap[s]; ok {
+ return val, nil
+ }
+ return 0, fmt.Errorf("%s does not belong to TokenType values", s)
+}
+
+// TokenTypeValues returns all values of the enum
+func TokenTypeValues() []TokenType {
+ return _TokenTypeValues
+}
+
+// IsATokenType returns "true" if the value is listed in the enum definition. "false" otherwise
+func (i TokenType) IsATokenType() bool {
+ _, ok := _TokenTypeMap[i]
+ return ok
+}
+
+// MarshalText implements the encoding.TextMarshaler interface for TokenType
+func (i TokenType) MarshalText() ([]byte, error) {
+ return []byte(i.String()), nil
+}
+
+// UnmarshalText implements the encoding.TextUnmarshaler interface for TokenType
+func (i *TokenType) UnmarshalText(text []byte) error {
+ var err error
+ *i, err = TokenTypeString(string(text))
+ return err
+}
diff --git a/tokentype_string.go b/tokentype_string.go
deleted file mode 100644
index 0f6c1a50d..000000000
--- a/tokentype_string.go
+++ /dev/null
@@ -1,221 +0,0 @@
-// Code generated by "stringer -type TokenType"; DO NOT EDIT.
-
-package chroma
-
-import "strconv"
-
-func _() {
- // An "invalid array index" compiler error signifies that the constant values have changed.
- // Re-run the stringer command to generate them again.
- var x [1]struct{}
- _ = x[Background - -1]
- _ = x[PreWrapper - -2]
- _ = x[Line - -3]
- _ = x[LineNumbers - -4]
- _ = x[LineNumbersTable - -5]
- _ = x[LineHighlight - -6]
- _ = x[LineTable - -7]
- _ = x[LineTableTD - -8]
- _ = x[LineLink - -9]
- _ = x[CodeLine - -10]
- _ = x[Error - -11]
- _ = x[Other - -12]
- _ = x[None - -13]
- _ = x[EOFType-0]
- _ = x[Keyword-1000]
- _ = x[KeywordConstant-1001]
- _ = x[KeywordDeclaration-1002]
- _ = x[KeywordNamespace-1003]
- _ = x[KeywordPseudo-1004]
- _ = x[KeywordReserved-1005]
- _ = x[KeywordType-1006]
- _ = x[Name-2000]
- _ = x[NameAttribute-2001]
- _ = x[NameBuiltin-2002]
- _ = x[NameBuiltinPseudo-2003]
- _ = x[NameClass-2004]
- _ = x[NameConstant-2005]
- _ = x[NameDecorator-2006]
- _ = x[NameEntity-2007]
- _ = x[NameException-2008]
- _ = x[NameFunction-2009]
- _ = x[NameFunctionMagic-2010]
- _ = x[NameKeyword-2011]
- _ = x[NameLabel-2012]
- _ = x[NameNamespace-2013]
- _ = x[NameOperator-2014]
- _ = x[NameOther-2015]
- _ = x[NamePseudo-2016]
- _ = x[NameProperty-2017]
- _ = x[NameTag-2018]
- _ = x[NameVariable-2019]
- _ = x[NameVariableAnonymous-2020]
- _ = x[NameVariableClass-2021]
- _ = x[NameVariableGlobal-2022]
- _ = x[NameVariableInstance-2023]
- _ = x[NameVariableMagic-2024]
- _ = x[Literal-3000]
- _ = x[LiteralDate-3001]
- _ = x[LiteralOther-3002]
- _ = x[LiteralString-3100]
- _ = x[LiteralStringAffix-3101]
- _ = x[LiteralStringAtom-3102]
- _ = x[LiteralStringBacktick-3103]
- _ = x[LiteralStringBoolean-3104]
- _ = x[LiteralStringChar-3105]
- _ = x[LiteralStringDelimiter-3106]
- _ = x[LiteralStringDoc-3107]
- _ = x[LiteralStringDouble-3108]
- _ = x[LiteralStringEscape-3109]
- _ = x[LiteralStringHeredoc-3110]
- _ = x[LiteralStringInterpol-3111]
- _ = x[LiteralStringName-3112]
- _ = x[LiteralStringOther-3113]
- _ = x[LiteralStringRegex-3114]
- _ = x[LiteralStringSingle-3115]
- _ = x[LiteralStringSymbol-3116]
- _ = x[LiteralNumber-3200]
- _ = x[LiteralNumberBin-3201]
- _ = x[LiteralNumberFloat-3202]
- _ = x[LiteralNumberHex-3203]
- _ = x[LiteralNumberInteger-3204]
- _ = x[LiteralNumberIntegerLong-3205]
- _ = x[LiteralNumberOct-3206]
- _ = x[Operator-4000]
- _ = x[OperatorWord-4001]
- _ = x[Punctuation-5000]
- _ = x[Comment-6000]
- _ = x[CommentHashbang-6001]
- _ = x[CommentMultiline-6002]
- _ = x[CommentSingle-6003]
- _ = x[CommentSpecial-6004]
- _ = x[CommentPreproc-6100]
- _ = x[CommentPreprocFile-6101]
- _ = x[Generic-7000]
- _ = x[GenericDeleted-7001]
- _ = x[GenericEmph-7002]
- _ = x[GenericError-7003]
- _ = x[GenericHeading-7004]
- _ = x[GenericInserted-7005]
- _ = x[GenericOutput-7006]
- _ = x[GenericPrompt-7007]
- _ = x[GenericStrong-7008]
- _ = x[GenericSubheading-7009]
- _ = x[GenericTraceback-7010]
- _ = x[GenericUnderline-7011]
- _ = x[Text-8000]
- _ = x[TextWhitespace-8001]
- _ = x[TextSymbol-8002]
- _ = x[TextPunctuation-8003]
-}
-
-const _TokenType_name = "NoneOtherErrorCodeLineLineLinksLineTableTDLineTableLineHighlightLineNumbersTableLineNumbersLinePreWrapperBackgroundEOFTypeKeywordKeywordConstantKeywordDeclarationKeywordNamespaceKeywordPseudoKeywordReservedKeywordTypeNameNameAttributeNameBuiltinNameBuiltinPseudoNameClassNameConstantNameDecoratorNameEntityNameExceptionNameFunctionNameFunctionMagicNameKeywordNameLabelNameNamespaceNameOperatorNameOtherNamePseudoNamePropertyNameTagNameVariableNameVariableAnonymousNameVariableClassNameVariableGlobalNameVariableInstanceNameVariableMagicLiteralLiteralDateLiteralOtherLiteralStringLiteralStringAffixLiteralStringAtomLiteralStringBacktickLiteralStringBooleanLiteralStringCharLiteralStringDelimiterLiteralStringDocLiteralStringDoubleLiteralStringEscapeLiteralStringHeredocLiteralStringInterpolLiteralStringNameLiteralStringOtherLiteralStringRegexLiteralStringSingleLiteralStringSymbolLiteralNumberLiteralNumberBinLiteralNumberFloatLiteralNumberHexLiteralNumberIntegerLiteralNumberIntegerLongLiteralNumberOctOperatorOperatorWordPunctuationCommentCommentHashbangCommentMultilineCommentSingleCommentSpecialCommentPreprocCommentPreprocFileGenericGenericDeletedGenericEmphGenericErrorGenericHeadingGenericInsertedGenericOutputGenericPromptGenericStrongGenericSubheadingGenericTracebackGenericUnderlineTextTextWhitespaceTextSymbolTextPunctuation"
-
-var _TokenType_map = map[TokenType]string{
- -13: _TokenType_name[0:4],
- -12: _TokenType_name[4:9],
- -11: _TokenType_name[9:14],
- -10: _TokenType_name[14:22],
- -9: _TokenType_name[22:31],
- -8: _TokenType_name[31:42],
- -7: _TokenType_name[42:51],
- -6: _TokenType_name[51:64],
- -5: _TokenType_name[64:80],
- -4: _TokenType_name[80:91],
- -3: _TokenType_name[91:95],
- -2: _TokenType_name[95:105],
- -1: _TokenType_name[105:115],
- 0: _TokenType_name[115:122],
- 1000: _TokenType_name[122:129],
- 1001: _TokenType_name[129:144],
- 1002: _TokenType_name[144:162],
- 1003: _TokenType_name[162:178],
- 1004: _TokenType_name[178:191],
- 1005: _TokenType_name[191:206],
- 1006: _TokenType_name[206:217],
- 2000: _TokenType_name[217:221],
- 2001: _TokenType_name[221:234],
- 2002: _TokenType_name[234:245],
- 2003: _TokenType_name[245:262],
- 2004: _TokenType_name[262:271],
- 2005: _TokenType_name[271:283],
- 2006: _TokenType_name[283:296],
- 2007: _TokenType_name[296:306],
- 2008: _TokenType_name[306:319],
- 2009: _TokenType_name[319:331],
- 2010: _TokenType_name[331:348],
- 2011: _TokenType_name[348:359],
- 2012: _TokenType_name[359:368],
- 2013: _TokenType_name[368:381],
- 2014: _TokenType_name[381:393],
- 2015: _TokenType_name[393:402],
- 2016: _TokenType_name[402:412],
- 2017: _TokenType_name[412:424],
- 2018: _TokenType_name[424:431],
- 2019: _TokenType_name[431:443],
- 2020: _TokenType_name[443:464],
- 2021: _TokenType_name[464:481],
- 2022: _TokenType_name[481:499],
- 2023: _TokenType_name[499:519],
- 2024: _TokenType_name[519:536],
- 3000: _TokenType_name[536:543],
- 3001: _TokenType_name[543:554],
- 3002: _TokenType_name[554:566],
- 3100: _TokenType_name[566:579],
- 3101: _TokenType_name[579:597],
- 3102: _TokenType_name[597:614],
- 3103: _TokenType_name[614:635],
- 3104: _TokenType_name[635:655],
- 3105: _TokenType_name[655:672],
- 3106: _TokenType_name[672:694],
- 3107: _TokenType_name[694:710],
- 3108: _TokenType_name[710:729],
- 3109: _TokenType_name[729:748],
- 3110: _TokenType_name[748:768],
- 3111: _TokenType_name[768:789],
- 3112: _TokenType_name[789:806],
- 3113: _TokenType_name[806:824],
- 3114: _TokenType_name[824:842],
- 3115: _TokenType_name[842:861],
- 3116: _TokenType_name[861:880],
- 3200: _TokenType_name[880:893],
- 3201: _TokenType_name[893:909],
- 3202: _TokenType_name[909:927],
- 3203: _TokenType_name[927:943],
- 3204: _TokenType_name[943:963],
- 3205: _TokenType_name[963:987],
- 3206: _TokenType_name[987:1003],
- 4000: _TokenType_name[1003:1011],
- 4001: _TokenType_name[1011:1023],
- 5000: _TokenType_name[1023:1034],
- 6000: _TokenType_name[1034:1041],
- 6001: _TokenType_name[1041:1056],
- 6002: _TokenType_name[1056:1072],
- 6003: _TokenType_name[1072:1085],
- 6004: _TokenType_name[1085:1099],
- 6100: _TokenType_name[1099:1113],
- 6101: _TokenType_name[1113:1131],
- 7000: _TokenType_name[1131:1138],
- 7001: _TokenType_name[1138:1152],
- 7002: _TokenType_name[1152:1163],
- 7003: _TokenType_name[1163:1175],
- 7004: _TokenType_name[1175:1189],
- 7005: _TokenType_name[1189:1204],
- 7006: _TokenType_name[1204:1217],
- 7007: _TokenType_name[1217:1230],
- 7008: _TokenType_name[1230:1243],
- 7009: _TokenType_name[1243:1260],
- 7010: _TokenType_name[1260:1276],
- 7011: _TokenType_name[1276:1292],
- 8000: _TokenType_name[1292:1296],
- 8001: _TokenType_name[1296:1310],
- 8002: _TokenType_name[1310:1320],
- 8003: _TokenType_name[1320:1335],
-}
-
-func (i TokenType) String() string {
- if str, ok := _TokenType_map[i]; ok {
- return str
- }
- return "TokenType(" + strconv.FormatInt(int64(i), 10) + ")"
-}
diff --git a/types.go b/types.go
index ee9052475..3d12310a0 100644
--- a/types.go
+++ b/types.go
@@ -1,10 +1,6 @@
package chroma
-import (
- "fmt"
-)
-
-//go:generate stringer -type TokenType
+//go:generate enumer -text -type TokenType
// TokenType is the type of token to highlight.
//
@@ -341,15 +337,4 @@ func (t TokenType) Emit(groups []string, _ *LexerState) Iterator {
return Literator(Token{Type: t, Value: groups[0]})
}
-func (t TokenType) EmitterKind() string { return "token" }
-func (t TokenType) MarshalText() ([]byte, error) { return []byte(t.String()), nil }
-func (t *TokenType) UnmarshalText(data []byte) error {
- key := string(data)
- for tt, text := range _TokenType_map {
- if text == key {
- *t = tt
- return nil
- }
- }
- return fmt.Errorf("unknown TokenType %q", data)
-}
+func (t TokenType) EmitterKind() string { return "token" }