From 5f324a486a4c0b8f8b55a2219246d31d65846ebc Mon Sep 17 00:00:00 2001 From: zpyg Date: Thu, 13 Jan 2022 19:44:43 +0800 Subject: [PATCH 1/2] Add[styles/gruvbox]: vim gruvbox theme for chroma Converted by _tools/style.py from https://github.com/daveyarwood/gruvbox-pygments --- styles/gruvbox.go | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 styles/gruvbox.go diff --git a/styles/gruvbox.go b/styles/gruvbox.go new file mode 100644 index 000000000..6a392e440 --- /dev/null +++ b/styles/gruvbox.go @@ -0,0 +1,41 @@ +package styles + +import ( + "github.com/alecthomas/chroma" +) + +// 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", +})) + From 8e9a9cfcc6e6f3489933d4b65da3902a9765cef9 Mon Sep 17 00:00:00 2001 From: zpyg Date: Thu, 13 Jan 2022 20:02:26 +0800 Subject: [PATCH 2/2] Fix: formatted styles/gruvbox.go --- styles/gruvbox.go | 65 +++++++++++++++++++++++------------------------ 1 file changed, 32 insertions(+), 33 deletions(-) diff --git a/styles/gruvbox.go b/styles/gruvbox.go index 6a392e440..406133d56 100644 --- a/styles/gruvbox.go +++ b/styles/gruvbox.go @@ -1,41 +1,40 @@ package styles import ( - "github.com/alecthomas/chroma" + "github.com/alecthomas/chroma" ) // 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", + 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", })) -