From 818d6cdd2f7939b233b381926746530db8dad931 Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Thu, 1 Feb 2024 00:12:11 +0100 Subject: Add treesitter comment support --- lua/no-clown-fiesta/groups/treesitter.lua | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'lua/no-clown-fiesta/groups') diff --git a/lua/no-clown-fiesta/groups/treesitter.lua b/lua/no-clown-fiesta/groups/treesitter.lua index 3731429..7163dc0 100644 --- a/lua/no-clown-fiesta/groups/treesitter.lua +++ b/lua/no-clown-fiesta/groups/treesitter.lua @@ -6,11 +6,12 @@ function M.highlight(palette, opts) ["@attribute"] = { fg = palette.white }, ["@boolean"] = { fg = palette.red }, ["@character"] = { fg = palette.green }, - ["@comment"] = vim.tbl_extend( - "force", - { fg = palette.medium_gray }, - opts.styles.comments - ), + ["@comment"] = { link = "Comment" }, + ["@comment.documentation"] = { fg = palette.medium_gray }, + ["@comment.error"] = { fg = palette.error }, + ["@comment.note"] = { fg = palette.light_gray }, + ["@comment.todo"] = { fg = palette.hint }, + ["@comment.warning"] = { fg = palette.warning }, ["@const.builtin"] = { fg = palette.red }, ["@const.macro"] = { fg = palette.cyan }, ["@constant"] = { fg = palette.white }, @@ -42,6 +43,7 @@ function M.highlight(palette, opts) ["@keyword.operator"] = { fg = palette.gray_blue }, ["@keyword.repeat"] = { fg = palette.gray_blue }, ["@label"] = { fg = palette.white }, + ["@lsp.type.comment"] = {}, ["@markup"] = { fg = palette.fg }, ["@markup.italic"] = { italic = true }, ["@markup.link"] = { fg = palette.medium_gray_blue }, -- cgit v1.2.3-70-g09d2