Skip to content

Commit ee7fb93

Browse files
author
fidgetingbits
committed
test change round and add domain to collectionKey
1 parent 29a7cdb commit ee7fb93

File tree

2 files changed

+35
-9
lines changed

2 files changed

+35
-9
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
languageId: nix
2+
command:
3+
version: 6
4+
spokenForm: change round
5+
action:
6+
name: clearAndSetSelection
7+
target:
8+
type: primitive
9+
modifiers:
10+
- type: containingScope
11+
scopeType: {type: surroundingPair, delimiter: parentheses}
12+
usePrePhraseSnapshot: true
13+
initialState:
14+
documentContents: |
15+
{
16+
foo = 1; # Test (round)
17+
}
18+
selections:
19+
- anchor: {line: 1, character: 23}
20+
active: {line: 1, character: 23}
21+
marks: {}
22+
finalState:
23+
documentContents: |
24+
{
25+
foo = 1; # Test
26+
}
27+
selections:
28+
- anchor: {line: 1, character: 18}
29+
active: {line: 1, character: 18}

queries/nix.scm

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,18 @@
5858
(list_expression) @list
5959

6060
;;!! foo = { x = 1; y = 2; };
61-
;;! ^^^^^^^^^^^^^^^^^^
61+
;;! ^^^^^^^^^^^^^^^^^
6262
[
6363
(attrset_expression)
6464
(rec_attrset_expression)
6565
] @map @statement.iteration @value.iteration @name.iteration
6666

6767
;;!! foo = { x = 1; y = 2; };
6868
;;! ^
69-
(attrpath) @collectionKey
69+
;;! -----
70+
(binding
71+
attrpath: (_) @collectionKey
72+
) @_.domain
7073

7174
;; Strings
7275

@@ -86,12 +89,6 @@
8689
"''" @textFragment.end.startOf
8790
) @string
8891

89-
;; Hack to test these two are otherwise sane selectors
90-
;; [
91-
;; (string_expression)
92-
;; (indented_string_expression)
93-
;; ] @comment
94-
9592
;; Functions
9693

9794
;; Note for this part of the function, we identify is as lambda only
@@ -123,7 +120,7 @@
123120
(ellipses) @argumentOrParameter
124121
)
125122

126-
;; value
123+
;; Names and Values
127124

128125
;;!! a = 25;
129126
;;! ^^

0 commit comments

Comments
 (0)