Tweak sym calls and add some documentation

This commit is contained in:
Oliver Marriott 2022-11-09 22:18:13 +11:00
parent 2a4abe831f
commit c4a16b83b3
Signed by: devraza
GPG key ID: 91EAD6081011574B

View file

@ -208,54 +208,66 @@ local theme = lush(function(injected_functions)
-- Tree-Sitter syntax groups.
--
-- See :h treesitter-highlight-groups, some groups may not be listed, submit a PR fix to lush-template!
-- the sym function below is from: https://github.com/rktjmp/lush.nvim/issues/109
-- See :h treesitter-highlight-groups, some groups may not be listed,
-- submit a PR fix to lush-template!
--
-- Tree-Sitter groups are defined with an "@" symbol, which must be
-- specially handled to be valid lua code, we do this via the special
-- sym function. The following are all valid ways to call the sym function,
-- for more details see https://www.lua.org/pil/5.html
--
-- sym("@text.literal")
-- sym('@text.literal')
-- sym"@text.literal"
-- sym'@text.literal'
--
-- For more information see https://github.com/rktjmp/lush.nvim/issues/109
-- sym('@text.literal')({}), -- Comment
-- sym('@text.reference')({}), -- Identifier
-- sym('@text.title')({}), -- Title
-- sym('@text.uri')({}), -- Underlined
-- sym('@text.underline')({}), -- Underlined
-- sym('@text.todo')({}), -- Todo
-- sym('@comment')({}), -- Comment
-- sym('@punctuation')({}), -- Delimiter
-- sym('@constant')({}), -- Constant
-- sym('@constant.builtin')({}), -- Special
-- sym('@constant.macro')({}), -- Define
-- sym('@define')({}), -- Define
-- sym('@macro')({}), -- Macro
-- sym('@string')({}), -- String
-- sym('@string.escape')({}), -- SpecialChar
-- sym('@string.special')({}), -- SpecialChar
-- sym('@character')({}), -- Character
-- sym('@character.special')({}), -- SpecialChar
-- sym('@number')({}), -- Number
-- sym('@boolean')({}), -- Boolean
-- sym('@float')({}), -- Float
-- sym('@function')({}), -- Function
-- sym('@function.builtin')({}), -- Special
-- sym('@function.macro')({}), -- Macro
-- sym('@parameter')({}), -- Identifier
-- sym('@method')({}), -- Function
-- sym('@field')({}), -- Identifier
-- sym('@property')({}), -- Identifier
-- sym('@constructor')({}), -- Special
-- sym('@conditional')({}), -- Conditional
-- sym('@repeat')({}), -- Repeat
-- sym('@label')({}), -- Label
-- sym('@operator')({}), -- Operator
-- sym('@keyword')({}), -- Keyword
-- sym('@exception')({}), -- Exception
-- sym('@variable')({}), -- Identifier
-- sym('@type')({}), -- Type
-- sym('@type.definition')({}), -- Typedef
-- sym('@storageclass')({}), -- StorageClass
-- sym('@structure')({}), -- Structure
-- sym('@namespace')({}), -- Identifier
-- sym('@include')({}), -- Include
-- sym('@preproc')({}), -- PreProc
-- sym('@debug')({}), -- Debug
-- sym('@tag')({}), -- Tag
-- sym"@text.literal" { }, -- Comment
-- sym"@text.reference" { }, -- Identifier
-- sym"@text.title" { }, -- Title
-- sym"@text.uri" { }, -- Underlined
-- sym"@text.underline" { }, -- Underlined
-- sym"@text.todo" { }, -- Todo
-- sym"@comment" { }, -- Comment
-- sym"@punctuation" { }, -- Delimiter
-- sym"@constant" { }, -- Constant
-- sym"@constant.builtin" { }, -- Special
-- sym"@constant.macro" { }, -- Define
-- sym"@define" { }, -- Define
-- sym"@macro" { }, -- Macro
-- sym"@string" { }, -- String
-- sym"@string.escape" { }, -- SpecialChar
-- sym"@string.special" { }, -- SpecialChar
-- sym"@character" { }, -- Character
-- sym"@character.special" { }, -- SpecialChar
-- sym"@number" { }, -- Number
-- sym"@boolean" { }, -- Boolean
-- sym"@float" { }, -- Float
-- sym"@function" { }, -- Function
-- sym"@function.builtin" { }, -- Special
-- sym"@function.macro" { }, -- Macro
-- sym"@parameter" { }, -- Identifier
-- sym"@method" { }, -- Function
-- sym"@field" { }, -- Identifier
-- sym"@property" { }, -- Identifier
-- sym"@constructor" { }, -- Special
-- sym"@conditional" { }, -- Conditional
-- sym"@repeat" { }, -- Repeat
-- sym"@label" { }, -- Label
-- sym"@operator" { }, -- Operator
-- sym"@keyword" { }, -- Keyword
-- sym"@exception" { }, -- Exception
-- sym"@variable" { }, -- Identifier
-- sym"@type" { }, -- Type
-- sym"@type.definition" { }, -- Typedef
-- sym"@storageclass" { }, -- StorageClass
-- sym"@structure" { }, -- Structure
-- sym"@namespace" { }, -- Identifier
-- sym"@include" { }, -- Include
-- sym"@preproc" { }, -- PreProc
-- sym"@debug" { }, -- Debug
-- sym"@tag" { }, -- Tag
}
end)