Handle shellcheck cleanly in vim

This commit is contained in:
2026-07-10 16:26:09 -07:00
parent c6c51c81ef
commit ad9a5072d3
2 changed files with 7 additions and 1 deletions
+6 -1
View File
@@ -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()
+1
View File
@@ -10,6 +10,7 @@ zsh
npm
tree-sitter-cli
ripgrep
shellcheck
# Useless stuff
fortune-mod