mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
175 lines
2.3 KiB
Scheme
175 lines
2.3 KiB
Scheme
"#" @keyword.directive
|
|
|
|
(string_literal) @string
|
|
|
|
(number_literal) @number
|
|
|
|
(float_literal) @number.float
|
|
|
|
(boolean_literal) @boolean
|
|
|
|
(null_literal) @constant
|
|
|
|
"defined" @constant
|
|
|
|
(comment) @comment @spell
|
|
|
|
[
|
|
","
|
|
"."
|
|
":"
|
|
] @punctuation.delimiter
|
|
|
|
[
|
|
(attribute_ignore)
|
|
(attribute_context)
|
|
"recursive"
|
|
] @attribute.builtin
|
|
|
|
[
|
|
"("
|
|
")"
|
|
"["
|
|
"]"
|
|
"<"
|
|
">"
|
|
] @punctuation.bracket
|
|
|
|
(binary_operator) @operator
|
|
|
|
[
|
|
"block"
|
|
"with"
|
|
"filter"
|
|
"macro"
|
|
"set"
|
|
"trans"
|
|
"pluralize"
|
|
"autoescape"
|
|
] @keyword
|
|
|
|
[
|
|
"endtrans"
|
|
"endblock"
|
|
"endwith"
|
|
"endfilter"
|
|
"endmacro"
|
|
"endcall"
|
|
"endset"
|
|
"endtrans"
|
|
"endautoescape"
|
|
] @keyword
|
|
|
|
(do_statement
|
|
"do" @keyword)
|
|
|
|
[
|
|
"include"
|
|
"import"
|
|
"from"
|
|
"extends"
|
|
"as"
|
|
] @keyword.import
|
|
|
|
(identifier) @variable
|
|
|
|
[
|
|
"if"
|
|
"else"
|
|
"endif"
|
|
"elif"
|
|
] @keyword.conditional
|
|
|
|
[
|
|
"for"
|
|
"in"
|
|
"continue"
|
|
"break"
|
|
"endfor"
|
|
] @keyword.repeat
|
|
|
|
"call" @function.call
|
|
|
|
(function_call
|
|
(identifier) @function.call)
|
|
|
|
(arg
|
|
(identifier) @variable.parameter)
|
|
|
|
(arg
|
|
(expression
|
|
(binary_expression
|
|
(unary_expression
|
|
(primary_expression
|
|
(identifier) @variable.parameter)))))
|
|
|
|
(expression
|
|
"."
|
|
(expression
|
|
(binary_expression
|
|
.
|
|
(unary_expression
|
|
(primary_expression
|
|
(identifier) @variable.member)))))
|
|
|
|
(expression
|
|
"."
|
|
(expression
|
|
(binary_expression
|
|
(binary_expression
|
|
(unary_expression
|
|
(primary_expression
|
|
(identifier) @variable.member))))))
|
|
|
|
(assignment_expression
|
|
"."
|
|
(identifier)+ @variable.member)
|
|
|
|
; crashes parser: https://github.com/cathaysia/tree-sitter-jinja/issues/37
|
|
; ; jinja filters
|
|
; (binary_expression
|
|
; (binary_operator
|
|
; "|")
|
|
; (unary_expression
|
|
; (primary_expression
|
|
; (identifier) @function.call)))
|
|
(inline_trans
|
|
"_" @function.builtin)
|
|
|
|
"debug" @function.builtin
|
|
|
|
(raw_end) @keyword
|
|
|
|
(raw_body) @markup.raw.block @nospell
|
|
|
|
(builtin_test
|
|
[
|
|
"boolean"
|
|
"even"
|
|
"in"
|
|
"mapping"
|
|
"sequence"
|
|
"callable"
|
|
"integer"
|
|
"ne"
|
|
"string"
|
|
"defined"
|
|
"filter"
|
|
"iterable"
|
|
"none"
|
|
"test"
|
|
"divisibleby"
|
|
"float"
|
|
"le"
|
|
"number"
|
|
"eq"
|
|
"ge"
|
|
"lower"
|
|
"odd"
|
|
"undefined"
|
|
"escaped"
|
|
"gt"
|
|
"lt"
|
|
"sameas"
|
|
"upper"
|
|
] @keyword.operator)
|