aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/options_doc.lua
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/options_doc.lua')
-rw-r--r--scripts/options_doc.lua10
1 files changed, 9 insertions, 1 deletions
diff --git a/scripts/options_doc.lua b/scripts/options_doc.lua
index 6f850ef..72acca4 100644
--- a/scripts/options_doc.lua
+++ b/scripts/options_doc.lua
@@ -3,9 +3,17 @@ require("conform").setup({
formatters_by_ft = {
lua = { "stylua" },
-- Conform will run multiple formatters sequentially
- python = { "isort", "black" },
+ go = { "goimports", "gofmt" },
-- Use a sub-list to run only the first available formatter
javascript = { { "prettierd", "prettier" } },
+ -- You can use a function here to determine the formatters dynamically
+ python = function(bufnr)
+ if require("conform").get_formatter_info("ruff_format", bufnr).available then
+ return { "ruff_format" }
+ else
+ return { "isort", "black" }
+ end
+ end,
-- Use the "*" filetype to run formatters on all filetypes.
["*"] = { "codespell" },
-- Use the "_" filetype to run formatters on filetypes that don't