aboutsummaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
authorHollis Wu <Holi0317@users.noreply.github.com>2022-10-27 22:20:36 +0800
committerGitHub <noreply@github.com>2022-10-27 11:20:36 -0300
commit2fc4980dfa17e76f7c7e963caa69599051d2e75e (patch)
tree52c2b4a6482f390ef1fbff3898673112fb034052 /lua
parentcb7a8a867cfaa7f0e8ded57eb931da88635e7007 (diff)
downloadgruvbox-2fc4980dfa17e76f7c7e963caa69599051d2e75e.tar.gz
gruvbox-2fc4980dfa17e76f7c7e963caa69599051d2e75e.tar.xz
fix: treesitter on neovim >= 0.8 (#163)
* fix: treesitter on neovim >= 0.8 Close #159 See https://github.com/nvim-treesitter/nvim-treesitter/pull/3656 * chore: Remove neovim 0.7 TS support
Diffstat (limited to 'lua')
-rw-r--r--lua/gruvbox/groups.lua79
1 files changed, 73 insertions, 6 deletions
diff --git a/lua/gruvbox/groups.lua b/lua/gruvbox/groups.lua
index 01752b5..60297f9 100644
--- a/lua/gruvbox/groups.lua
+++ b/lua/gruvbox/groups.lua
@@ -246,12 +246,79 @@ groups.setup = function()
LspReferenceText = { link = "GruvboxYellowBold" },
LspReferenceWrite = { link = "GruvboxOrangeBold" },
LspCodeLens = { link = "GruvboxGray" },
- -- nvim-treesitter
- TSStrong = { bold = config.bold },
- TSStrike = { strikethrough = config.strikethrough },
- TSEmphasis = { italic = config.italic },
- TSUnderline = { underline = config.underline },
- TSKeywordOperator = { link = "GruvboxRed" },
+ -- nvim-treesitter (0.8 compat)
+ -- Adapted from https://github.com/nvim-treesitter/nvim-treesitter/commit/42ab95d5e11f247c6f0c8f5181b02e816caa4a4f#commitcomment-87014462
+ ["@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.escape"] = { link = "SpecialChar" },
+ ["@string.special"] = { link = "SpecialChar" },
+ ["@character"] = { link = "Character" },
+ ["@character.special"] = { link = "SpecialChar" },
+ ["@boolean"] = { link = "Boolean" },
+ ["@number"] = { link = "Number" },
+ ["@float"] = { link = "Float" },
+ ["@function"] = { link = "Function" },
+ ["@function.call"] = { link = "Function" },
+ ["@function.builtin"] = { link = "Special" },
+ ["@function.macro"] = { link = "Macro" },
+ ["@method"] = { link = "Function" },
+ ["@method.call"] = { link = "Function" },
+ ["@constructor"] = { link = "Special" },
+ ["@parameter"] = { link = "Identifier" },
+ ["@keyword"] = { link = "Keyword" },
+ ["@keyword.function"] = { link = "Keyword" },
+ ["@keyword.return"] = { link = "Keyword" },
+ ["@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.qualifier"] = { link = "Type" },
+ ["@type.definition"] = { link = "Typedef" },
+ ["@storageclass"] = { link = "StorageClass" },
+ ["@attribute"] = { link = "PreProc" },
+ ["@field"] = { link = "Identifier" },
+ ["@property"] = { link = "Identifier" },
+ ["@variable"] = { link = "Normal" },
+ ["@variable.builtin"] = { link = "Special" },
+ ["@constant"] = { link = "Constant" },
+ ["@constant.builtin"] = { link = "Special" },
+ ["@constant.macro"] = { link = "Define" },
+ ["@namespace"] = { link = "Include" },
+ ["@symbol"] = { link = "Identifier" },
+ ["@text"] = { link = "Normal" },
+ ["@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.note"] = { link = "SpecialComment" },
+ ["@text.warning"] = { link = "WarningMsg" },
+ ["@text.danger"] = { link = "ErrorMsg" },
+ ["@tag"] = { link = "Tag" },
+ ["@tag.attribute"] = { link = "Identifier" },
+ ["@tag.delimiter"] = { link = "Delimiter" },
+
+ -- nvim-treesitter (0.8 overrides)
+ ["@text.strong"] = { bold = config.bold },
+ ["@text.strike"] = { strikethrough = config.strikethrough },
+ ["@text.emphasis"] = { italic = config.italic },
+ ["@text.underline"] = { underline = config.underline },
+ ["@keyword.operator"] = { link = "GruvboxRed" },
-- gitcommit
gitcommitSelectedFile = { link = "GruvboxGreen" },
gitcommitDiscardedFile = { link = "GruvboxRed" },