From 0db858075b4d8214a34a6836d994e2100fed51bf Mon Sep 17 00:00:00 2001 From: Steven Arcangeli Date: Fri, 8 Sep 2023 09:13:06 -0700 Subject: doc: document the "*" filetype option --- README.md | 4 ++++ doc/conform.txt | 4 ++++ scripts/options_doc.lua | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/README.md b/README.md index 66b50dc..72514ef 100644 --- a/README.md +++ b/README.md @@ -214,6 +214,10 @@ require("conform").setup({ 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(). diff --git a/doc/conform.txt b/doc/conform.txt index 66754a6..fada19a 100644 --- a/doc/conform.txt +++ b/doc/conform.txt @@ -20,6 +20,10 @@ 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. + -- 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(). diff --git a/scripts/options_doc.lua b/scripts/options_doc.lua index 47eccd9..1a6921c 100644 --- a/scripts/options_doc.lua +++ b/scripts/options_doc.lua @@ -6,6 +6,10 @@ require("conform").setup({ 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(). -- cgit v1.2.3-70-g09d2