A simple neovim plugin that trims trailing whitespaces before writing the buffer to file.
Command | Action |
---|---|
TrimmerToggle |
Enable or disable autocommand |
TrimmerTrim |
Manually trim current buffer |
With defaults:
{
"ravvio/trimmer-nvim",
config = function ()
require("trimmer-nvim").setup({})
end
}
or with options (here defaults are shown):
{
"ravvio/trimmer-nvim",
config = function ()
require("trimmer-nvim").setup({
-- enable / disable autocommand at startup
enabled = true,
-- events in which to set the autocommand
events = { "BufWritePre" }
-- filetypes in which the trimmer will not be run
-- like `markdown` or `lua`
exclude = { }
})
end
}