2024-04-08 09:26:41 +00:00
|
|
|
local options = {
|
|
|
|
formatters_by_ft = {
|
2024-04-15 09:32:16 +00:00
|
|
|
bash = { "shfmt" },
|
2024-04-24 07:30:39 +00:00
|
|
|
css = { "prettier" },
|
|
|
|
json = { "prettier" },
|
|
|
|
html = { "prettier" },
|
|
|
|
lua = { "stylua" },
|
2024-04-23 14:18:38 +00:00
|
|
|
markdown = { "prettier" },
|
2024-04-24 07:30:39 +00:00
|
|
|
sh = { "shfmt" },
|
2024-04-24 14:32:55 +00:00
|
|
|
yaml = { "yamlfmt" },
|
|
|
|
},
|
|
|
|
|
|
|
|
formatters = {
|
|
|
|
yamlfmt = {
|
|
|
|
prepend_args = {
|
|
|
|
"-formatter",
|
|
|
|
"include_document_start=true,retain_line_breaks=true,retain_line_breaks_single=true,max_line_length=120,scan_folded_as_literal=true",
|
|
|
|
},
|
|
|
|
},
|
2024-04-08 09:26:41 +00:00
|
|
|
},
|
|
|
|
|
2024-04-15 09:32:16 +00:00
|
|
|
format_on_save = {
|
|
|
|
timeout_ms = 500,
|
|
|
|
lsp_fallback = true,
|
|
|
|
},
|
2024-04-08 09:26:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
require("conform").setup(options)
|