You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-- Setup Conform formatterrequire("conform").setup({
formatters_by_ft= {
-- Set specific formatters per languagelua= { "stylua" },
python= { "ruff_format", "ruff_organize_imports" },
javascript= { "prettier" },
typescript= { "prettier" },
solidity= { "forge_fmt" },
-- Use LSP formatting if no specific formatters configureddefault_format_opts= {
lsp_format="fallback",
},
-- Trim whitespace if no other formatters configured,-- and no LSP formatters found
["_"] = { "trim_whitespace" },
},
format_on_save= {
timeout_ms=500,
},
})
Can't get my head around how could I set to trigger trim_whitespace only if theres no formatter configured and no LSP formatter is available. So that the priority list works in the following order:
Hi, heres my current config:
Can't get my head around how could I set to trigger
trim_whitespace
only if theres no formatter configured and no LSP formatter is available. So that the priority list works in the following order:configured formatter -> lsp formatter -> trim_whitespace
Many thanks!
The text was updated successfully, but these errors were encountered: