diff --git a/init.lua b/init.lua index 91c16dcb..bc1805d9 100644 --- a/init.lua +++ b/init.lua @@ -831,16 +831,17 @@ require('lazy').setup({ } end, formatters_by_ft = { + -- + -- Conform can also run multiple formatters sequentially + -- You can use 'stop_after_first' to run the first available formatter from the list bash = { 'shellcheck' }, - hcl = { 'hclfmt' }, go = { 'goimports', 'gofumpt' }, + hcl = { 'hclfmt' }, + javascript = { 'prettierd', 'prettier', stop_after_first = true }, lua = { 'stylua' }, - -- Conform can also run multiple formatters sequentially - python = { 'isort', 'black' }, markdown = { 'inject' }, - -- - -- You can use 'stop_after_first' to run the first available formatter from the list - javascript = { 'prettierd', 'prettier', stop_after_first = true }, + python = { 'isort', 'black' }, + rust = { 'rustfmt', lsp_format = 'fallback' }, terraform = { 'terraform_fmt' }, yaml = { 'yamlfmt' }, },