From a589750635fcc5bb52c7e572cd853446c2c63855 Mon Sep 17 00:00:00 2001 From: Steven Arcangeli Date: Fri, 15 Sep 2023 21:02:54 -0700 Subject: feat: '_' filetype to define fallback formatters --- doc/conform.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'doc/conform.txt') diff --git a/doc/conform.txt b/doc/conform.txt index 1787f2c..bb3d90d 100644 --- a/doc/conform.txt +++ b/doc/conform.txt @@ -20,10 +20,14 @@ OPTIONS *conform-option 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. + -- Use the "*" filetype to run formatters on all filetypes. -- Note that if you use this, you may want to set lsp_fallback = "always" -- (see :help conform.format) - ["*"] = { "trim_whitespace" }, + ["*"] = { "codespell" }, + -- Use the "_" filetype to run formatters on all filetypes + -- that don't have other formatters configured. Again, you may want to + -- set lsp_fallback = "always" when using this value. + ["_"] = { "trim_whitespace" }, }, -- If this is set, Conform will run the formatter on save. -- It will pass the table to conform.format(). -- cgit v1.2.3-70-g09d2