mirror of
https://github.com/Crocmagnon/dotfiles.git
synced 2024-11-21 22:18:07 +01:00
neovim: update on-save triggers for go
This commit is contained in:
parent
e2e612fc9c
commit
ab9f724c28
1 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue