ITADN

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

#349Openmrichards42 创建于 2025-02-27
M
mrichards42commented
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 https://github.com/kkinnear/zprint/issues/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!
4 条评论