fix(autoformat): make buf part of the autocmd group name

This commit is contained in:
Folke Lemaitre 2023-01-01 13:15:12 +01:00
parent 0e6b710627
commit 1bc029969e
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040

View file

@ -26,7 +26,7 @@ end
function M.on_attach(client, buf)
if client.supports_method("textDocument/formatting") then
vim.api.nvim_create_autocmd("BufWritePre", {
group = vim.api.nvim_create_augroup("LspFormat", {}),
group = vim.api.nvim_create_augroup("LspFormat." .. buf, {}),
buffer = buf,
callback = function()
if M.autoformat then