From f4b53881cce87cb3dc7357bf688dd9238e350545 Mon Sep 17 00:00:00 2001 From: Temporary vm Date: Sat, 6 Dec 2025 19:26:16 +0200 Subject: [PATCH] Adds shfmt as formatter for sh and forces 2 space intend with switch_case_indent and binary_next_line options. --- init.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/init.lua b/init.lua index 3ec459a8..7dcc165c 100644 --- a/init.lua +++ b/init.lua @@ -760,12 +760,18 @@ require('lazy').setup({ json = { 'prettierd' }, css = { 'prettierd' }, yaml = { 'prettierd' }, + sh = { 'shfmt' }, -- Conform can also run multiple formatters sequentially -- python = { "isort", "black" }, -- -- You can use 'stop_after_first' to run the first available formatter from the list -- javascript = { "prettierd", "prettier", stop_after_first = true }, }, + formatters = { + shfmt = { + prepend_args = { '-i', '2', '-ci', '-bn' }, + }, + }, }, },