Change BufWritePre to BufLeave

main
tiyn 5 months ago committed by GitHub
parent e564b500f2
commit 15ff2a11f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -57,7 +57,7 @@ function M.setup(opts)
local tidy_grp = vim.api.nvim_create_augroup("tidy", { clear = true })
vim.api.nvim_create_autocmd("BufWritePre", {
vim.api.nvim_create_autocmd("BufLeave", {
group = tidy_grp,
callback = function()
if not M.enabled or is_excluded_ft(opts) or (vim.b.editorconfig ~= nil and not vim.tbl_isempty(vim.b.editorconfig)) then

Loading…
Cancel
Save