- add user configuration ability
- add two new patterns
- remove empty lines at top of buffer
- condense all multiple empty lines into
one
- update README
- GIFs displaying formatting options
- default config and how to modify
- new packer entry
- credits
- remove vim file and integrate aucmd into lua
eof_quant = -1, -- the amount of empty lines to leave at the end of
-- the file; -1 = no lines, 0 = 1 line, no limit;
-- only applies if "eof" given to "fmts"
fmts = { -- the types of formattings to apply
"eof", -- removes lines at end of file
"multi", -- condenses multiple newlines into one
"sof", -- removes lines at start of file
"ws" -- removes trailing whitespace
}
}
}
```
### how to customize
## Credits:
- [Vim Tips Wiki entry for removing unwanted spaces](https://vim.fandom.com/wiki/Remove_unwanted_spaces#Automatically_removing_all_trailing_whitespace)
To customize which formattings will apply, give a list to the `setup` function:
```lua
use{
"mcauley-penney/tidy.nvim",
config = function()
require "tidy".setup{
fmts = {
"eof",
"ws"
}
}
end,
event = "BufWritePre"
}
```
### formatting styles
- ib., the author of [this stack overflow answer](https://stackoverflow.com/a/7501902)
- `eof`: remove a variable amount of newlines at end of file