File tree Expand file tree Collapse file tree 2 files changed +48
-13
lines changed
packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/languages/nix Expand file tree Collapse file tree 2 files changed +48
-13
lines changed Original file line number Diff line number Diff line change
1
+ languageId : nix
2
+ command :
3
+ version : 6
4
+ spokenForm : change condition
5
+ action :
6
+ name : clearAndSetSelection
7
+ target :
8
+ type : primitive
9
+ modifiers :
10
+ - type : containingScope
11
+ scopeType : {type: condition}
12
+ usePrePhraseSnapshot : true
13
+ initialState :
14
+ documentContents : |
15
+ {
16
+ key =
17
+ if a > b
18
+ then b
19
+ else c;
20
+ }
21
+ selections :
22
+ - anchor : {line: 3, character: 9}
23
+ active : {line: 3, character: 9}
24
+ marks : {}
25
+ finalState :
26
+ documentContents : |
27
+ {
28
+ key =
29
+ if
30
+ then b
31
+ else c;
32
+ }
33
+ selections :
34
+ - anchor : {line: 2, character: 7}
35
+ active : {line: 2, character: 7}
Original file line number Diff line number Diff line change 24
24
;; !! in a + b
25
25
(let_expression
26
26
"let"
27
- (_) @statement.iteration @value.iteration @name.iteration @condition.iteration
27
+ (_) @statement.iteration @value.iteration @name.iteration
28
28
)
29
29
30
30
;; Conditionals
31
31
32
32
;; !! key = if a then b else c;
33
33
;; ! ^^^^^^^^^^^^^^^^^^
34
- (if_expression) @ifStatement @branch.iteration
34
+ (if_expression) @ifStatement @branch.iteration @condition.iteration
35
35
;; !! key = if a then b else c;
36
36
;; ! ^^^^
37
37
(if_expression
51
51
alternative: (_) @branch.end
52
52
)
53
53
54
+ ;; !! key = if a > 10 then b else c;
55
+ ;; ! ^^^^^^
56
+ (if_expression
57
+ condition: (_) @condition
58
+ ) @_.domain
59
+
54
60
;; Lists and maps
55
61
56
62
;; !! foo = [ a b c ];
77
83
;; ! ^^^^^
78
84
(comment) @comment @textFragment
79
85
80
- (string_expression
81
- _ @textFragment.start.endOf
82
- (string_fragment)
83
- _ @textFragment.end.startOf
84
- ) @string
85
-
86
- (indented_string_expression
87
- "''" @textFragment.start.endOf
88
- (string_fragment)
89
- "''" @textFragment.end.startOf
90
- ) @string
86
+ [
87
+ (string_expression)
88
+ (indented_string_expression)
89
+ ] @string
90
+ (string_fragment) @textFragment
91
91
92
92
;; Functions
93
93
You can’t perform that action at this time.
0 commit comments