conform.nvim icon indicating copy to clipboard operation
conform.nvim copied to clipboard

Disable trailing newline globally

Open elkrammer opened this issue 1 year ago • 1 comments

Is there a way to prevent conform.nvim from adding trailing newlines at a global level? Some formatters allow disabling / customizing this behavior but not all formatters support it.

Is there a way to make conform.nvim strip trailing newlines on BufWritePost for all fileformats?

elkrammer avatar Apr 04 '24 10:04 elkrammer

I'm also having problems with new lines at the end of files. In my case, I've set StyLua to format Lua files. By running stylua . on the command line, the formatter formats correctly (with no new line at the end). But, when calling formatting with Conform, even explicitly setting lsp_fallback to false, the code gets formatted with an ending new line.

atchim avatar May 15 '24 10:05 atchim