mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-05 21:10:15 -04:00
feat: add angular parser and queries
This commit is contained in:
parent
9d91101f71
commit
1e74c34b66
4 changed files with 99 additions and 0 deletions
67
queries/angular/highlights.scm
Normal file
67
queries/angular/highlights.scm
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
(identifier) @variable
|
||||
(pipe_sequence "|" @operator)
|
||||
(string) @string
|
||||
(number) @number
|
||||
(pipe_call
|
||||
name: (identifier) @function)
|
||||
(pipe_call
|
||||
arguments: (pipe_arguments
|
||||
(identifier) @parameter))
|
||||
|
||||
(structural_assignment
|
||||
operator: (identifier) @keyword)
|
||||
|
||||
(member_expression
|
||||
property: (identifier) @property)
|
||||
|
||||
(call_expression
|
||||
function: (identifier) @function)
|
||||
|
||||
(call_expression
|
||||
function: ((identifier) @function.builtin
|
||||
(#eq? @function.builtin "$any")))
|
||||
|
||||
[
|
||||
"let"
|
||||
"as"
|
||||
] @keyword
|
||||
|
||||
[
|
||||
"("
|
||||
")"
|
||||
"["
|
||||
"]"
|
||||
"{"
|
||||
"}"
|
||||
] @punctuation.bracket
|
||||
|
||||
[
|
||||
";"
|
||||
"."
|
||||
","
|
||||
"?."
|
||||
] @punctuation.delimiter
|
||||
|
||||
((identifier) @boolean
|
||||
(#vim-match? @boolean "^(true|false)$"))
|
||||
((identifier) @variable.builtin
|
||||
(#vim-match? @variable.builtin "^(this|\$event|null)$"))
|
||||
|
||||
[
|
||||
"-"
|
||||
"&&"
|
||||
"+"
|
||||
"<"
|
||||
"<="
|
||||
"="
|
||||
"=="
|
||||
"==="
|
||||
"!="
|
||||
"!=="
|
||||
">"
|
||||
">="
|
||||
"*"
|
||||
"/"
|
||||
"||"
|
||||
"%"
|
||||
] @operator
|
||||
Loading…
Add table
Add a link
Reference in a new issue