From ad4466d54498e2aca631117dcdb0ac6b936429c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20NICOLAS=20=28ccjmne=29?= Date: Mon, 21 Oct 2024 16:04:26 +0200 Subject: [PATCH] Justify guarding try_lint in readonly buffers Co-authored-by: Robin Gruyters <2082795+rgruyters@users.noreply.github.com> --- lua/kickstart/plugins/lint.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/kickstart/plugins/lint.lua b/lua/kickstart/plugins/lint.lua index 4fc6282f..907c6bf3 100644 --- a/lua/kickstart/plugins/lint.lua +++ b/lua/kickstart/plugins/lint.lua @@ -47,6 +47,9 @@ return { vim.api.nvim_create_autocmd({ 'BufEnter', 'BufWritePost', 'InsertLeave' }, { group = lint_augroup, callback = function() + -- 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.opt_local.modifiable:get() then lint.try_lint() end