1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
return {
"stevearc/conform.nvim",
event = { "BufReadPre", "BufNewFile" },
opts = {
formatters_by_ft = {
sh = { "shfmt" }, -- brew install
bash = { "shfmt" },
python = { "ruff_format", "black" }, -- brew install ruff
lua = { "stylua" }, -- brew install stylua
typescript = { "prettierd", "prettier" },
javascript = { "prettierd", "prettier" },
json = { "jq" }, -- brew install jq
-- cpp = { "clang_format" },
},
},
config = function(_, opts)
require("conform").setup(opts)
end,
}
|