2025-11-20 11:52:01 +08:00
|
|
|
return {
|
|
|
|
|
"stevearc/conform.nvim",
|
|
|
|
|
opts = {
|
|
|
|
|
formatters_by_ft = {
|
|
|
|
|
xml = { "xmlformatter" },
|
|
|
|
|
json = { "prettier" },
|
|
|
|
|
cfg = { "prettier" },
|
2025-11-22 15:27:08 +08:00
|
|
|
lua = { "stylua" },
|
2025-11-20 11:52:01 +08:00
|
|
|
},
|
|
|
|
|
formatters = {
|
|
|
|
|
xmlformatter = {
|
|
|
|
|
command = "xmlformat",
|
|
|
|
|
args = {
|
2025-11-22 15:27:08 +08:00
|
|
|
"--indent",
|
|
|
|
|
"4",
|
|
|
|
|
"-",
|
2025-11-20 11:52:01 +08:00
|
|
|
},
|
|
|
|
|
stdin = true,
|
|
|
|
|
},
|
|
|
|
|
prettier = {
|
|
|
|
|
prepend_args = {
|
2025-11-22 15:27:08 +08:00
|
|
|
"--tab-width",
|
|
|
|
|
"4",
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
stylua = {
|
|
|
|
|
prepend_args = {
|
|
|
|
|
"--indent-width",
|
|
|
|
|
"4",
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
2025-11-20 11:52:01 +08:00
|
|
|
},
|
|
|
|
|
}
|