diff --git a/config/nvim/lua/plugins/format.lua b/config/nvim/lua/plugins/format.lua index 4a9a888..44338cb 100644 --- a/config/nvim/lua/plugins/format.lua +++ b/config/nvim/lua/plugins/format.lua @@ -37,9 +37,14 @@ return { javascriptreact = { "eslint_d" }, typescriptreact = { "eslint_d" }, svelte = { "eslint_d" }, - sh = { "shellcheck" }, } + if vim.fn.executable("shellcheck") == 1 then + require("lint").linters_by_ft.sh = { "shellcheck" } + else + vim.notify("shellcheck not found: skipping shell linting", vim.log.levels.WARN) + end + vim.api.nvim_create_autocmd({ "BufWritePost", "BufReadPost", "InsertLeave" }, { callback = function() require("lint").try_lint() diff --git a/packages/apt.global b/packages/apt.global index d00f1e7..fd493cf 100644 --- a/packages/apt.global +++ b/packages/apt.global @@ -10,6 +10,7 @@ zsh npm tree-sitter-cli ripgrep +shellcheck # Useless stuff fortune-mod