Skip to content

Commit b9a34a3

Browse files
committed
fix: ctrl_do in expr_parenthesized
1 parent 3e2d681 commit b9a34a3

File tree

4 files changed

+12
-6
lines changed

4 files changed

+12
-6
lines changed

languages.ncl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
extensions = ["nu"],
55
grammar.source.git = {
66
git = "https://github.com/nushell/tree-sitter-nu.git",
7-
rev = "f85d2481616537d1d54894bc278d64b24581ea5c",
7+
rev = "755efd545d39e23418ce6f96f2a8600ff1a7e74d",
88
},
99
},
1010
},

languages/nu.scm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@
241241
(default_arm)? @prepend_spaced_softline
242242
)
243243

244-
(ctrl_do (_) @prepend_space)
244+
(ctrl_do (_) @prepend_input_softline)
245245

246246
;; data structures
247247
(command_list

test/expected_decl.nu

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,12 @@ extern hi [
1010
# env
1111
hide-env ABC
1212
with-env { ABC: 'hello' } {
13-
do -i --env {|foo, bar|
14-
print $env.ABC
15-
} foo bar
13+
(
14+
do -i --env {|foo, bar|
15+
print $env.ABC
16+
}
17+
foo bar
18+
)
1619
}
1720

1821
# closure

test/input_decl.nu

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,11 @@ extern hi [name: string --long (-s) # flags
88
# env
99
hide-env ABC
1010
with-env {ABC: 'hello'} {
11+
(
1112
do -i --env {|foo, bar | print $env.ABC
12-
} foo bar
13+
}
14+
foo bar
15+
)
1316
}
1417

1518
# closure

0 commit comments

Comments
 (0)