Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable trailing newline globally #362

Open
elkrammer opened this issue Apr 4, 2024 · 1 comment
Open

Disable trailing newline globally #362

elkrammer opened this issue Apr 4, 2024 · 1 comment

Comments

@elkrammer
Copy link

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?

@atchim
Copy link

atchim commented May 15, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants