mirror of
https://github.com/ilyakooo0/helix.git
synced 2024-08-17 12:00:22 +03:00
Change twig tree-sitter grammar (#4176)
This commit is contained in:
parent
a079f2c9bd
commit
9f36468b15
@ -537,7 +537,7 @@ indent = { tab-width = 2, unit = " " }
|
||||
|
||||
[[grammar]]
|
||||
name = "twig"
|
||||
source = { git = "https://github.com/eirabben/tree-sitter-twig", rev = "b7444181fb38e603e25ea8fcdac55f9492e49c27" }
|
||||
source = { git = "https://github.com/gbprod/tree-sitter-twig", rev = "807b293fec3fead64f54c64fdf6fb05516c032b9" }
|
||||
|
||||
[[language]]
|
||||
name = "latex"
|
||||
|
@ -1,16 +1,60 @@
|
||||
(comment_directive) @comment
|
||||
(comment) @comment
|
||||
|
||||
(filter_identifier) @function.method
|
||||
(function_identifier) @function.method
|
||||
(test) @function.builtin
|
||||
(variable) @variable
|
||||
(string) @string
|
||||
(interpolated_string) @string
|
||||
(operator) @operator
|
||||
(number) @constant.numeric.integer
|
||||
(boolean) @constant.builtin.boolean
|
||||
(null) @constant.builtin
|
||||
(keyword) @keyword
|
||||
(attribute) @attribute
|
||||
(tag) @tag
|
||||
(conditional) @keyword.control.conditional
|
||||
(repeat) @keyword.control.repeat
|
||||
(method) @function.method
|
||||
(parameter) @variable.parameter
|
||||
|
||||
[
|
||||
"{%"
|
||||
"{%-"
|
||||
"{%~"
|
||||
"%}"
|
||||
"-%}"
|
||||
"~%}"
|
||||
"{{"
|
||||
"{{-"
|
||||
"{{~"
|
||||
"}}"
|
||||
"-}}"
|
||||
"~}}"
|
||||
"{{"
|
||||
"}}"
|
||||
"{{-"
|
||||
"-}}"
|
||||
"{{~"
|
||||
"~}}"
|
||||
"{%"
|
||||
"%}"
|
||||
"{%-"
|
||||
"-%}"
|
||||
"{%~"
|
||||
"~%}"
|
||||
] @keyword
|
||||
|
||||
[
|
||||
","
|
||||
"."
|
||||
"?"
|
||||
":"
|
||||
"="
|
||||
] @punctuation.delimiter
|
||||
|
||||
(interpolated_string [
|
||||
"#{"
|
||||
"}"
|
||||
] @punctuation.delimiter)
|
||||
|
||||
[
|
||||
"("
|
||||
")"
|
||||
"["
|
||||
"]"
|
||||
"{"
|
||||
] @punctuation.bracket
|
||||
|
||||
(hash [
|
||||
"}"
|
||||
] @punctuation.bracket)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user