mirror of
https://github.com/chenasraf/nvim-treesitter.git
synced 2026-05-17 17:38:02 +00:00
feat(typoscript)!: update grammar and queries (#8341)
Breaking change: `(condition_bool)` renamed to `(condition_bool_legacy)`
This commit is contained in:
@@ -2422,7 +2422,7 @@ return {
|
||||
},
|
||||
typoscript = {
|
||||
install_info = {
|
||||
revision = '5d8fde870b0ded1f429ba5bb249a9d9f8589ff5f',
|
||||
revision = 'e59069a4cc08b2dacccd40827fe971ca3c6821b7',
|
||||
url = 'https://github.com/Teddytrombone/tree-sitter-typoscript',
|
||||
},
|
||||
maintainers = { '@Teddytrombone' },
|
||||
|
||||
@@ -1 +1,11 @@
|
||||
(block) @fold
|
||||
[
|
||||
(block)
|
||||
(condition_block)
|
||||
(multiline_value)
|
||||
] @fold
|
||||
|
||||
(import_legacy)+ @fold
|
||||
|
||||
(import)+ @fold
|
||||
|
||||
(comment)+ @fold
|
||||
|
||||
@@ -1,10 +1,28 @@
|
||||
(identifier) @variable.member
|
||||
|
||||
(symfony_variable) @variable
|
||||
|
||||
(constant) @constant
|
||||
|
||||
(modifier_function) @function
|
||||
(symfony_method) @function.method.call
|
||||
|
||||
(modifier_predefined) @function.builtin
|
||||
[
|
||||
(modifier_function)
|
||||
(symfony_function)
|
||||
] @function.call
|
||||
|
||||
[
|
||||
(modifier_predefined)
|
||||
(symfony_predefined_function)
|
||||
] @function.builtin
|
||||
|
||||
(modifier_parameter) @variable.parameter
|
||||
|
||||
(symfony_function_parameter
|
||||
(symfony_variable) @variable.parameter)
|
||||
|
||||
(symfony_method_parameter
|
||||
(symfony_variable) @variable.parameter)
|
||||
|
||||
[
|
||||
(condition)
|
||||
@@ -12,13 +30,19 @@
|
||||
(condition_else)
|
||||
] @keyword.conditional
|
||||
|
||||
(cobject) @type.builtin
|
||||
|
||||
[
|
||||
"@import"
|
||||
"INCLUDE_TYPOSCRIPT"
|
||||
] @keyword.import
|
||||
|
||||
(condition_attribute) @tag.attribute
|
||||
|
||||
(cobject) @type.builtin
|
||||
|
||||
(symfony_built_in_variable) @variable.builtin
|
||||
|
||||
(symfony_property) @variable.member
|
||||
|
||||
[
|
||||
(comment)
|
||||
(single_line_comment)
|
||||
@@ -26,22 +50,59 @@
|
||||
|
||||
[
|
||||
(string)
|
||||
(multiline_value)
|
||||
(multiline_value_content)
|
||||
(symfony_string)
|
||||
] @string
|
||||
|
||||
(deletion_line
|
||||
">" @operator)
|
||||
|
||||
(copy_line
|
||||
"<" @operator)
|
||||
|
||||
[
|
||||
"="
|
||||
">"
|
||||
"<"
|
||||
":="
|
||||
"=<"
|
||||
(condition_bool)
|
||||
":="
|
||||
"?."
|
||||
(symfony_condition_operator)
|
||||
(condition_bool_legacy)
|
||||
(constant_null_coalescing)
|
||||
] @operator
|
||||
|
||||
"," @punctuation.delimiter
|
||||
(symfony_ternary_operator) @keyword.conditional.ternary
|
||||
|
||||
((symfony_condition_operator) @keyword.operator
|
||||
(#any-of? @keyword.operator
|
||||
"and" "or" "xor" "not" "not in" "in" "contains" "starts with" "ends with" "matches"))
|
||||
|
||||
[
|
||||
","
|
||||
"."
|
||||
] @punctuation.delimiter
|
||||
|
||||
(symfony_property_access
|
||||
"." @operator)
|
||||
|
||||
(symfony_method_call
|
||||
"." @operator)
|
||||
|
||||
[
|
||||
"("
|
||||
")"
|
||||
"["
|
||||
"]"
|
||||
(block_punctuation)
|
||||
] @punctuation.bracket
|
||||
|
||||
(condition
|
||||
"[" @punctuation.special)
|
||||
|
||||
(condition
|
||||
"]" @punctuation.special)
|
||||
|
||||
(symfony_number) @number
|
||||
|
||||
(symfony_boolean) @boolean
|
||||
|
||||
(symfony_null) @constant.builtin
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
(block) @indent.begin
|
||||
|
||||
"}" @indent.branch @indent.end
|
||||
"}" @indent.end
|
||||
|
||||
(comment) @indent.ignore
|
||||
[
|
||||
"{"
|
||||
"}"
|
||||
] @indent.branch
|
||||
|
||||
[
|
||||
(comment)
|
||||
(multiline_value)
|
||||
] @indent.ignore
|
||||
|
||||
@@ -1,2 +1,13 @@
|
||||
((multiline_line
|
||||
(identifier) @_id
|
||||
.
|
||||
(multiline_value
|
||||
(multiline_value_content) @injection.content))
|
||||
(#lua-match? @_id "_CSS_DEFAULT_STYLE$")
|
||||
(#set! injection.language "css"))
|
||||
|
||||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
||||
|
||||
((single_line_comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
||||
|
||||
Reference in New Issue
Block a user