1
0
mirror of https://github.com/tiyn/dotfiles.git synced 2025-10-10 19:41:15 +02:00

nvim: switch back to official tidy with newly added manual cleanup

This commit is contained in:
2024-01-04 19:44:24 +01:00
parent 98cace7592
commit ff9550d552
4 changed files with 30 additions and 6 deletions

View File

@@ -1,6 +1,7 @@
vim.api.nvim_create_autocmd({ 'VimEnter' },
{
callback = function()
require("tidy").opts.enabled_on_save = false
require("knap").toggle_autopreviewing()
end
})
@@ -12,6 +13,17 @@ vim.api.nvim_create_autocmd({ 'BufEnter' },
end
})
vim.api.nvim_create_autocmd({ 'BufLeave' },
{
callback = function()
if vim.o.ma then
require("tidy").run()
end
end
}
)
vim.api.nvim_create_autocmd({ 'VimLeave' },
{
callback = function()

View File

@@ -1,10 +1,21 @@
vim.api.nvim_create_autocmd({ 'VimEnter' },
{
callback = function()
require("tidy").opts.enabled_on_save = false
require("knap").toggle_autopreviewing()
end
})
vim.api.nvim_create_autocmd({ 'BufLeave' },
{
callback = function()
if vim.o.ma then
require("tidy").run()
end
end
}
)
vim.api.nvim_create_autocmd({ 'VimLeave' },
{
callback = function()