From 2d37451f023935f2b79b2628e47fab6bb58a7800 Mon Sep 17 00:00:00 2001 From: Holger Preu Date: Mon, 28 Sep 2026 20:40:40 +0200 Subject: [PATCH] added shfmt for shell scripts Format sh/bash files with shfmt via conform and install it through mason-tool-installer. Co-Authored-By: Claude Opus 5.5 --- CLAUDE.md | 3 ++- lua/holger/plugins/formatting.lua | 2 ++ lua/holger/plugins/lsp/mason.lua | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CLAUDE.md b/CLAUDE.md index da58f2c..e59644b 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -29,7 +29,7 @@ Personal Neovim configuration using [lazy.nvim](https://github.com/folke/lazy.nv - `mason.nvim` — installs LSP servers and tools - `mason-lspconfig.nvim` — bridges Mason with nvim-lspconfig; auto-installs: `html`, `cssls`, `lua_ls`, `pyright` -- `mason-tool-installer.nvim` — installs formatters/linters: `prettier`, `stylua`, `isort`, `black`, `pylint` +- `mason-tool-installer.nvim` — installs formatters/linters: `prettier`, `stylua`, `isort`, `black`, `pylint`, `shfmt` - `blink.cmp` (`lua/holger/plugins/blink-cmp.lua`) — sets up LSP capabilities via `vim.lsp.config("*", ...)` (native Neovim LSP API) - `lazydev.nvim` — Lua LSP annotations for Neovim API (`vim.*`) @@ -46,6 +46,7 @@ Personal Neovim configuration using [lazy.nvim](https://github.com/folke/lazy.nv - CSS/HTML/JSON/YAML/Markdown/GraphQL → prettier - Lua → stylua - Python → isort + black + - Shell (sh/bash) → shfmt - **nvim-lint** — lints on BufEnter/BufWritePost/InsertLeave; `l` to trigger manually - Python → pylint diff --git a/lua/holger/plugins/formatting.lua b/lua/holger/plugins/formatting.lua index 261ada0..8609d81 100644 --- a/lua/holger/plugins/formatting.lua +++ b/lua/holger/plugins/formatting.lua @@ -15,6 +15,8 @@ return { liquid = { "prettier" }, lua = { "stylua" }, python = { "isort", "black" }, + sh = { "shfmt" }, + bash = { "shfmt" }, }, format_on_save = { lsp_fallback = true, diff --git a/lua/holger/plugins/lsp/mason.lua b/lua/holger/plugins/lsp/mason.lua index 0874373..313e10e 100644 --- a/lua/holger/plugins/lsp/mason.lua +++ b/lua/holger/plugins/lsp/mason.lua @@ -34,6 +34,7 @@ return { "stylua", -- lua formatter "isort", -- python formatter "black", -- python formatter + "shfmt", -- shell formatter "pylint", }, },