Merge pull request #13 from matleh/fix/editorconfig-nil

fix: test editorconfig ~= nil
main
jmp 1 year ago committed by GitHub
commit 0f3213ef0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -60,7 +60,7 @@ function M.setup(opts)
vim.api.nvim_create_autocmd("BufWritePre", {
group = tidy_grp,
callback = function()
if not M.enabled or is_excluded_ft(opts) or not vim.tbl_isempty(vim.b.editorconfig) then
if not M.enabled or is_excluded_ft(opts) or (vim.b.editorconfig ~= nil and not vim.tbl_isempty(vim.b.editorconfig)) then
return false
end

Loading…
Cancel
Save