diff options
| author | Ellison Leão <ellisonleao@gmail.com> | 2021-03-25 11:33:13 -0300 |
|---|---|---|
| committer | Ellison Leão <ellisonleao@gmail.com> | 2021-03-25 11:33:13 -0300 |
| commit | d54da184123794909e96503ebafa2bf2f79fc36e (patch) | |
| tree | 2862ddc06d52a96bc50fad336f81512ad578cf0f | |
| parent | 8a8eea8b5c8fe38651c254d3f6b6be85833252fd (diff) | |
| download | gruvbox-d54da184123794909e96503ebafa2bf2f79fc36e.tar.gz gruvbox-d54da184123794909e96503ebafa2bf2f79fc36e.tar.xz | |
using table.concat to merge styles in gui properties. #30
| -rw-r--r-- | lua/gruvbox/base.lua | 6 | ||||
| -rw-r--r-- | lua/gruvbox/languages.lua | 7 | ||||
| -rw-r--r-- | lua/gruvbox/settings.lua | 12 |
3 files changed, 14 insertions, 11 deletions
diff --git a/lua/gruvbox/base.lua b/lua/gruvbox/base.lua index b0613c2..66fca81 100644 --- a/lua/gruvbox/base.lua +++ b/lua/gruvbox/base.lua @@ -128,6 +128,8 @@ vim.g.terminal_color_15 = convert.hsl_to_hex(fg1) vim.g.colors_name = "gruvbox" +local table_concat = table.concat + local base_group = lush(function() return { -- Base groups @@ -261,8 +263,8 @@ local base_group = lush(function() Bold {gui = styles.bold}, Italic {gui = styles.italic}, Ignore {}, - Error {GruvboxRed, gui = styles.bold .. "," .. styles.underline}, - Todo {fg = fg0, gui = styles.bold .. "," .. styles.italic_comments}, + Error {GruvboxRed, gui = table_concat({styles.bold, styles.underline}, ",")}, + Todo {fg = fg0, gui = table_concat({styles.bold, styles.italic_comments}, ",")}, diffAdded {GruvboxGreen}, diffRemoved {GruvboxRed}, diffChanged {GruvboxAqua}, diff --git a/lua/gruvbox/languages.lua b/lua/gruvbox/languages.lua index 228d684..3d12b91 100644 --- a/lua/gruvbox/languages.lua +++ b/lua/gruvbox/languages.lua @@ -125,6 +125,7 @@ local clojure = lush(function() end) local html = lush(function() + local table_concat = table.concat return { htmlTag {base.GruvboxAquaBold}, htmlEndTag {base.GruvboxAquaBold}, @@ -138,15 +139,15 @@ local html = lush(function() htmlBold {fg = base.GruvboxFg1.fg.hex, gui = styles.bold}, htmlBoldUnderline { fg = base.GruvboxFg1.fg.hex, - gui = styles.bold .. "," .. styles.underline, + gui = table_concat({styles.bold, styles.underline}, ","), }, htmlBoldItalic { fg = base.GruvboxFg1.fg.hex, - gui = styles.bold .. "," .. styles.italic_strings, + gui = table_concat({styles.bold, styles.italic_strings}, ","), }, htmlBoldUnderlineItalic { fg = base.GruvboxFg1.fg.hex, - gui = styles.bold .. "," .. styles.underline .. "," .. styles.italic_strings, + gui = table_concat({styles.bold, styles.italic_strings}, ","), }, htmlItalic {fg = base.GruvboxFg1.fg.hex, gui = styles.italic_strings}, } diff --git a/lua/gruvbox/settings.lua b/lua/gruvbox/settings.lua index b5df0b0..12e1227 100644 --- a/lua/gruvbox/settings.lua +++ b/lua/gruvbox/settings.lua @@ -42,27 +42,27 @@ end -- styles check if not utils.tobool(vim.g.gruvbox_bold) then - styles.bold = "" + styles.bold = "NONE" end if not utils.tobool(vim.g.gruvbox_underline) then - styles.underline = "" + styles.underline = "NONE" end if not utils.tobool(vim.g.gruvbox_italic) then - styles.italic = "" + styles.italic = "NONE" end if not utils.tobool(vim.g.gruvbox_inverse) then - styles.inverse = "" + styles.inverse = "NONE" end if not utils.tobool(vim.g.gruvbox_inverse) then - styles.inverse = "" + styles.inverse = "NONE" end if not utils.tobool(vim.g.gruvbox_undercurl) then - styles.undercurl = "" + styles.undercurl = "NONE" end if utils.tobool(vim.g.gruvbox_invert_signs) then |
