diff options
| author | Amaan Qureshi <amaanq12@gmail.com> | 2023-04-15 19:52:23 -0400 |
|---|---|---|
| committer | Amaan Qureshi <amaanq12@gmail.com> | 2023-04-15 20:13:44 -0400 |
| commit | da7f886ab5dde87b7c9bbae1c1eb99aa63a74e55 (patch) | |
| tree | 29637dd0cf407cd317896823c91d8f85d884cfdf | |
| parent | feat(cpp): improve function.call to support any level of nesting for qualifie... (diff) | |
| download | nvim-treesitter-da7f886ab5dde87b7c9bbae1c1eb99aa63a74e55.tar nvim-treesitter-da7f886ab5dde87b7c9bbae1c1eb99aa63a74e55.tar.gz nvim-treesitter-da7f886ab5dde87b7c9bbae1c1eb99aa63a74e55.tar.bz2 nvim-treesitter-da7f886ab5dde87b7c9bbae1c1eb99aa63a74e55.tar.lz nvim-treesitter-da7f886ab5dde87b7c9bbae1c1eb99aa63a74e55.tar.xz nvim-treesitter-da7f886ab5dde87b7c9bbae1c1eb99aa63a74e55.tar.zst nvim-treesitter-da7f886ab5dde87b7c9bbae1c1eb99aa63a74e55.zip | |
perf(ecma): remove GraphQL comment injection, use lua-match for gql template detection
| -rw-r--r-- | queries/ecma/injections.scm | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/queries/ecma/injections.scm b/queries/ecma/injections.scm index 52675d506..712c780ac 100644 --- a/queries/ecma/injections.scm +++ b/queries/ecma/injections.scm @@ -78,12 +78,13 @@ (regex_pattern) @regex -((comment) @_gql_comment - (#eq? @_gql_comment "/* GraphQL */") - (template_string) @graphql) +; ((comment) @_gql_comment +; (#eq? @_gql_comment "/* GraphQL */") +; (template_string) @graphql) -(((template_string) @_template_string - (#match? @_template_string "^`#graphql")) @graphql) +((template_string) @graphql + (#lua-match? @graphql "^`#graphql") + (#offset! @graphql 0 1 0 -1)) ; el.innerHTML = `<html>` (assignment_expression |
