mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-06 05:20:00 -04:00
feat(angular)!: switch to parser supporting v17 (#5779)
This commit is contained in:
parent
589fa77c23
commit
2fb2100fed
9 changed files with 159 additions and 52 deletions
1
queries/angular/folds.scm
Normal file
1
queries/angular/folds.scm
Normal file
|
|
@ -0,0 +1 @@
|
|||
; inherits: html
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
; inherits: html_tags
|
||||
(identifier) @variable
|
||||
|
||||
(pipe_sequence
|
||||
"|" @operator)
|
||||
(pipe_operator) @operator
|
||||
|
||||
(string) @string
|
||||
|
||||
|
|
@ -15,6 +15,27 @@
|
|||
(pipe_arguments
|
||||
(identifier) @variable.parameter))
|
||||
|
||||
(structural_directive
|
||||
"*" @keyword
|
||||
(identifier) @keyword)
|
||||
|
||||
(attribute
|
||||
(attribute_name) @variable.member
|
||||
(#lua-match? @variable.member "#.*"))
|
||||
|
||||
(binding_name
|
||||
(identifier) @keyword)
|
||||
|
||||
(event_binding
|
||||
(binding_name
|
||||
(identifier) @keyword))
|
||||
|
||||
(event_binding
|
||||
"\"" @punctuation.delimiter)
|
||||
|
||||
(property_binding
|
||||
"\"" @punctuation.delimiter)
|
||||
|
||||
(structural_assignment
|
||||
operator: (identifier) @keyword)
|
||||
|
||||
|
|
@ -29,10 +50,38 @@
|
|||
((identifier) @function.builtin
|
||||
(#eq? @function.builtin "$any")))
|
||||
|
||||
(pair
|
||||
key:
|
||||
((identifier) @variable.builtin
|
||||
(#eq? @variable.builtin "$implicit")))
|
||||
|
||||
((control_keyword) @keyword.repeat
|
||||
(#any-of? @keyword.repeat "for" "empty"))
|
||||
|
||||
((control_keyword) @keyword.conditional
|
||||
(#any-of? @keyword.conditional "if" "else" "switch" "case" "default"))
|
||||
|
||||
((control_keyword) @keyword.coroutine
|
||||
(#any-of? @keyword.coroutine "defer" "placeholder" "loading"))
|
||||
|
||||
((control_keyword) @keyword.exception
|
||||
(#eq? @keyword.exception "error"))
|
||||
|
||||
(special_keyword) @keyword
|
||||
|
||||
((identifier) @boolean
|
||||
(#any-of? @boolean "true" "false"))
|
||||
|
||||
((identifier) @variable.builtin
|
||||
(#any-of? @variable.builtin "this" "$event"))
|
||||
|
||||
((identifier) @constant.builtin
|
||||
(#eq? @constant.builtin "null"))
|
||||
|
||||
[
|
||||
"let"
|
||||
"as"
|
||||
] @keyword
|
||||
(ternary_operator)
|
||||
(conditional_operator)
|
||||
] @keyword.conditional.ternary
|
||||
|
||||
[
|
||||
"("
|
||||
|
|
@ -41,8 +90,21 @@
|
|||
"]"
|
||||
"{"
|
||||
"}"
|
||||
"@"
|
||||
"} @"
|
||||
(if_end_expression)
|
||||
(for_end_expression)
|
||||
(switch_end_expression)
|
||||
(case_end_expression)
|
||||
(default_end_expression)
|
||||
(defer_end_expression)
|
||||
] @punctuation.bracket
|
||||
|
||||
[
|
||||
"{{"
|
||||
"}}"
|
||||
] @punctuation.special
|
||||
|
||||
[
|
||||
";"
|
||||
"."
|
||||
|
|
@ -50,27 +112,25 @@
|
|||
"?."
|
||||
] @punctuation.delimiter
|
||||
|
||||
((identifier) @boolean
|
||||
(#any-of? @boolean "true" "false"))
|
||||
(concatination_expression
|
||||
"+" @operator)
|
||||
|
||||
((identifier) @variable.builtin
|
||||
(#any-of? @variable.builtin "this" "\$event" "null"))
|
||||
|
||||
[
|
||||
"-"
|
||||
"&&"
|
||||
"+"
|
||||
"<"
|
||||
"<="
|
||||
"="
|
||||
"=="
|
||||
"==="
|
||||
"!="
|
||||
"!=="
|
||||
">"
|
||||
">="
|
||||
"*"
|
||||
"/"
|
||||
"||"
|
||||
"%"
|
||||
] @operator
|
||||
(binary_expression
|
||||
[
|
||||
"-"
|
||||
"&&"
|
||||
"+"
|
||||
"<"
|
||||
"<="
|
||||
"="
|
||||
"=="
|
||||
"==="
|
||||
"!="
|
||||
"!=="
|
||||
">"
|
||||
">="
|
||||
"*"
|
||||
"/"
|
||||
"||"
|
||||
"%"
|
||||
] @operator)
|
||||
|
|
|
|||
1
queries/angular/indents.scm
Normal file
1
queries/angular/indents.scm
Normal file
|
|
@ -0,0 +1 @@
|
|||
; inherits: html_tags
|
||||
1
queries/angular/injections.scm
Normal file
1
queries/angular/injections.scm
Normal file
|
|
@ -0,0 +1 @@
|
|||
; inherits: html_tags
|
||||
1
queries/angular/locals.scm
Normal file
1
queries/angular/locals.scm
Normal file
|
|
@ -0,0 +1 @@
|
|||
; inherits: html
|
||||
Loading…
Add table
Add a link
Reference in a new issue