From 3fa066dbc0a09905f7980dfcf9d42b9b23b59998 Mon Sep 17 00:00:00 2001 From: probalazs Date: Mon, 20 Apr 2026 14:36:20 +0200 Subject: [PATCH] Skip linters that are not installed on the system Co-Authored-By: Claude Sonnet 4.6 --- lua/kickstart/plugins/lint.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lua/kickstart/plugins/lint.lua b/lua/kickstart/plugins/lint.lua index 14d97802..91c5c987 100644 --- a/lua/kickstart/plugins/lint.lua +++ b/lua/kickstart/plugins/lint.lua @@ -56,7 +56,11 @@ return { -- Only run the linter in buffers that you can modify in order to -- avoid superfluous noise, notably within the handy LSP pop-ups that -- describe the hovered symbol using Markdown. - if vim.bo.modifiable then lint.try_lint() end + if vim.bo.modifiable then + local linters = lint.linters_by_ft[vim.bo.filetype] or {} + local available = vim.tbl_filter(function(l) return vim.fn.executable(lint.linters[l] and lint.linters[l].cmd or l) == 1 end, linters) + if #available > 0 then lint.try_lint(available) end + end end, }) end,