Skip to content

Commit

Permalink
feat(treesitter): add more default groups to highlight map
Browse files Browse the repository at this point in the history
This covers some default groups listed in :h group-name.
  • Loading branch information
gpanders committed Mar 24, 2022
1 parent 2e36117 commit 8cc4e50
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions runtime/lua/vim/treesitter/highlighter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ local subcapture_fallback = {

TSHighlighter.hl_map = setmetatable({
["error"] = "Error",
["text.underline"] = "Underlined",
["todo"] = "Todo",
["debug"] = "Debug",

-- Miscs
["comment"] = "Comment",
Expand All @@ -49,10 +52,13 @@ TSHighlighter.hl_map = setmetatable({
["constant"] = "Constant",
["constant.builtin"] = "Special",
["constant.macro"] = "Define",
["define"] = "Define",
["macro"] = "Macro",
["string"] = "String",
["string.regex"] = "String",
["string.escape"] = "SpecialChar",
["character"] = "Character",
["character.special"] = "SpecialChar",
["number"] = "Number",
["boolean"] = "Boolean",
["float"] = "Float",
Expand All @@ -78,8 +84,12 @@ TSHighlighter.hl_map = setmetatable({

["type"] = "Type",
["type.builtin"] = "Type",
["type.qualifier"] = "Type",
["type.definition"] = "Typedef",
["storageclass"] = "StorageClass",
["structure"] = "Structure",
["include"] = "Include",
["preproc"] = "PreProc",
}, subcapture_fallback)

---@private
Expand Down

0 comments on commit 8cc4e50

Please sign in to comment.