Skip to content

Commit

Permalink
fix(autoformat): make buf part of the autocmd group name
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Jan 1, 2023
1 parent 0e6b710 commit 1bc0299
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/plugins/lsp/format.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1bc0299

Please sign in to comment.