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/ecma | |
| 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/ecma')
| -rw-r--r-- | queries/ecma/injections.scm | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/queries/ecma/injections.scm b/queries/ecma/injections.scm index 51eb22a7e..d23e2fdfa 100644 --- a/queries/ecma/injections.scm +++ b/queries/ecma/injections.scm @@ -137,3 +137,65 @@ (string (string_fragment) @injection.content) (#set! injection.language "html")) + +;---- Angular injections ----- +; @Component({ +; template: `<html>` +; }) +(decorator + (call_expression + function: + ((identifier) @_name + (#eq? @_name "Component")) + arguments: + (arguments + (object + (pair + key: + ((property_identifier) @_prop + (#eq? @_prop "template")) + value: + ((template_string) @injection.content + (#offset! @injection.content 0 1 0 -1) + (#set! injection.language "angular"))))))) + +; @Component({ +; styles: [`<css>`] +; }) +(decorator + (call_expression + function: + ((identifier) @_name + (#eq? @_name "Component")) + arguments: + (arguments + (object + (pair + key: + ((property_identifier) @_prop + (#eq? @_prop "styles")) + value: + (array + ((template_string) @injection.content + (#offset! @injection.content 0 1 0 -1) + (#set! injection.language "css")))))))) + +; @Component({ +; styles: `<css>` +; }) +(decorator + (call_expression + function: + ((identifier) @_name + (#eq? @_name "Component")) + arguments: + (arguments + (object + (pair + key: + ((property_identifier) @_prop + (#eq? @_prop "styles")) + value: + ((template_string) @injection.content + (#offset! @injection.content 0 1 0 -1) + (#set! injection.language "css"))))))) |
