Skip to content

Commit

Permalink
adds emphasis option (#272)
Browse files Browse the repository at this point in the history
* adds emphasis option

* add testing for emphasis option

---------

Co-authored-by: Alex Koch <[email protected]>
  • Loading branch information
ellisonleao and Alex Koch committed Sep 24, 2023
1 parent b3c0778 commit 22055d8
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 28 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ require("gruvbox").setup({
bold = true,
italic = {
strings = true,
emphasis = true,
comments = true,
operators = false,
folds = true,
Expand Down
2 changes: 1 addition & 1 deletion lua/gruvbox/groups.lua
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ M.setup = function(config)
-- @text.strong ; bold text
["@text.strong"] = { bold = config.bold },
-- @text.emphasis ; text with emphasis
["@text.emphasis"] = { italic = config.italic.strings },
["@text.emphasis"] = { italic = config.italic.emphasis },
-- @text.underline ; underlined text
["@text.underline"] = { underline = config.underline },
-- @text.strike ; strikethrough text
Expand Down
55 changes: 28 additions & 27 deletions lua/gruvbox/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,41 +11,42 @@ local Gruvbox = {}
---@field folds boolean

---@class HighlightDefinition
---@field fg string
---@field bg string
---@field sp string
---@field blend integer
---@field bold boolean
---@field standout boolean
---@field underline boolean
---@field undercurl boolean
---@field underdouble boolean
---@field underdotted boolean
---@field strikethrough boolean
---@field italic boolean
---@field reverse boolean
---@field nocombine boolean
---@field fg string?
---@field bg string?
---@field sp string?
---@field blend integer?
---@field bold boolean?
---@field standout boolean?
---@field underline boolean?
---@field undercurl boolean?
---@field underdouble boolean?
---@field underdotted boolean?
---@field strikethrough boolean?
---@field italic boolean?
---@field reverse boolean?
---@field nocombine boolean?

---@class GruvboxConfig
---@field undercurl boolean
---@field underline boolean
---@field bold boolean
---@field italic ItalicConfig
---@field strikethrough boolean
---@field contrast Contrast
---@field invert_selection boolean
---@field invert_signs boolean
---@field invert_tabline boolean
---@field invert_intend_guides boolean
---@field inverse boolean invert background for search, diffs, statuslines and errors
---@field overrides table<string, HighlightDefinition>
---@field palette_overrides table<string, string>
---@field undercurl boolean?
---@field underline boolean?
---@field bold boolean?
---@field italic ItalicConfig?
---@field strikethrough boolean?
---@field contrast Contrast?
---@field invert_selection boolean?
---@field invert_signs boolean?
---@field invert_tabline boolean?
---@field invert_intend_guides boolean?
---@field inverse boolean?
---@field overrides table<string, HighlightDefinition>?
---@field palette_overrides table<string, string>?
Gruvbox.config = {
undercurl = true,
underline = true,
bold = true,
italic = {
strings = true,
emphasis = true,
comments = true,
operators = false,
folds = true,
Expand Down
1 change: 1 addition & 0 deletions tests/gruvbox/gruvbox_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ describe("setup", function()
bold = true,
italic = {
strings = true,
emphasis = true,
comments = true,
operators = false,
folds = true,
Expand Down

0 comments on commit 22055d8

Please sign in to comment.