Skip to content

Function body { merged onto signature line #104

@asakura

Description

@asakura

Triggers when the def signature exceeds line_length (80). nufmt places the body opening { on the signature line and the first statement immediately after it.

Minimal reproducer

def foo [h: record]: record -> record<result: record, current_input: record, done: bool> {
  let acc: record = $in
  $acc
}

Signature is 90 chars (> 80). Output:

def foo [h: record]: record -> record<result: record, current_input: record, done: bool> { let acc: record = $in
$acc }

Environment

nushell 0.111.0
nufmt 8444c422f3d55e9cac4bdf9da554b2b4b8f7b682
rustc 1.93.0 (254b59607 2026-01-19) (built from a source tarball)

nufmt.nuon:

{
    indent: 2
    line_length: 80
    margin: 1
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions