Skip to content

Commit

Permalink
fix(nvim): gopls gofumpt fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
caarlos0 committed Apr 18, 2024
1 parent d5cd281 commit f23218e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 6 additions & 0 deletions modules/neovim/config/lua/lsp_autocommands.lua
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ M.setup = function()
organize_imports(client, 0, 1500)
end
end)
if
has_clients_with_method(0, ms.textDocument_formatting)
or has_clients_with_method(0, ms.textDocument_rangeFormatting)
then
vim.lsp.buf.format()
end
end,
group = group,
})
Expand Down
1 change: 0 additions & 1 deletion modules/neovim/config/lua/user/conform.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ conform.setup({
formatters_by_ft = {
css = { "prettier" },
fish = { "fish_indent" },
go = { "gofumpt" },
html = { "prettier" },
javascript = { "prettier" },
json = { "jq" },
Expand Down

0 comments on commit f23218e

Please sign in to comment.