diff options
| author | Dennis van den Berg <dennis.vandenberg@nedap.com> | 2024-01-27 12:17:25 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-27 12:17:25 +0100 |
| commit | 2fb2100fedf8988f12b1f09efe38134f831e2d99 (patch) | |
| tree | fe633044d2235dc8e283dab17c9c89b5409bde4b /queries/angular | |
| parent | Update parsers: astro, bitbake, c, cpp, dtd, gnuplot, json, php, php_only, wi... (diff) | |
| download | nvim-treesitter-2fb2100fedf8988f12b1f09efe38134f831e2d99.tar nvim-treesitter-2fb2100fedf8988f12b1f09efe38134f831e2d99.tar.gz nvim-treesitter-2fb2100fedf8988f12b1f09efe38134f831e2d99.tar.bz2 nvim-treesitter-2fb2100fedf8988f12b1f09efe38134f831e2d99.tar.lz nvim-treesitter-2fb2100fedf8988f12b1f09efe38134f831e2d99.tar.xz nvim-treesitter-2fb2100fedf8988f12b1f09efe38134f831e2d99.tar.zst nvim-treesitter-2fb2100fedf8988f12b1f09efe38134f831e2d99.zip | |
feat(angular)!: switch to parser supporting v17 (#5779)
Diffstat (limited to 'queries/angular')
| -rw-r--r-- | queries/angular/folds.scm | 1 | ||||
| -rw-r--r-- | queries/angular/highlights.scm | 116 | ||||
| -rw-r--r-- | queries/angular/indents.scm | 1 | ||||
| -rw-r--r-- | queries/angular/injections.scm | 1 | ||||
| -rw-r--r-- | queries/angular/locals.scm | 1 |
5 files changed, 92 insertions, 28 deletions
diff --git a/queries/angular/folds.scm b/queries/angular/folds.scm new file mode 100644 index 000000000..1f2129cf9 --- /dev/null +++ b/queries/angular/folds.scm @@ -0,0 +1 @@ +; inherits: html diff --git a/queries/angular/highlights.scm b/queries/angular/highlights.scm index a109dc179..eb0107e2d 100644 --- a/queries/angular/highlights.scm +++ b/queries/angular/highlights.scm @@ -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,36 +90,47 @@ "]" "{" "}" + "@" + "} @" + (if_end_expression) + (for_end_expression) + (switch_end_expression) + (case_end_expression) + (default_end_expression) + (defer_end_expression) ] @punctuation.bracket [ + "{{" + "}}" +] @punctuation.special + +[ ";" "." "," "?." ] @punctuation.delimiter -((identifier) @boolean - (#any-of? @boolean "true" "false")) - -((identifier) @variable.builtin - (#any-of? @variable.builtin "this" "\$event" "null")) +(concatination_expression + "+" @operator) -[ - "-" - "&&" - "+" - "<" - "<=" - "=" - "==" - "===" - "!=" - "!==" - ">" - ">=" - "*" - "/" - "||" - "%" -] @operator +(binary_expression + [ + "-" + "&&" + "+" + "<" + "<=" + "=" + "==" + "===" + "!=" + "!==" + ">" + ">=" + "*" + "/" + "||" + "%" + ] @operator) diff --git a/queries/angular/indents.scm b/queries/angular/indents.scm new file mode 100644 index 000000000..448e94275 --- /dev/null +++ b/queries/angular/indents.scm @@ -0,0 +1 @@ +; inherits: html_tags diff --git a/queries/angular/injections.scm b/queries/angular/injections.scm new file mode 100644 index 000000000..448e94275 --- /dev/null +++ b/queries/angular/injections.scm @@ -0,0 +1 @@ +; inherits: html_tags diff --git a/queries/angular/locals.scm b/queries/angular/locals.scm new file mode 100644 index 000000000..1f2129cf9 --- /dev/null +++ b/queries/angular/locals.scm @@ -0,0 +1 @@ +; inherits: html |
