Skip to content

Commit 18c1977

Browse files
committedDec 5, 2022
chore(theme): update gruvbox theme.
1 parent a2fe1d8 commit 18c1977

File tree

2 files changed

+94
-14
lines changed

2 files changed

+94
-14
lines changed
 

‎themes/gruvbox/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
[![npm version](https://img.shields.io/npm/v/@uiw/codemirror-theme-gruvbox-dark.svg)](https://www.npmjs.com/package/@uiw/codemirror-theme-gruvbox-dark)
88

9+
This package implements the [gruvbox](https://github.com/morhetz/gruvbox) light theme for the CodeMirror code editor.
10+
911
<a href="https://uiwjs.github.io/react-codemirror/#/theme/data/gruvbox/dark">
1012
<img width="436" alt="codemirror-theme-eclipse" src="https://user-images.githubusercontent.com/1680273/201111051-c38a73ca-a449-4c01-a4ff-4a675886ca9d.png">
1113
</a>

‎themes/gruvbox/src/index.ts

+92-14
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,98 @@ export const gruvboxDark = createTheme({
2020
gutterForeground: '#7c6f64',
2121
},
2222
styles: [
23-
{ tag: t.comment, color: '#928374' },
24-
{ tag: t.variableName, color: '#ebdbb2' },
25-
{ tag: [t.string, t.special(t.brace)], color: '#b8bb26' },
26-
{ tag: t.number, color: '#d3869b' },
27-
{ tag: t.bool, color: '#d3869b' },
28-
{ tag: t.null, color: '#d3869b' },
29-
{ tag: t.keyword, color: '#f84934' },
30-
{ tag: t.operator, color: '#ebdbb2' },
31-
{ tag: t.className, color: '#8ec07c' },
32-
{ tag: t.definition(t.typeName), color: '#f84934' },
33-
{ tag: t.typeName, color: '#f84934' },
34-
{ tag: t.angleBracket, color: '#fe8019' },
35-
{ tag: t.tagName, color: '#fe8019' },
36-
{ tag: t.attributeName, color: '#8ec07c' },
23+
{ tag: t.keyword, color: '#fb4934' },
24+
{
25+
tag: [t.name, t.deleted, t.character, t.propertyName, t.macroName],
26+
color: '#8ec07c',
27+
},
28+
{ tag: [t.variableName], color: '#83a598' },
29+
{ tag: [t.function(t.variableName)], color: '#b8bb26', fontStyle: 'bold' },
30+
{ tag: [t.labelName], color: '#ebdbb2' },
31+
{
32+
tag: [t.color, t.constant(t.name), t.standard(t.name)],
33+
color: '#d3869b',
34+
},
35+
{ tag: [t.definition(t.name), t.separator], color: '#ebdbb2' },
36+
{ tag: [t.brace], color: '#ebdbb2' },
37+
{
38+
tag: [t.annotation],
39+
color: '#fb4934d',
40+
},
41+
{
42+
tag: [t.number, t.changed, t.annotation, t.modifier, t.self, t.namespace],
43+
color: '#d3869b',
44+
},
45+
{
46+
tag: [t.typeName, t.className],
47+
color: '#fabd2f',
48+
},
49+
{
50+
tag: [t.operator, t.operatorKeyword],
51+
color: '#fb4934',
52+
},
53+
{
54+
tag: [t.tagName],
55+
color: '#8ec07c',
56+
fontStyle: 'bold',
57+
},
58+
{
59+
tag: [t.squareBracket],
60+
color: '#fe8019',
61+
},
62+
{
63+
tag: [t.angleBracket],
64+
color: '#83a598',
65+
},
66+
{
67+
tag: [t.attributeName],
68+
color: '#8ec07c',
69+
},
70+
{
71+
tag: [t.regexp],
72+
color: '#8ec07c',
73+
},
74+
{
75+
tag: [t.quote],
76+
color: '#928374',
77+
},
78+
{ tag: [t.string], color: '#ebdbb2' },
79+
{
80+
tag: t.link,
81+
color: '#a89984',
82+
textDecoration: 'underline',
83+
textUnderlinePosition: 'under',
84+
},
85+
{
86+
tag: [t.url, t.escape, t.special(t.string)],
87+
color: '#d3869b',
88+
},
89+
{ tag: [t.meta], color: '#fabd2f' },
90+
{ tag: [t.comment], color: '#928374', fontStyle: 'italic' },
91+
{ tag: t.strong, fontWeight: 'bold', color: '#fe8019' },
92+
{ tag: t.emphasis, fontStyle: 'italic', color: '#b8bb26' },
93+
{ tag: t.strikethrough, textDecoration: 'line-through' },
94+
{ tag: t.heading, fontWeight: 'bold', color: '#b8bb26' },
95+
{ tag: [t.heading1, t.heading2], fontWeight: 'bold', color: '#b8bb26' },
96+
{
97+
tag: [t.heading3, t.heading4],
98+
fontWeight: 'bold',
99+
color: '#fabd2f',
100+
},
101+
{
102+
tag: [t.heading5, t.heading6],
103+
color: '#fabd2f',
104+
},
105+
{ tag: [t.atom, t.bool, t.special(t.variableName)], color: '#d3869b' },
106+
{
107+
tag: [t.processingInstruction, t.inserted],
108+
color: '#83a598',
109+
},
110+
{
111+
tag: [t.contentSeparator],
112+
color: '#fb4934',
113+
},
114+
{ tag: t.invalid, color: '#fe8019', borderBottom: `1px dotted #fb4934d` },
37115
],
38116
});
39117

0 commit comments

Comments
 (0)
Please sign in to comment.