diff --git a/languages.ncl b/languages.ncl index bcec7b3..1f0c8dc 100644 --- a/languages.ncl +++ b/languages.ncl @@ -4,7 +4,7 @@ extensions = ["nu"], grammar.source.git = { git = "https://github.com/nushell/tree-sitter-nu.git", - rev = "f85d2481616537d1d54894bc278d64b24581ea5c", + rev = "755efd545d39e23418ce6f96f2a8600ff1a7e74d", }, }, }, diff --git a/languages/nu.scm b/languages/nu.scm index fed9948..fb20003 100644 --- a/languages/nu.scm +++ b/languages/nu.scm @@ -241,7 +241,7 @@ (default_arm)? @prepend_spaced_softline ) -(ctrl_do (_) @prepend_space) +(ctrl_do (_) @prepend_input_softline) ;; data structures (command_list diff --git a/test/expected_decl.nu b/test/expected_decl.nu index b3e83e6..142f8e1 100644 --- a/test/expected_decl.nu +++ b/test/expected_decl.nu @@ -10,9 +10,12 @@ extern hi [ # env hide-env ABC with-env { ABC: 'hello' } { - do -i --env {|foo, bar| - print $env.ABC - } foo bar + ( + do -i --env {|foo, bar| + print $env.ABC + } + foo bar + ) } # closure diff --git a/test/input_decl.nu b/test/input_decl.nu index 64e799e..9dd1c3a 100644 --- a/test/input_decl.nu +++ b/test/input_decl.nu @@ -8,8 +8,11 @@ extern hi [name: string --long (-s) # flags # env hide-env ABC with-env {ABC: 'hello'} { + ( do -i --env {|foo, bar | print $env.ABC - } foo bar + } + foo bar + ) } # closure