mirror of
				https://github.com/tiyn/tidy.nvim.git
				synced 2025-11-04 05:01:22 +01:00 
			
		
		
		
	Change BufWritePre to BufLeave
This commit is contained in:
		@@ -57,7 +57,7 @@ function M.setup(opts)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  local tidy_grp = vim.api.nvim_create_augroup("tidy", { clear = true })
 | 
					  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,
 | 
					    group = tidy_grp,
 | 
				
			||||||
    callback = function()
 | 
					    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
 | 
					      if not M.enabled or is_excluded_ft(opts) or (vim.b.editorconfig ~= nil and not vim.tbl_isempty(vim.b.editorconfig)) then
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user