Skip to content

Commit

Permalink
chore(theme): update gruvbox theme.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Dec 5, 2022
1 parent a2fe1d8 commit 18c1977
Show file tree
Hide file tree
Showing 2 changed files with 94 additions and 14 deletions.
2 changes: 2 additions & 0 deletions themes/gruvbox/README.md
Expand Up @@ -6,6 +6,8 @@

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

This package implements the [gruvbox](https://github.com/morhetz/gruvbox) light theme for the CodeMirror code editor.

<a href="https://uiwjs.github.io/react-codemirror/#/theme/data/gruvbox/dark">
<img width="436" alt="codemirror-theme-eclipse" src="https://user-images.githubusercontent.com/1680273/201111051-c38a73ca-a449-4c01-a4ff-4a675886ca9d.png">
</a>
Expand Down
106 changes: 92 additions & 14 deletions themes/gruvbox/src/index.ts
Expand Up @@ -20,20 +20,98 @@ export const gruvboxDark = createTheme({
gutterForeground: '#7c6f64',
},
styles: [
{ tag: t.comment, color: '#928374' },
{ tag: t.variableName, color: '#ebdbb2' },
{ tag: [t.string, t.special(t.brace)], color: '#b8bb26' },
{ tag: t.number, color: '#d3869b' },
{ tag: t.bool, color: '#d3869b' },
{ tag: t.null, color: '#d3869b' },
{ tag: t.keyword, color: '#f84934' },
{ tag: t.operator, color: '#ebdbb2' },
{ tag: t.className, color: '#8ec07c' },
{ tag: t.definition(t.typeName), color: '#f84934' },
{ tag: t.typeName, color: '#f84934' },
{ tag: t.angleBracket, color: '#fe8019' },
{ tag: t.tagName, color: '#fe8019' },
{ tag: t.attributeName, color: '#8ec07c' },
{ tag: t.keyword, color: '#fb4934' },
{
tag: [t.name, t.deleted, t.character, t.propertyName, t.macroName],
color: '#8ec07c',
},
{ tag: [t.variableName], color: '#83a598' },
{ tag: [t.function(t.variableName)], color: '#b8bb26', fontStyle: 'bold' },
{ tag: [t.labelName], color: '#ebdbb2' },
{
tag: [t.color, t.constant(t.name), t.standard(t.name)],
color: '#d3869b',
},
{ tag: [t.definition(t.name), t.separator], color: '#ebdbb2' },
{ tag: [t.brace], color: '#ebdbb2' },
{
tag: [t.annotation],
color: '#fb4934d',
},
{
tag: [t.number, t.changed, t.annotation, t.modifier, t.self, t.namespace],
color: '#d3869b',
},
{
tag: [t.typeName, t.className],
color: '#fabd2f',
},
{
tag: [t.operator, t.operatorKeyword],
color: '#fb4934',
},
{
tag: [t.tagName],
color: '#8ec07c',
fontStyle: 'bold',
},
{
tag: [t.squareBracket],
color: '#fe8019',
},
{
tag: [t.angleBracket],
color: '#83a598',
},
{
tag: [t.attributeName],
color: '#8ec07c',
},
{
tag: [t.regexp],
color: '#8ec07c',
},
{
tag: [t.quote],
color: '#928374',
},
{ tag: [t.string], color: '#ebdbb2' },
{
tag: t.link,
color: '#a89984',
textDecoration: 'underline',
textUnderlinePosition: 'under',
},
{
tag: [t.url, t.escape, t.special(t.string)],
color: '#d3869b',
},
{ tag: [t.meta], color: '#fabd2f' },
{ tag: [t.comment], color: '#928374', fontStyle: 'italic' },
{ tag: t.strong, fontWeight: 'bold', color: '#fe8019' },
{ tag: t.emphasis, fontStyle: 'italic', color: '#b8bb26' },
{ tag: t.strikethrough, textDecoration: 'line-through' },
{ tag: t.heading, fontWeight: 'bold', color: '#b8bb26' },
{ tag: [t.heading1, t.heading2], fontWeight: 'bold', color: '#b8bb26' },
{
tag: [t.heading3, t.heading4],
fontWeight: 'bold',
color: '#fabd2f',
},
{
tag: [t.heading5, t.heading6],
color: '#fabd2f',
},
{ tag: [t.atom, t.bool, t.special(t.variableName)], color: '#d3869b' },
{
tag: [t.processingInstruction, t.inserted],
color: '#83a598',
},
{
tag: [t.contentSeparator],
color: '#fb4934',
},
{ tag: t.invalid, color: '#fe8019', borderBottom: `1px dotted #fb4934d` },
],
});

Expand Down

0 comments on commit 18c1977

Please sign in to comment.