chore: add lsp fallback to some formatters

This commit is contained in:
Youwen Wu 2024-11-19 16:03:35 -08:00
parent 70276615e1
commit 5896233234
Signed by: youwen5
GPG key ID: 865658ED1FE61EC3

View file

@ -51,7 +51,7 @@ return {
formatters_by_ft = { formatters_by_ft = {
lua = { "stylua" }, lua = { "stylua" },
python = { "black" }, python = { "black" },
rust = { "rustfmt" }, rust = { "rustfmt", lsp_format = "fallback" },
javascript = { "prettierd", "prettier", stop_after_first = true }, javascript = { "prettierd", "prettier", stop_after_first = true },
typescript = { "prettierd", "prettier", stop_after_first = true }, typescript = { "prettierd", "prettier", stop_after_first = true },
typescriptreact = { "prettierd", "prettier", stop_after_first = true }, typescriptreact = { "prettierd", "prettier", stop_after_first = true },
@ -63,7 +63,7 @@ return {
toml = { "taplo", stop_after_first = true }, toml = { "taplo", stop_after_first = true },
yaml = { "prettierd", "prettier", stop_after_first = true }, yaml = { "prettierd", "prettier", stop_after_first = true },
typst = { "typstyle" }, typst = { "typstyle" },
svelte = { "prettier" }, svelte = { "prettier", lsp_format = "fallback" },
tex = { "latexindent" }, tex = { "latexindent" },
cpp = { "clang-format", lsp_format = "fallback" }, cpp = { "clang-format", lsp_format = "fallback" },
c = { "clang-format", lsp_format = "fallback" }, c = { "clang-format", lsp_format = "fallback" },