Skip to content

Commit 9b2dc1e

Browse files
Exclude binary operator from Talon name and value scopes
1 parent 181cd9f commit 9b2dc1e

File tree

1 file changed

+19
-10
lines changed

1 file changed

+19
-10
lines changed

queries/talon.scm

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,28 +39,37 @@
3939
;;! ^^^^------------
4040
;;!! tag(): user.cursorless
4141
;;! ^^^^^-----------------
42-
(_
43-
left: _ @name
44-
) @_.domain
42+
(
43+
(_
44+
left: _ @name
45+
) @_.domain
46+
(#not-type? @_.domain "binary_operator")
47+
)
4548

4649
;;!! not mode: command
4750
;;! ^^^^^^^^---------
4851
;;!! slap: key(enter)
4952
;;! ^^^^------------
5053
;;!! tag(): user.cursorless
5154
;;! ^^^^^-----------------
52-
(_
53-
modifiers: (_)? @collectionKey.start
54-
left: _ @collectionKey.end
55-
) @_.domain
55+
(
56+
(_
57+
modifiers: (_)? @collectionKey.start
58+
left: _ @collectionKey.end
59+
) @_.domain
60+
(#not-type? @_.domain "binary_operator")
61+
)
5662

5763
;;!! not mode: command
5864
;;! ----------^^^^^^^
5965
;;!! slap: key(enter)
6066
;;! ------^^^^^^^^^^
61-
(_
62-
right: (_) @value
63-
) @_.domain
67+
(
68+
(_
69+
right: (_) @value
70+
) @_.domain
71+
(#not-type? @_.domain "binary_operator")
72+
)
6473

6574
;;!! mode: command
6675
;;! <*************

0 commit comments

Comments
 (0)