From c954aedcf7bb4b743e72dfe07f84f7ad8f110086 Mon Sep 17 00:00:00 2001 From: Spencer Gilbert Date: Wed, 16 Sep 2026 13:31:22 -0400 Subject: [PATCH] [nvim] Format shell files with shfmt shfmt was installed via the project's mise config but never wired into conform, and the empty `formatters_by_ft` left `f` on a shell file falling back to bashls, which does not format. - Map both `sh` and `bash` to shfmt (Neovim assigns ft=bash to .bashrc-style files); shfmt infers the dialect from the filename it is passed - Autoformat on save stays opt-in via `format_on_save` --- nvim/init.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nvim/init.lua b/nvim/init.lua index 009cd21..ec78f40 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -764,6 +764,8 @@ do }, -- You can also specify external formatters in here. formatters_by_ft = { + sh = { 'shfmt' }, + bash = { 'shfmt' }, -- rust = { 'rustfmt' }, -- Conform can also run multiple formatters sequentially -- python = { "isort", "black" }, -- 2.51.2