From c0157230353dd3ea4960141ab9730ce9b510047c Mon Sep 17 00:00:00 2001 From: Matthias Lehmann Date: Wed, 7 Jun 2023 10:43:12 +0200 Subject: [PATCH] fix: test editorconfig ~= nil --- lua/tidy/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/tidy/init.lua b/lua/tidy/init.lua index 63f4780..20290bf 100644 --- a/lua/tidy/init.lua +++ b/lua/tidy/init.lua @@ -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