diff options
author | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2022-10-29 13:04:54 +0200 |
---|---|---|
committer | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2022-10-29 13:04:54 +0200 |
commit | 75d4dda89f3babc358ce51ec5daff0deca7bd90a (patch) | |
tree | 27ed063e0a5850cf7ae8014cadab895c7bc141dd /lua/no-clown-fiesta/highlight-group | |
parent | 6f421c5c83c657552de2a6d2932ff23c7bc30cdb (diff) |
Unpack style
Diffstat (limited to 'lua/no-clown-fiesta/highlight-group')
-rw-r--r-- | lua/no-clown-fiesta/highlight-group/treesitter.lua | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lua/no-clown-fiesta/highlight-group/treesitter.lua b/lua/no-clown-fiesta/highlight-group/treesitter.lua index 4ca2816..05ba713 100644 --- a/lua/no-clown-fiesta/highlight-group/treesitter.lua +++ b/lua/no-clown-fiesta/highlight-group/treesitter.lua @@ -1,18 +1,20 @@ local M = {} +local unpack = table.unpack + function M.highlight(palette, options) return { - ["@comment"] = { fg = palette.medium_gray, style = options.style.comments }, + ["@comment"] = { fg = palette.medium_gray, unpack(options.style.comments) }, ["@annotation"] = { fg = palette.white }, ["@attribute"] = { fg = palette.white }, ["@constructor"] = { fg = palette.cyan }, - ["@type"] = { fg = palette.white, style = options.style.type }, + ["@type"] = { fg = palette.white, unpack(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, style = options.style.keywords }, - ["@keyword.function"] = { fg = palette.gray_blue, style = options.style.keywords }, + ["@keyword"] = { fg = palette.gray_blue, unpack(options.style.keywords) }, + ["@keyword.function"] = { fg = palette.gray_blue, unpack(options.style.keywords) }, ["@label"] = { fg = palette.white }, ["@namespace"] = { fg = palette.white }, ["@repeat"] = { fg = palette.gray_blue }, @@ -23,12 +25,12 @@ function M.highlight(palette, options) ["@boolean"] = { fg = palette.red }, ["@character"] = { fg = palette.light_green }, ["@error"] = { fg = palette.error_red }, - ["@function"] = { fg = palette.cyan, style = options.style.functions }, + ["@function"] = { fg = palette.cyan, unpack(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, style = options.style.variables }, + ["@variable"] = { fg = palette.white, unpack(options.style.variables) }, ["@variable.builtin"] = { fg = palette.white }, ["@property"] = { fg = palette.white }, ["@operator"] = { fg = palette.white }, |