Skip to content

Commit

Permalink
Removes formatting on save
Browse files Browse the repository at this point in the history
  • Loading branch information
usodst committed Apr 29, 2024
1 parent 5827c22 commit 84be073
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions plugins.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,6 @@ local plugins = {
null_ls.builtins.formatting.terraform_fmt,
null_ls.builtins.formatting.yamlfmt,
}
opts.on_attach = function(client, _)
if client.supports_method "textDocument/formatting" then
vim.api.nvim_create_autocmd("BufWritePost", {
callback = function()
if vim.lsp.buf_is_attached(0, 1) then -- check if none-ls is attached to the current buffer
vim.lsp.buf.format { async = false }
end
end,
})
end
end
return opts
end,
lazy = false,
Expand Down

0 comments on commit 84be073

Please sign in to comment.