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

fix: test editorconfig ~= nil #13

Closed matleh closed 1 year ago

matleh commented 1 year ago

When editorconfig is not set, the BufWritePre autocommands leads to an error. Fix includes test for vim.b.editorconfig ~= nil.

mcauley-penney commented 1 year ago

Good catch. When I saw the original PR the other day, I immediately noticed there wasn't a null check, but some tests I performed gave me the impression that it wasn't necessary for some reason, which I remember thinking was surprising and must be incorrect.