diff --git a/data/fixtures/scopes/talon/name.field.scope b/data/fixtures/scopes/talon/name.field.scope new file mode 100644 index 0000000000..10eb5c0a2e --- /dev/null +++ b/data/fixtures/scopes/talon/name.field.scope @@ -0,0 +1,13 @@ +aaa [bbb]: bbb or "" +--- + +[Content] = +[Removal] = 0:0-0:9 + >---------< +0| aaa [bbb]: bbb or "" + +[Domain] = 0:0-0:20 + >--------------------< +0| aaa [bbb]: bbb or "" + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/talon/value.field.scope b/data/fixtures/scopes/talon/value.field.scope new file mode 100644 index 0000000000..ceb1f22c51 --- /dev/null +++ b/data/fixtures/scopes/talon/value.field.scope @@ -0,0 +1,20 @@ +aaa [bbb]: bbb or "" +--- + +[Content] = 0:11-0:20 + >---------< +0| aaa [bbb]: bbb or "" + +[Removal] = 0:10-0:20 + >----------< +0| aaa [bbb]: bbb or "" + +[Leading delimiter] = 0:10-0:11 + >-< +0| aaa [bbb]: bbb or "" + +[Domain] = 0:0-0:20 + >--------------------< +0| aaa [bbb]: bbb or "" + +[Insertion delimiter] = " " diff --git a/packages/common/src/scopeSupportFacets/talon.ts b/packages/common/src/scopeSupportFacets/talon.ts index 6b64079b1a..c5728874ff 100644 --- a/packages/common/src/scopeSupportFacets/talon.ts +++ b/packages/common/src/scopeSupportFacets/talon.ts @@ -5,4 +5,6 @@ const { supported } = ScopeSupportFacetLevel; export const talonScopeSupport: LanguageScopeSupportFacetMap = { command: supported, + "name.field": supported, + "value.field": supported, }; diff --git a/queries/talon.scm b/queries/talon.scm index 726533ffac..d9c7dc54f4 100644 --- a/queries/talon.scm +++ b/queries/talon.scm @@ -39,9 +39,12 @@ ;;! ^^^^------------ ;;!! tag(): user.cursorless ;;! ^^^^^----------------- -(_ - left: _ @name -) @_.domain +( + (_ + left: _ @name + ) @_.domain + (#not-type? @_.domain "binary_operator") +) ;;!! not mode: command ;;! ^^^^^^^^--------- @@ -49,18 +52,24 @@ ;;! ^^^^------------ ;;!! tag(): user.cursorless ;;! ^^^^^----------------- -(_ - modifiers: (_)? @collectionKey.start - left: _ @collectionKey.end -) @_.domain +( + (_ + modifiers: (_)? @collectionKey.start + left: _ @collectionKey.end + ) @_.domain + (#not-type? @_.domain "binary_operator") +) ;;!! not mode: command ;;! ----------^^^^^^^ ;;!! slap: key(enter) ;;! ------^^^^^^^^^^ -(_ - right: (_) @value -) @_.domain +( + (_ + right: (_) @value + ) @_.domain + (#not-type? @_.domain "binary_operator") +) ;;!! mode: command ;;! <*************