From 80698baf41cb2c6412b8ae0f2ac6acf81e5592dc Mon Sep 17 00:00:00 2001 From: Steve Beaulac Date: Wed, 5 Aug 2026 18:22:34 -0400 Subject: [PATCH] refactor(nvim): update conform formatters and enable format-on-save Reorder rust formatters (rustfmt primary), switch python from isort/black to ruff/dprint, and enable format_on_save with lsp_fallback. --- config/nvim/plugin/conform.lua | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/config/nvim/plugin/conform.lua b/config/nvim/plugin/conform.lua index 8a42360..3be65f9 100644 --- a/config/nvim/plugin/conform.lua +++ b/config/nvim/plugin/conform.lua @@ -21,9 +21,9 @@ conform.setup({ cpp = { "clang_format" }, lua = { 'stylua' }, go = { "goimports", "gofmt" }, - rust = { "dprint", "rustfmt", lsp_format = "fallback" }, - python = { "isort", "black", stop_after_first = true }, - javascript = { "dprint", "prettier", stop_after_first = true }, + rust = { "rustfmt", "dprint", lsp_format = "fallback" }, + python = { "ruff", "dprint", stop_after_first = true }, + javascript = { "dprint", "prettier", stop_after_first = true }, markdown = { "dprint", "prettier", stop_after_first = true }, javascriptreact = { "dprint", "prettier", stop_after_first = true }, typescript = { "dprint", "prettier", stop_after_first = true }, @@ -31,12 +31,13 @@ conform.setup({ svelte = { "dprint", "prettier", stop_after_first = true }, html = { "dprint", "prettier", stop_after_first = true }, }, + format_on_save = { + lsp_fallback = true, + }, }) vim.keymap.set({ 'n', 'v' }, 'bf', -function() - conform.format { async = true, lsp_format = 'fallback' } -end, -{ desc = 'Format buffer' }) - - + function() + conform.format { async = true } + end, + { desc = 'Format buffer' })