diff options
author | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2022-10-29 13:23:34 +0200 |
---|---|---|
committer | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2022-10-29 13:23:34 +0200 |
commit | ea64f3b7c74601a5e39fe40f1cd2a43bb7761dff (patch) | |
tree | b6b01af04180a71ced2f8c886800f62840ce5339 /lua/no-clown-fiesta | |
parent | 507e47fe36cf99a5adb6edee13b2b2fa94e97dc5 (diff) |
Fix concat of tables
Diffstat (limited to 'lua/no-clown-fiesta')
-rw-r--r-- | lua/no-clown-fiesta/highlight-group/treesitter.lua | 34 | ||||
-rw-r--r-- | lua/no-clown-fiesta/highlights.lua | 24 |
2 files changed, 45 insertions, 13 deletions
diff --git a/lua/no-clown-fiesta/highlight-group/treesitter.lua b/lua/no-clown-fiesta/highlight-group/treesitter.lua index 05ba713..0aad575 100644 --- a/lua/no-clown-fiesta/highlight-group/treesitter.lua +++ b/lua/no-clown-fiesta/highlight-group/treesitter.lua @@ -1,20 +1,32 @@ local M = {} -local unpack = table.unpack +local unpack = unpack function M.highlight(palette, options) return { - ["@comment"] = { fg = palette.medium_gray, unpack(options.style.comments) }, + ["@comment"] = vim.tbl_extend( + "force", + { fg = palette.medium_gray }, + options.style.comments + ), ["@annotation"] = { fg = palette.white }, ["@attribute"] = { fg = palette.white }, ["@constructor"] = { fg = palette.cyan }, - ["@type"] = { fg = palette.white, unpack(options.style.type) }, + ["@type"] = vim.tbl_extend("force", { fg = palette.white }, options.style.type), ["@type.builtin"] = { fg = palette.white }, ["@conditional"] = { fg = palette.gray_blue }, ["@exception"] = { fg = palette.red }, ["@include"] = { fg = palette.red }, - ["@keyword"] = { fg = palette.gray_blue, unpack(options.style.keywords) }, - ["@keyword.function"] = { fg = palette.gray_blue, unpack(options.style.keywords) }, + ["@keyword"] = vim.tbl_extend( + "force", + { fg = palette.gray_blue }, + options.style.keywords + ), + ["@keyword.function"] = vim.tbl_extend( + "force", + { fg = palette.gray_blue }, + options.style.keywords + ), ["@label"] = { fg = palette.white }, ["@namespace"] = { fg = palette.white }, ["@repeat"] = { fg = palette.gray_blue }, @@ -25,12 +37,20 @@ function M.highlight(palette, options) ["@boolean"] = { fg = palette.red }, ["@character"] = { fg = palette.light_green }, ["@error"] = { fg = palette.error_red }, - ["@function"] = { fg = palette.cyan, unpack(options.style.functions) }, + ["@function"] = vim.tbl_extend( + "force", + { fg = palette.cyan }, + options.style.functions + ), ["@function.builtin"] = { fg = palette.cyan }, ["@method"] = { fg = palette.cyan }, ["@const.macro"] = { fg = palette.cyan }, ["@function.macro"] = { fg = palette.cyan }, - ["@variable"] = { fg = palette.white, unpack(options.style.variables) }, + ["@variable"] = vim.tbl_extend( + "force", + { fg = palette.white }, + options.style.variables + ), ["@variable.builtin"] = { fg = palette.white }, ["@property"] = { fg = palette.white }, ["@operator"] = { fg = palette.white }, diff --git a/lua/no-clown-fiesta/highlights.lua b/lua/no-clown-fiesta/highlights.lua index 5efc1a9..5ed6169 100644 --- a/lua/no-clown-fiesta/highlights.lua +++ b/lua/no-clown-fiesta/highlights.lua @@ -19,7 +19,11 @@ function M.highlight(palette, options) PmenuSel = { fg = palette.blue, bg = palette.alt_bg }, WildMenu = { fg = palette.blue, bg = palette.alt_bg }, CursorLineNr = { fg = palette.light_gray, style = "bold" }, - Comment = { fg = palette.medium_gray, unpack(options.style.comments) }, + Comment = vim.tbl_extend( + "force", + { fg = palette.medium_gray }, + options.style.comments + ), Folded = { fg = palette.light_gray, bg = palette.alt_bg }, FoldColumn = { fg = palette.light_gray, bg = palette.alt_bg }, LineNr = { fg = palette.gray }, @@ -63,7 +67,7 @@ function M.highlight(palette, options) Question = { fg = palette.cyan }, EndOfBuffer = { fg = palette.bg }, NonText = { fg = palette.bg }, - Variable = { fg = palette.white, unpack(options.style.variables) }, + Variable = vim.tbl_extend("force", { fg = palette.white }, options.style.variables), String = { fg = palette.medium_gray_blue }, Character = { fg = palette.light_green }, Constant = { fg = palette.white }, @@ -71,13 +75,17 @@ function M.highlight(palette, options) Boolean = { fg = palette.red }, Float = { fg = palette.red }, Identifier = { fg = palette.white }, - Function = { fg = palette.cyan, unpack(options.style.functions) }, + Function = vim.tbl_extend("force", { fg = palette.cyan }, options.style.functions), Operator = { fg = palette.white }, - Type = { fg = palette.white, unpack(options.style.type) }, + Type = vim.tbl_extend("force", { fg = palette.white }, options.style.type), StorageClass = { fg = palette.gray_blue }, Structure = { fg = palette.gray_blue }, Typedef = { fg = palette.white }, - Keyword = { fg = palette.gray_blue, unpack(options.style.keywords) }, + Keyword = vim.tbl_extend( + "force", + { fg = palette.gray_blue }, + options.style.keywords + ), Statement = { fg = palette.gray_blue }, Conditional = { fg = palette.gray_blue }, Repeat = { fg = palette.gray_blue }, @@ -93,7 +101,11 @@ function M.highlight(palette, options) Tag = { fg = palette.pale_purple }, Debug = { fg = palette.red }, Delimiter = { fg = palette.white }, - SpecialComment = { fg = palette.medium_gray, unpack(options.style.comments) }, + SpecialComment = vim.tbl_extend( + "force", + { fg = palette.medium_gray }, + options.style.comments + ), Underlined = { style = "underline" }, Bold = { style = "bold" }, Italic = { style = "italic" }, |