aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/options_doc.lua
diff options
context:
space:
mode:
authorSteven Arcangeli <506791+stevearc@users.noreply.github.com>2024-03-15 08:56:03 -0700
committerGitHub <noreply@github.com>2024-03-15 08:56:03 -0700
commitb05962622d3eebeefe6b1a90deb9eb86947e0349 (patch)
tree1da4f07fcc096c0071e08f3e5dd90e7b2c6394b4 /scripts/options_doc.lua
parenta605ce4b2db397c84ae6fa8bcfc85f00b985bc73 (diff)
feat: add formatter config option to change name of temporary file (#332)
Diffstat (limited to 'scripts/options_doc.lua')
-rw-r--r--scripts/options_doc.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/options_doc.lua b/scripts/options_doc.lua
index 4b1687e..96c0f2b 100644
--- a/scripts/options_doc.lua
+++ b/scripts/options_doc.lua
@@ -59,6 +59,8 @@ require("conform").setup({
cwd = require("conform.util").root_file({ ".editorconfig", "package.json" }),
-- When cwd is not found, don't run the formatter (default false)
require_cwd = true,
+ -- When stdin=false, use this template to generate the temporary file that gets formatted
+ tmpfile_format = ".conform.$RANDOM.$FILENAME",
-- When returns false, the formatter will not be used
condition = function(ctx)
return vim.fs.basename(ctx.filename) ~= "README.md"