From e5796c78772ce926e48d8aa9ee46cc7f5cdd4330 Mon Sep 17 00:00:00 2001 From: Fernando Schauenburg Date: Thu, 8 Feb 2024 22:26:52 +0100 Subject: [PATCH] Add new treesitter captures --- lua/gruvbox.lua | 155 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 149 insertions(+), 6 deletions(-) diff --git a/lua/gruvbox.lua b/lua/gruvbox.lua index f3d024c..eb8aa1d 100644 --- a/lua/gruvbox.lua +++ b/lua/gruvbox.lua @@ -184,6 +184,7 @@ M.highlights = function() Question = { link = 'MoreMsg' }, VertSplit = { fg = C.bg4 }, Title = { fg = C.yellow, bold = true }, + SubTitle = { fg = C.yellow, bold = false }, VisualNOS = { bg = C.bg2, reverse = true }, WarningMsg = { link = 'Warning' }, WildMenu = { fg = C.fg2, bg = C.bg2 }, @@ -271,12 +272,12 @@ M.highlights = function() }, markdown = { - markdownH1 = { fg = C.yellow }, - markdownH2 = { link = 'markdownH1' }, - markdownH3 = { link = 'markdownH1' }, - markdownH4 = { link = 'markdownH1' }, - markdownH5 = { link = 'markdownH1' }, - markdownH6 = { link = 'markdownH1' }, + markdownH1 = { link = 'Title' }, + markdownH2 = { link = 'Title' }, + markdownH3 = { link = 'Subtitle' }, + markdownH4 = { link = 'Subtitle' }, + markdownH5 = { link = 'Subtitle' }, + markdownH6 = { link = 'Subtitle' }, markdownHeadingRule = { fg = C.yellow, bold = true }, markdownHeadingDelimiter = { link = 'markdownHeadingRule' }, markdownH1Delimiter = { link = 'markdownHeadingDelimiter' }, @@ -392,6 +393,148 @@ M.highlights = function() TSTypeDefinition = { }, TSVariable = { link = 'Identifier' }, TSVariableBuiltin = { link = 'Identifier' }, + ['@comment'] = { link = 'Comment' }, + ['@none'] = { bg = 'NONE', fg = 'NONE' }, + ['@preproc'] = { link = 'PreProc' }, + ['@define'] = { link = 'Define' }, + ['@operator'] = { link = 'Operator' }, + ['@punctuation.delimiter'] = { link = 'Delimiter' }, + ['@punctuation.bracket'] = { link = 'Delimiter' }, + ['@punctuation.special'] = { link = 'Delimiter' }, + ['@string'] = { link = 'String' }, + ['@string.regex'] = { link = 'String' }, + ['@string.regexp'] = { link = 'String' }, + ['@string.escape'] = { link = 'SpecialChar' }, + ['@string.special'] = { link = 'SpecialChar' }, + ['@string.special.path'] = { link = 'Underlined' }, + ['@string.special.symbol'] = { link = 'Identifier' }, + ['@string.special.url'] = { link = 'Underlined' }, + ['@character'] = { link = 'Character' }, + ['@character.special'] = { link = 'SpecialChar' }, + ['@boolean'] = { link = 'Boolean' }, + ['@number'] = { link = 'Number' }, + ['@number.float'] = { link = 'Float' }, + ['@float'] = { link = 'Float' }, + ['@function'] = { link = 'Function' }, + ['@function.builtin'] = { link = 'Special' }, + ['@function.call'] = { link = 'Function' }, + ['@function.macro'] = { link = 'Macro' }, + ['@function.method'] = { link = 'Function' }, + ['@method'] = { link = 'Function' }, + ['@method.call'] = { link = 'Function' }, + ['@constructor'] = { link = 'Special' }, + ['@parameter'] = { link = 'Identifier' }, + ['@keyword'] = { link = 'Keyword' }, + ['@keyword.conditional'] = { link = 'Conditional' }, + ['@keyword.debug'] = { link = 'Debug' }, + ['@keyword.directive'] = { link = 'PreProc' }, + ['@keyword.directive.define'] = { link = 'Define' }, + ['@keyword.exception'] = { link = 'Exception' }, + ['@keyword.function'] = { link = 'Keyword' }, + ['@keyword.import'] = { link = 'Include' }, + ['@keyword.operator'] = { link = 'Opeator' }, + ['@keyword.repeat'] = { link = 'Repeat' }, + ['@keyword.return'] = { link = 'Keyword' }, + ['@keyword.storage'] = { link = 'StorageClass' }, + ['@conditional'] = { link = 'Conditional' }, + ['@repeat'] = { link = 'Repeat' }, + ['@debug'] = { link = 'Debug' }, + ['@label'] = { link = 'Label' }, + ['@include'] = { link = 'Include' }, + ['@exception'] = { link = 'Exception' }, + ['@type'] = { link = 'Type' }, + ['@type.builtin'] = { link = 'Type' }, + ['@type.definition'] = { link = 'Typedef' }, + ['@type.qualifier'] = { link = 'Type' }, + ['@storageclass'] = { link = 'StorageClass' }, + ['@attribute'] = { link = 'PreProc' }, + ['@field'] = { link = 'Identifier' }, + ['@property'] = { link = 'Identifier' }, + ['@variable'] = { link = 'Identifier' }, + ['@variable.builtin'] = { link = 'Special' }, + ['@variable.member'] = { link = 'Identifier' }, + ['@variable.parameter'] = { link = 'Identifier' }, + ['@constant'] = { link = 'Constant' }, + ['@constant.builtin'] = { link = 'Special' }, + ['@constant.macro'] = { link = 'Define' }, + ['@markup'] = { link = 'Normal' }, + ['@markup.strong'] = { bold = true }, + ['@markup.emphasis'] = { italic = true }, + ['@markup.italic'] = { italic = true }, + ['@markup.underline'] = { underline = true }, + ['@markup.strike'] = { strikethrough = true }, + ['@markup.heading.1'] = { link = 'markdownH1' }, + ['@markup.heading.2'] = { link = 'markdownH2' }, + ['@markup.heading.3'] = { link = 'markdownH3' }, + ['@markup.heading.4'] = { link = 'markdownH4' }, + ['@markup.heading.5'] = { link = 'markdownH5' }, + ['@markup.heading.6'] = { link = 'markdownH6' }, + ['@markup.raw'] = { fg = C.br_red, bg = C.yellow_bg }, + ['@markup.raw.delimiter'] = { link = 'Comment' }, + ['@markup.raw.block'] = { }, + ['@markup.math'] = { link = '@markup.raw' }, + ['@markup.environment'] = { link = 'Macro' }, + ['@markup.environment.name'] = { link = 'Type' }, + ['@markup.link'] = { fg = C.bg3 }, + ['@markup.link.label'] = { fg = C.blue }, + ['@markup.link.url'] = { fg = C.br_blue, underline = true }, + ['@markup.list'] = { fg = C.br_green }, + ['@markup.list.checked'] = { fg = C.green, bold = true }, + ['@markup.list.unchecked'] = { fg = C.bg4 }, + ['@comment.todo'] = { link = 'Todo' }, + ['@comment.note'] = { link = 'SpecialComment' }, + ['@comment.warning'] = { link = 'WarningMsg' }, + ['@comment.error'] = { link = 'ErrorMsg' }, + ['@diff.plus'] = { link = 'diffAdded' }, + ['@diff.minus'] = { link = 'diffRemoved' }, + ['@diff.delta'] = { link = 'diffChanged' }, + ['@module'] = { link = 'Type' }, + ['@namespace'] = { link = 'Type' }, + ['@symbol'] = { link = 'Identifier' }, + ['@text'] = { link = 'TSText' }, + ['@text.strong'] = { bold = true }, + ['@text.emphasis'] = { italic = true }, + ['@text.underline'] = { underline = true }, + ['@text.strike'] = { strikethrough = true }, + ['@text.title'] = { link = 'Title' }, + ['@text.literal'] = { link = 'String' }, + ['@text.uri'] = { link = 'Underlined' }, + ['@text.math'] = { link = 'Special' }, + ['@text.environment'] = { link = 'Macro' }, + ['@text.environment.name'] = { link = 'Type' }, + ['@text.reference'] = { link = 'Constant' }, + ['@text.todo'] = { link = 'Todo' }, + ['@text.todo.checked'] = { link = '@markup.list.checked' }, + ['@text.todo.unchecked'] = { link = '@markup.list.unchecked' }, + ['@text.note'] = { link = 'SpecialComment' }, + ['@text.note.comment'] = { fg = C.purple, bold = true }, + ['@text.warning'] = { link = 'WarningMsg' }, + ['@text.danger'] = { link = 'ErrorMsg' }, + ['@text.danger.comment'] = { fg = C.fg0, bg = C.red, bold = true }, + ['@text.diff.add'] = { link = 'diffAdded' }, + ['@text.diff.delete'] = { link = 'diffRemoved' }, + ['@tag'] = { link = 'Tag' }, + ['@tag.attribute'] = { link = 'Identifier' }, + ['@tag.delimiter'] = { link = 'elimiter' }, + ['@punctuation'] = { link = 'Delimiter' }, + ['@macro'] = { link = 'Macro' }, + ['@structure'] = { link = 'Structure' }, + ['@lsp.type.class'] = { link = '@type' }, + ['@lsp.type.comment'] = { link = '@comment' }, + ['@lsp.type.decorator'] = { link = '@macro' }, + ['@lsp.type.enum'] = { link = '@type' }, + ['@lsp.type.enumMember'] = { link = '@constant' }, + ['@lsp.type.function'] = { link = '@function' }, + ['@lsp.type.interface'] = { link = '@constructor' }, + ['@lsp.type.macro'] = { link = '@macro' }, + ['@lsp.type.method'] = { link = '@method' }, + ['@lsp.type.namespace'] = { link = '@namespace' }, + ['@lsp.type.parameter'] = { link = '@parameter' }, + ['@lsp.type.property'] = { link = '@property' }, + ['@lsp.type.struct'] = { link = '@type' }, + ['@lsp.type.type'] = { link = '@type' }, + ['@lsp.type.typeParameter'] = { link = '@type.definition' }, + ['@lsp.type.variable'] = { link = '@variable' }, }, -- 'tpope/vim-fugitive'