30 lines
587 B
Lua
30 lines
587 B
Lua
local conform = require("conform")
|
|
|
|
local options = {
|
|
formatters_by_ft = {
|
|
lua = { "stylua" },
|
|
css = { "prettier" },
|
|
html = { "prettier" },
|
|
|
|
javascript = { "prettier" },
|
|
javascriptreact = { "prettier" },
|
|
typescript = { "prettier" },
|
|
typescriptreact = { "prettier" },
|
|
json = { "prettier" },
|
|
|
|
-- Add C++ formatters
|
|
cpp = { "clang-format" },
|
|
c = { "clang-format" },
|
|
python = { "black", "isort" },
|
|
cs = { "csharpier" },
|
|
},
|
|
|
|
format_on_save = {
|
|
-- These options will be passed to conform.format()
|
|
timeout_ms = 500,
|
|
lsp_fallback = true,
|
|
},
|
|
}
|
|
|
|
return options
|