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. -- Tree-Sitter syntax groups.
-- --
-- See :h treesitter-highlight-groups, some groups may not be listed, submit a PR fix to lush-template! -- See :h treesitter-highlight-groups, some groups may not be listed,
-- the sym function below is from: https://github.com/rktjmp/lush.nvim/issues/109 -- 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.literal" { }, -- Comment
-- sym('@text.reference')({}), -- Identifier -- sym"@text.reference" { }, -- Identifier
-- sym('@text.title')({}), -- Title -- sym"@text.title" { }, -- Title
-- sym('@text.uri')({}), -- Underlined -- sym"@text.uri" { }, -- Underlined
-- sym('@text.underline')({}), -- Underlined -- sym"@text.underline" { }, -- Underlined
-- sym('@text.todo')({}), -- Todo -- sym"@text.todo" { }, -- Todo
-- sym('@comment')({}), -- Comment -- sym"@comment" { }, -- Comment
-- sym('@punctuation')({}), -- Delimiter -- sym"@punctuation" { }, -- Delimiter
-- sym('@constant')({}), -- Constant -- sym"@constant" { }, -- Constant
-- sym('@constant.builtin')({}), -- Special -- sym"@constant.builtin" { }, -- Special
-- sym('@constant.macro')({}), -- Define -- sym"@constant.macro" { }, -- Define
-- sym('@define')({}), -- Define -- sym"@define" { }, -- Define
-- sym('@macro')({}), -- Macro -- sym"@macro" { }, -- Macro
-- sym('@string')({}), -- String -- sym"@string" { }, -- String
-- sym('@string.escape')({}), -- SpecialChar -- sym"@string.escape" { }, -- SpecialChar
-- sym('@string.special')({}), -- SpecialChar -- sym"@string.special" { }, -- SpecialChar
-- sym('@character')({}), -- Character -- sym"@character" { }, -- Character
-- sym('@character.special')({}), -- SpecialChar -- sym"@character.special" { }, -- SpecialChar
-- sym('@number')({}), -- Number -- sym"@number" { }, -- Number
-- sym('@boolean')({}), -- Boolean -- sym"@boolean" { }, -- Boolean
-- sym('@float')({}), -- Float -- sym"@float" { }, -- Float
-- sym('@function')({}), -- Function -- sym"@function" { }, -- Function
-- sym('@function.builtin')({}), -- Special -- sym"@function.builtin" { }, -- Special
-- sym('@function.macro')({}), -- Macro -- sym"@function.macro" { }, -- Macro
-- sym('@parameter')({}), -- Identifier -- sym"@parameter" { }, -- Identifier
-- sym('@method')({}), -- Function -- sym"@method" { }, -- Function
-- sym('@field')({}), -- Identifier -- sym"@field" { }, -- Identifier
-- sym('@property')({}), -- Identifier -- sym"@property" { }, -- Identifier
-- sym('@constructor')({}), -- Special -- sym"@constructor" { }, -- Special
-- sym('@conditional')({}), -- Conditional -- sym"@conditional" { }, -- Conditional
-- sym('@repeat')({}), -- Repeat -- sym"@repeat" { }, -- Repeat
-- sym('@label')({}), -- Label -- sym"@label" { }, -- Label
-- sym('@operator')({}), -- Operator -- sym"@operator" { }, -- Operator
-- sym('@keyword')({}), -- Keyword -- sym"@keyword" { }, -- Keyword
-- sym('@exception')({}), -- Exception -- sym"@exception" { }, -- Exception
-- sym('@variable')({}), -- Identifier -- sym"@variable" { }, -- Identifier
-- sym('@type')({}), -- Type -- sym"@type" { }, -- Type
-- sym('@type.definition')({}), -- Typedef -- sym"@type.definition" { }, -- Typedef
-- sym('@storageclass')({}), -- StorageClass -- sym"@storageclass" { }, -- StorageClass
-- sym('@structure')({}), -- Structure -- sym"@structure" { }, -- Structure
-- sym('@namespace')({}), -- Identifier -- sym"@namespace" { }, -- Identifier
-- sym('@include')({}), -- Include -- sym"@include" { }, -- Include
-- sym('@preproc')({}), -- PreProc -- sym"@preproc" { }, -- PreProc
-- sym('@debug')({}), -- Debug -- sym"@debug" { }, -- Debug
-- sym('@tag')({}), -- Tag -- sym"@tag" { }, -- Tag
} }
end) end)