aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorSteven Arcangeli <506791+stevearc@users.noreply.github.com>2023-09-08 11:57:05 -0700
committerGitHub <noreply@github.com>2023-09-08 11:57:05 -0700
commita72f0fe173ea1506cf0d2bf97007876cb07f3ae4 (patch)
tree2ce7ba9fb405a42e0d7138cf32d2fde69b703eed /scripts
parent1bd3c1bffc6b5cdba83264f3be5bb1d282c13707 (diff)
parent2178a4fe3f16ef4780cc0a6bc45da07cd0f92798 (diff)
Merge pull request #33 from stevearc/stevearc-refactor
New config syntax for "run first" vs "run all"
Diffstat (limited to 'scripts')
-rw-r--r--scripts/options_doc.lua18
1 files changed, 8 insertions, 10 deletions
diff --git a/scripts/options_doc.lua b/scripts/options_doc.lua
index a501e38..1a6921c 100644
--- a/scripts/options_doc.lua
+++ b/scripts/options_doc.lua
@@ -2,16 +2,14 @@ require("conform").setup({
-- Map of filetype to formatters
formatters_by_ft = {
lua = { "stylua" },
- -- Conform will use the first available formatter in the list
- javascript = { "prettierd", "prettier" },
- -- Formatters can also be specified with additional options
- python = {
- formatters = { "isort", "black" },
- -- Run formatters one after another instead of stopping at the first success
- run_all_formatters = true,
- -- Don't run these formatters as part of the format_on_save autocmd (see below)
- format_on_save = false,
- },
+ -- Conform will run multiple formatters sequentially
+ python = { "isort", "black" },
+ -- Use a sub-list to run only the first available formatter
+ javascript = { { "prettierd", "prettier" } },
+ -- Use the "*" filetype to run formatters on all files.
+ -- Note that if you use this, you may want to set lsp_fallback = "always"
+ -- (see :help conform.format)
+ ["*"] = { "trim_whitespace" },
},
-- If this is set, Conform will run the formatter on save.
-- It will pass the table to conform.format().