Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Format on auto save #69

Open
miladabc opened this issue Jan 10, 2023 · 1 comment
Open

Format on auto save #69

miladabc opened this issue Jan 10, 2023 · 1 comment

Comments

@miladabc
Copy link

Thanks for your work on this plugin,
I was wondering if it is possible to format on auto save, I have this autocmd and your plugin does not format after this.

vim.api.nvim_create_autocmd("BufLeave", {
	group = vim.api.nvim_create_augroup("AutoSave", { clear = true }),
	callback = function(event)
		vim.api.nvim_command("update")
	end,
})
@lukas-reineke
Copy link
Owner

This is probably because autocommands are not nested by default. Take a look at :help autocmd-nested

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants