I like to keep my files orderly. Tidy.nvim is a function and autocommand pair that helps me do this by removing all empty lines from the end of the file and trailing whitespace from all lines on every save.
Credits: