mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-06 05:20:00 -04:00
docs: Update docs for missing groups, re-order alphabetically
This commit is contained in:
parent
3727be629c
commit
07e86b1553
2 changed files with 167 additions and 139 deletions
|
|
@ -11,58 +11,71 @@ local M = {
|
|||
|
||||
local hlmap = vim.treesitter.highlighter.hl_map
|
||||
|
||||
-- Misc
|
||||
-- Constants
|
||||
hlmap["annotation"] = "TSAnnotation"
|
||||
|
||||
hlmap["attribute"] = "TSAttribute"
|
||||
|
||||
hlmap["boolean"] = "TSBoolean"
|
||||
|
||||
hlmap["character"] = "TSCharacter"
|
||||
|
||||
hlmap["conditional"] = "TSConditional"
|
||||
|
||||
hlmap["constant"] = "TSConstant"
|
||||
hlmap["constant.builtin"] = "TSConstBuiltin"
|
||||
hlmap["constant.macro"] = "TSConstMacro"
|
||||
|
||||
hlmap["constructor"] = "TSConstructor"
|
||||
|
||||
hlmap.error = "TSError"
|
||||
hlmap["exception"] = "TSException"
|
||||
|
||||
hlmap["field"] = "TSField"
|
||||
|
||||
hlmap["float"] = "TSFloat"
|
||||
|
||||
hlmap["function"] = "TSFunction"
|
||||
hlmap["function.builtin"] = "TSFuncBuiltin"
|
||||
hlmap["function.macro"] = "TSFuncMacro"
|
||||
|
||||
hlmap["include"] = "TSInclude"
|
||||
|
||||
hlmap["keyword"] = "TSKeyword"
|
||||
hlmap["keyword.function"] = "TSKeywordFunction"
|
||||
hlmap["keyword.operator"] = "TSKeywordOperator"
|
||||
|
||||
hlmap["label"] = "TSLabel"
|
||||
|
||||
hlmap["method"] = "TSMethod"
|
||||
|
||||
hlmap["namespace"] = "TSNamespace"
|
||||
|
||||
hlmap["none"] = "TSNone"
|
||||
hlmap["number"] = "TSNumber"
|
||||
|
||||
hlmap["operator"] = "TSOperator"
|
||||
|
||||
hlmap["parameter"] = "TSParameter"
|
||||
hlmap["parameter.reference"] = "TSParameterReference"
|
||||
|
||||
hlmap["property"] = "TSProperty"
|
||||
|
||||
hlmap["punctuation.delimiter"] = "TSPunctDelimiter"
|
||||
hlmap["punctuation.bracket"] = "TSPunctBracket"
|
||||
hlmap["punctuation.special"] = "TSPunctSpecial"
|
||||
|
||||
-- Constants
|
||||
hlmap["constant"] = "TSConstant"
|
||||
hlmap["constant.builtin"] = "TSConstBuiltin"
|
||||
hlmap["constant.macro"] = "TSConstMacro"
|
||||
hlmap["repeat"] = "TSRepeat"
|
||||
|
||||
hlmap["string"] = "TSString"
|
||||
hlmap["string.regex"] = "TSStringRegex"
|
||||
hlmap["string.escape"] = "TSStringEscape"
|
||||
hlmap["character"] = "TSCharacter"
|
||||
hlmap["number"] = "TSNumber"
|
||||
hlmap["boolean"] = "TSBoolean"
|
||||
hlmap["float"] = "TSFloat"
|
||||
hlmap["annotation"] = "TSAnnotation"
|
||||
hlmap["attribute"] = "TSAttribute"
|
||||
hlmap["namespace"] = "TSNamespace"
|
||||
|
||||
-- Functions
|
||||
hlmap["function"] = "TSFunction"
|
||||
hlmap["function.builtin"] = "TSFuncBuiltin"
|
||||
hlmap["function.macro"] = "TSFuncMacro"
|
||||
hlmap["parameter"] = "TSParameter"
|
||||
hlmap["parameter.reference"] = "TSParameterReference"
|
||||
hlmap["method"] = "TSMethod"
|
||||
hlmap["field"] = "TSField"
|
||||
hlmap["property"] = "TSProperty"
|
||||
hlmap["constructor"] = "TSConstructor"
|
||||
|
||||
-- Keywords
|
||||
hlmap["conditional"] = "TSConditional"
|
||||
hlmap["repeat"] = "TSRepeat"
|
||||
hlmap["label"] = "TSLabel"
|
||||
hlmap["keyword"] = "TSKeyword"
|
||||
hlmap["keyword.function"] = "TSKeywordFunction"
|
||||
hlmap["keyword.operator"] = "TSKeywordOperator"
|
||||
hlmap["operator"] = "TSOperator"
|
||||
hlmap["exception"] = "TSException"
|
||||
|
||||
hlmap["type"] = "TSType"
|
||||
hlmap["type.builtin"] = "TSTypeBuiltin"
|
||||
hlmap["structure"] = "TSStructure"
|
||||
hlmap["include"] = "TSInclude"
|
||||
|
||||
-- variable
|
||||
hlmap["variable"] = "TSVariable"
|
||||
hlmap["variable.builtin"] = "TSVariableBuiltin"
|
||||
hlmap["tag"] = "TSTag"
|
||||
hlmap["tag.delimiter"] = "TSTagDelimiter"
|
||||
|
||||
-- Text
|
||||
hlmap["text"] = "TSText"
|
||||
hlmap["text.strong"] = "TSStrong"
|
||||
hlmap["text.emphasis"] = "TSEmphasis"
|
||||
|
|
@ -71,11 +84,11 @@ hlmap["text.title"] = "TSTitle"
|
|||
hlmap["text.literal"] = "TSLiteral"
|
||||
hlmap["text.uri"] = "TSURI"
|
||||
|
||||
-- Tags
|
||||
hlmap["tag"] = "TSTag"
|
||||
hlmap["tag.delimiter"] = "TSTagDelimiter"
|
||||
hlmap["type"] = "TSType"
|
||||
hlmap["type.builtin"] = "TSTypeBuiltin"
|
||||
|
||||
hlmap["none"] = "TSNone"
|
||||
hlmap["variable"] = "TSVariable"
|
||||
hlmap["variable.builtin"] = "TSVariableBuiltin"
|
||||
|
||||
function M.attach(bufnr, lang)
|
||||
local parser = parsers.get_parser(bufnr, lang)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue