From b15bef77e71b5ba1f4df3f4c2d12e017c3d3f88b Mon Sep 17 00:00:00 2001 From: Luca Saccarola Date: Mon, 5 Jun 2023 15:44:43 +0200 Subject: [PATCH] feat: don't run if editorconfig is detected --- 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 234db6c..329b041 100644 --- a/lua/tidy/init.lua +++ b/lua/tidy/init.lua @@ -64,7 +64,7 @@ function M.setup(opts) vim.api.nvim_create_autocmd("BufWritePre", { group = tidy_grp, callback = function() - if not M.enabled or vim.b.tidy_enabled == false or is_excluded_ft(opts) then + if not M.enabled or vim.b.tidy_enabled == false or is_excluded_ft(opts) or not vim.tbl_isempty(vim.b.editorconfig) then return false end