mcauley-penney / tidy.nvim

A small Neovim plugin to remove trailing whitespace and empty lines at end of file on every save
107 stars 15 forks source link

feat: toggle tidy on or off #11

Closed loqusion closed 1 year ago

loqusion commented 1 year ago

Sometimes you might want to preserve whitespace in a one-off instance where it doesn't make sense to add a certain filetype to filetype_exclude. In these cases, you can now use require('tidy').toggle() to toggle its functionality on or off.

vim.b.tidy_enabled is also added in case you want to disable functionality on a per-buffer basis.

mcauley-penney commented 1 year ago

This looks good, thank you! I'll test it today 👍🏻

mcauley-penney commented 1 year ago

I played around with this a bit today and didn't run into any issues with the workflows I tried out