Skip to content

Commit 458fc56

Browse files
committed
feat(style): gruvbox-dark and light
I am just a user of the theme---I am not related to the authors. ;) Refs for gruvbox ---------------- > gruvbox is heavily inspired by badwolf, jellybeans and solarized. > Designed as a bright theme with pastel 'retro groove' colors and light/dark mode switching in the way of solarized. The main focus when developing gruvbox is to keep colors easily distinguishable, contrast enough and still pleasant for the eyes. * https://github.com/morhetz/gruvbox * https://github.com/morhetz/gruvbox-contrib Closes #168
1 parent 253da61 commit 458fc56

5 files changed

Lines changed: 871 additions & 9 deletions

File tree

styles/gruvbox-dark.go

Lines changed: 229 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,229 @@
1+
package styles
2+
3+
import "charm.land/glamour/v2/ansi"
4+
5+
// GruvboxDarkStyleConfig is the Gruvbox dark style.
6+
var GruvboxDarkStyleConfig = ansi.StyleConfig{
7+
Document: ansi.StyleBlock{
8+
StylePrimitive: ansi.StylePrimitive{
9+
BlockPrefix: "\n",
10+
BlockSuffix: "\n",
11+
Color: stringPtr("#ebdbb2"),
12+
},
13+
Margin: uintPtr(defaultMargin),
14+
},
15+
BlockQuote: ansi.StyleBlock{
16+
StylePrimitive: ansi.StylePrimitive{
17+
Color: stringPtr("#d3869b"),
18+
Italic: boolPtr(true),
19+
},
20+
Indent: uintPtr(2),
21+
IndentToken: stringPtr("│ "),
22+
},
23+
List: ansi.StyleList{
24+
StyleBlock: ansi.StyleBlock{
25+
StylePrimitive: ansi.StylePrimitive{
26+
Color: stringPtr("#ebdbb2"),
27+
},
28+
},
29+
LevelIndent: defaultListIndent,
30+
},
31+
Heading: ansi.StyleBlock{
32+
StylePrimitive: ansi.StylePrimitive{
33+
BlockSuffix: "\n",
34+
Color: stringPtr("#83a598"),
35+
Bold: boolPtr(true),
36+
},
37+
},
38+
H1: ansi.StyleBlock{
39+
StylePrimitive: ansi.StylePrimitive{
40+
Prefix: "# ",
41+
Color: stringPtr("#83a598"),
42+
Bold: boolPtr(true),
43+
},
44+
},
45+
H2: ansi.StyleBlock{
46+
StylePrimitive: ansi.StylePrimitive{
47+
Prefix: "## ",
48+
Color: stringPtr("#83a598"),
49+
Bold: boolPtr(true),
50+
},
51+
},
52+
H3: ansi.StyleBlock{
53+
StylePrimitive: ansi.StylePrimitive{
54+
Prefix: "### ",
55+
Color: stringPtr("#8ec07c"),
56+
Bold: boolPtr(true),
57+
},
58+
},
59+
H4: ansi.StyleBlock{
60+
StylePrimitive: ansi.StylePrimitive{
61+
Prefix: "#### ",
62+
Color: stringPtr("#fabd2f"),
63+
Bold: boolPtr(true),
64+
},
65+
},
66+
H5: ansi.StyleBlock{
67+
StylePrimitive: ansi.StylePrimitive{
68+
Prefix: "##### ",
69+
Color: stringPtr("#fe8019"),
70+
},
71+
},
72+
H6: ansi.StyleBlock{
73+
StylePrimitive: ansi.StylePrimitive{
74+
Prefix: "###### ",
75+
Color: stringPtr("#fb4934"),
76+
},
77+
},
78+
Strikethrough: ansi.StylePrimitive{
79+
CrossedOut: boolPtr(true),
80+
},
81+
Emph: ansi.StylePrimitive{
82+
Color: stringPtr("#d3869b"),
83+
Italic: boolPtr(true),
84+
},
85+
Strong: ansi.StylePrimitive{
86+
Color: stringPtr("#fe8019"),
87+
Bold: boolPtr(true),
88+
},
89+
HorizontalRule: ansi.StylePrimitive{
90+
Color: stringPtr("#a89984"),
91+
Format: "\n--------\n",
92+
},
93+
Item: ansi.StylePrimitive{
94+
BlockPrefix: "• ",
95+
},
96+
Enumeration: ansi.StylePrimitive{
97+
BlockPrefix: ". ",
98+
},
99+
Task: ansi.StyleTask{
100+
StylePrimitive: ansi.StylePrimitive{},
101+
Ticked: "[✓] ",
102+
Unticked: "[ ] ",
103+
},
104+
Link: ansi.StylePrimitive{
105+
Color: stringPtr("#83a598"),
106+
Underline: boolPtr(true),
107+
},
108+
LinkText: ansi.StylePrimitive{
109+
Color: stringPtr("#83a598"),
110+
Bold: boolPtr(true),
111+
},
112+
Image: ansi.StylePrimitive{
113+
Color: stringPtr("#fe8019"),
114+
Underline: boolPtr(true),
115+
},
116+
ImageText: ansi.StylePrimitive{
117+
Color: stringPtr("#928374"),
118+
Format: "Image: {{.text}} →",
119+
},
120+
Code: ansi.StyleBlock{
121+
StylePrimitive: ansi.StylePrimitive{
122+
Prefix: " ",
123+
Suffix: " ",
124+
Color: stringPtr("#fb4934"),
125+
BackgroundColor: stringPtr("#3c3836"),
126+
},
127+
},
128+
CodeBlock: ansi.StyleCodeBlock{
129+
StyleBlock: ansi.StyleBlock{
130+
StylePrimitive: ansi.StylePrimitive{
131+
Color: stringPtr("#ebdbb2"),
132+
},
133+
Margin: uintPtr(defaultMargin),
134+
},
135+
Chroma: &ansi.Chroma{
136+
Text: ansi.StylePrimitive{
137+
Color: stringPtr("#ebdbb2"),
138+
},
139+
Error: ansi.StylePrimitive{
140+
Color: stringPtr("#282828"),
141+
BackgroundColor: stringPtr("#fb4934"),
142+
},
143+
Comment: ansi.StylePrimitive{
144+
Color: stringPtr("#928374"),
145+
},
146+
CommentPreproc: ansi.StylePrimitive{
147+
Color: stringPtr("#fe8019"),
148+
},
149+
Keyword: ansi.StylePrimitive{
150+
Color: stringPtr("#83a598"),
151+
},
152+
KeywordReserved: ansi.StylePrimitive{
153+
Color: stringPtr("#d3869b"),
154+
},
155+
KeywordNamespace: ansi.StylePrimitive{
156+
Color: stringPtr("#fb4934"),
157+
},
158+
KeywordType: ansi.StylePrimitive{
159+
Color: stringPtr("#8ec07c"),
160+
},
161+
Operator: ansi.StylePrimitive{
162+
Color: stringPtr("#fb4934"),
163+
},
164+
Punctuation: ansi.StylePrimitive{
165+
Color: stringPtr("#fb4934"),
166+
},
167+
NameBuiltin: ansi.StylePrimitive{
168+
Color: stringPtr("#83a598"),
169+
},
170+
NameTag: ansi.StylePrimitive{
171+
Color: stringPtr("#8ec07c"),
172+
},
173+
NameAttribute: ansi.StylePrimitive{
174+
Color: stringPtr("#8ec07c"),
175+
},
176+
NameClass: ansi.StylePrimitive{
177+
Color: stringPtr("#ebdbb2"),
178+
Underline: boolPtr(true),
179+
Bold: boolPtr(true),
180+
},
181+
NameConstant: ansi.StylePrimitive{
182+
Color: stringPtr("#8ec07c"),
183+
},
184+
NameDecorator: ansi.StylePrimitive{
185+
Color: stringPtr("#fabd2f"),
186+
},
187+
NameFunction: ansi.StylePrimitive{
188+
Color: stringPtr("#83a598"),
189+
},
190+
LiteralNumber: ansi.StylePrimitive{
191+
Color: stringPtr("#fabd2f"),
192+
},
193+
LiteralString: ansi.StylePrimitive{
194+
Color: stringPtr("#b8bb26"),
195+
},
196+
LiteralStringEscape: ansi.StylePrimitive{
197+
Color: stringPtr("#8ec07c"),
198+
},
199+
GenericDeleted: ansi.StylePrimitive{
200+
Color: stringPtr("#fb4934"),
201+
},
202+
GenericEmph: ansi.StylePrimitive{
203+
Italic: boolPtr(true),
204+
},
205+
GenericInserted: ansi.StylePrimitive{
206+
Color: stringPtr("#b8bb26"),
207+
},
208+
GenericStrong: ansi.StylePrimitive{
209+
Bold: boolPtr(true),
210+
},
211+
GenericSubheading: ansi.StylePrimitive{
212+
Color: stringPtr("#928374"),
213+
},
214+
Background: ansi.StylePrimitive{
215+
BackgroundColor: stringPtr("#32302f"),
216+
},
217+
},
218+
},
219+
Table: ansi.StyleTable{
220+
StyleBlock: ansi.StyleBlock{
221+
StylePrimitive: ansi.StylePrimitive{},
222+
},
223+
},
224+
DefinitionDescription: ansi.StylePrimitive{
225+
BlockPrefix: "\n🠶 ",
226+
},
227+
HTMLBlock: ansi.StyleBlock{},
228+
HTMLSpan: ansi.StyleBlock{},
229+
}

0 commit comments

Comments
 (0)