Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Is it possible to force a newline at the end of the file? #349

@mrichards42

Description

@mrichards42

Hi, thanks for a great tool!

I'm wondering if there's a way to ensure that files end with a newline, while using {:style :respect-nl}. Ideally I'd love to be able to configure zprint to trim all trailing newlines except one and add a trailing newline if it's missing. Based on #100 it looks like I might be able to get this behavior if I use {:parse {:interpose "\n\n"}} but ideally I'd like to not change spacing between forms, just at the end of the file.

I couldn't find this in the docs or in other issues, but sorry if I'm missing something totally obvious. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions