From ab9f724c28b8ef938de64ce8c7a45ab7858aecdb Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Mon, 19 Feb 2024 20:40:28 +0100 Subject: [PATCH] neovim: update on-save triggers for go --- dot_config/nvim/lua/custom/configs/null-ls.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dot_config/nvim/lua/custom/configs/null-ls.lua b/dot_config/nvim/lua/custom/configs/null-ls.lua index 237996e..a26a5c7 100644 --- a/dot_config/nvim/lua/custom/configs/null-ls.lua +++ b/dot_config/nvim/lua/custom/configs/null-ls.lua @@ -4,8 +4,8 @@ local augroup = vim.api.nvim_create_augroup("LspFormatting", {}) local opts = { sources = { -- run these on save null_ls.builtins.formatting.gofumpt, - null_ls.builtins.formatting.goimports_reviser, - null_ls.builtins.formatting.golines, + null_ls.builtins.formatting.goimports, + null_ls.builtins.diagnostics.golangci_lint, }, on_attach = function (client, bufnr) if client.supports_method("textDocument/formatting") then @@ -17,7 +17,7 @@ local opts = { group = augroup, buffer = bufnr, callback = function() - vim.lsp.buf.format({bufnr = bufnr}) + vim.lsp.buf.format({ async = false }) end, }) end