Skip to content

Unexpected blank lines between adjacent top-level statements #126

@asakura

Description

@asakura

When margin: 2 in config, nufmt inserts vertical spacing between adjacent top-level use statements.

Minimal reproducer

use a.nu
use b.nu

Output:

use a.nu


use b.nu

Expected:

use a.nu
use b.nu

Environment

nushell 0.111.0
nufmt 7c5aead0ee254232b78606fa49946fecdcc89c76 and 3982173ee09e562ca2e74068355ae8d858d5e4bf
rustc 1.93.0 (254b59607 2026-01-19) (built from a source tarball)

nufmt.nuon:

{
    indent: 2
    line_length: 80
    margin: 2
}

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