fix: fixed defaults linking to TS.. groups

This commit is contained in:
Folke Lemaitre
2022-10-18 17:53:23 +02:00
parent 7a07a7a095
commit 2a2ce9bdb7

View File

@@ -24,84 +24,55 @@ end
-- taken from https://github.com/nvim-treesitter/nvim-treesitter/blob/master/lua/nvim-treesitter/highlight.lua -- taken from https://github.com/nvim-treesitter/nvim-treesitter/blob/master/lua/nvim-treesitter/highlight.lua
M.fallbacks = { M.fallbacks = {
["annotation"] = "TSAnnotation", ["annotation"] = "TSAnnotation",
["attribute"] = "TSAttribute", ["attribute"] = "TSAttribute",
["boolean"] = "TSBoolean", ["boolean"] = "TSBoolean",
["character"] = "TSCharacter", ["character"] = "TSCharacter",
["character.special"] = "TSCharacterSpecial", ["character.special"] = "TSCharacterSpecial",
["comment"] = "TSComment", ["comment"] = "TSComment",
["conditional"] = "TSConditional", ["conditional"] = "TSConditional",
["constant"] = "TSConstant", ["constant"] = "TSConstant",
["constant.builtin"] = "TSConstBuiltin", ["constant.builtin"] = "TSConstBuiltin",
["constant.macro"] = "TSConstMacro", ["constant.macro"] = "TSConstMacro",
["constructor"] = "TSConstructor", ["constructor"] = "TSConstructor",
["debug"] = "TSDebug", ["debug"] = "TSDebug",
["define"] = "TSDefine", ["define"] = "TSDefine",
["error"] = "TSError", ["error"] = "TSError",
["exception"] = "TSException", ["exception"] = "TSException",
["field"] = "TSField", ["field"] = "TSField",
["float"] = "TSFloat", ["float"] = "TSFloat",
["function"] = "TSFunction", ["function"] = "TSFunction",
["function.call"] = "TSFunctionCall", ["function.call"] = "TSFunctionCall",
["function.builtin"] = "TSFuncBuiltin", ["function.builtin"] = "TSFuncBuiltin",
["function.macro"] = "TSFuncMacro", ["function.macro"] = "TSFuncMacro",
["include"] = "TSInclude", ["include"] = "TSInclude",
["keyword"] = "TSKeyword", ["keyword"] = "TSKeyword",
["keyword.function"] = "TSKeywordFunction", ["keyword.function"] = "TSKeywordFunction",
["keyword.operator"] = "TSKeywordOperator", ["keyword.operator"] = "TSKeywordOperator",
["keyword.return"] = "TSKeywordReturn", ["keyword.return"] = "TSKeywordReturn",
["label"] = "TSLabel", ["label"] = "TSLabel",
["method"] = "TSMethod", ["method"] = "TSMethod",
["method.call"] = "TSMethodCall", ["method.call"] = "TSMethodCall",
["namespace"] = "TSNamespace", ["namespace"] = "TSNamespace",
["none"] = "TSNone", ["none"] = "TSNone",
["number"] = "TSNumber", ["number"] = "TSNumber",
["operator"] = "TSOperator", ["operator"] = "TSOperator",
["parameter"] = "TSParameter", ["parameter"] = "TSParameter",
["parameter.reference"] = "TSParameterReference", ["parameter.reference"] = "TSParameterReference",
["preproc"] = "TSPreProc", ["preproc"] = "TSPreProc",
["property"] = "TSProperty", ["property"] = "TSProperty",
["punctuation.delimiter"] = "TSPunctDelimiter", ["punctuation.delimiter"] = "TSPunctDelimiter",
["punctuation.bracket"] = "TSPunctBracket", ["punctuation.bracket"] = "TSPunctBracket",
["punctuation.special"] = "TSPunctSpecial", ["punctuation.special"] = "TSPunctSpecial",
["repeat"] = "TSRepeat", ["repeat"] = "TSRepeat",
["storageclass"] = "TSStorageClass", ["storageclass"] = "TSStorageClass",
["string"] = "TSString", ["string"] = "TSString",
["string.regex"] = "TSStringRegex", ["string.regex"] = "TSStringRegex",
["string.escape"] = "TSStringEscape", ["string.escape"] = "TSStringEscape",
["string.special"] = "TSStringSpecial", ["string.special"] = "TSStringSpecial",
["symbol"] = "TSSymbol", ["symbol"] = "TSSymbol",
["tag"] = "TSTag", ["tag"] = "TSTag",
["tag.attribute"] = "TSTagAttribute", ["tag.attribute"] = "TSTagAttribute",
["tag.delimiter"] = "TSTagDelimiter", ["tag.delimiter"] = "TSTagDelimiter",
["text"] = "TSText", ["text"] = "TSText",
["text.strong"] = "TSStrong", ["text.strong"] = "TSStrong",
["text.emphasis"] = "TSEmphasis", ["text.emphasis"] = "TSEmphasis",
@@ -114,18 +85,14 @@ M.fallbacks = {
["text.reference"] = "TSTextReference", ["text.reference"] = "TSTextReference",
["text.environment"] = "TSEnvironment", ["text.environment"] = "TSEnvironment",
["text.environment.name"] = "TSEnvironmentName", ["text.environment.name"] = "TSEnvironmentName",
["text.note"] = "TSNote", ["text.note"] = "TSNote",
["text.warning"] = "TSWarning", ["text.warning"] = "TSWarning",
["text.danger"] = "TSDanger", ["text.danger"] = "TSDanger",
["todo"] = "TSTodo", ["todo"] = "TSTodo",
["type"] = "TSType", ["type"] = "TSType",
["type.builtin"] = "TSTypeBuiltin", ["type.builtin"] = "TSTypeBuiltin",
["type.qualifier"] = "TSTypeQualifier", ["type.qualifier"] = "TSTypeQualifier",
["type.definition"] = "TSTypeDefinition", ["type.definition"] = "TSTypeDefinition",
["variable"] = "TSVariable", ["variable"] = "TSVariable",
["variable.builtin"] = "TSVariableBuiltin", ["variable.builtin"] = "TSVariableBuiltin",
} }
@@ -205,7 +172,7 @@ M.defaults = {
}, },
["@function.call"] = { ["@function.call"] = {
default = true, default = true,
link = "TSFunction", link = "@function",
}, },
["@function.macro"] = { ["@function.macro"] = {
default = true, default = true,
@@ -225,11 +192,11 @@ M.defaults = {
}, },
["@keyword.operator"] = { ["@keyword.operator"] = {
default = true, default = true,
link = "TSOperator", link = "@operator",
}, },
["@keyword.return"] = { ["@keyword.return"] = {
default = true, default = true,
link = "TSKeyword", link = "@keyword",
}, },
["@label"] = { ["@label"] = {
default = true, default = true,
@@ -241,7 +208,7 @@ M.defaults = {
}, },
["@method.call"] = { ["@method.call"] = {
default = true, default = true,
link = "TSMethod", link = "@method",
}, },
["@namespace"] = { ["@namespace"] = {
default = true, default = true,
@@ -264,7 +231,7 @@ M.defaults = {
}, },
["@parameter.reference"] = { ["@parameter.reference"] = {
default = true, default = true,
link = "TSParameter", link = "@parameter",
}, },
["@preproc"] = { ["@preproc"] = {
default = true, default = true,
@@ -320,7 +287,7 @@ M.defaults = {
}, },
["@tag.attribute"] = { ["@tag.attribute"] = {
default = true, default = true,
link = "TSProperty", link = "@property",
}, },
["@tag.delimiter"] = { ["@tag.delimiter"] = {
default = true, default = true,
@@ -328,7 +295,7 @@ M.defaults = {
}, },
["@text"] = { ["@text"] = {
default = true, default = true,
link = "TSNone", link = "@none",
}, },
["@text.danger"] = { ["@text.danger"] = {
default = true, default = true,