diff --git a/data/fixtures/scopes/javascript.core/pairDelimiter.scope b/data/fixtures/scopes/javascript.core/pairDelimiter.scope new file mode 100644 index 0000000000..b460330db2 --- /dev/null +++ b/data/fixtures/scopes/javascript.core/pairDelimiter.scope @@ -0,0 +1,10 @@ +taggedTemplate`hello ${world}` +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:15 + >---------------< +0| taggedTemplate`hello ${world}` + +[Insertion delimiter] = " " diff --git a/packages/common/src/scopeSupportFacets/javascript.ts b/packages/common/src/scopeSupportFacets/javascript.ts index 0b44f2c6c3..ad79065b1f 100644 --- a/packages/common/src/scopeSupportFacets/javascript.ts +++ b/packages/common/src/scopeSupportFacets/javascript.ts @@ -12,6 +12,7 @@ export const javascriptCoreScopeSupport: LanguageScopeSupportFacetMap = { switchStatementSubject: supported, fieldAccess: supported, disqualifyDelimiter: supported, + pairDelimiter: supported, "textFragment.string.singleLine": supported, "textFragment.string.multiLine": supported, diff --git a/queries/javascript.core.scm b/queries/javascript.core.scm index 24d55cbee1..4b976160ca 100644 --- a/queries/javascript.core.scm +++ b/queries/javascript.core.scm @@ -454,6 +454,16 @@ (template_string) ] @string +;; taggedTemplate`hello ${world}` +;;! ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +(call_expression + function: (_) @pairDelimiter.start + arguments: (template_string + . + "`" @pairDelimiter.end + ) +) + ;;!! // comment ;;! ^^^^^^^^^^ (comment) @comment