Justify guarding try_lint in readonly buffers

Co-authored-by: Robin Gruyters <2082795+rgruyters@users.noreply.github.com>
This commit is contained in:
Éric NICOLAS (ccjmne)
2024-10-21 16:04:26 +02:00
parent 01ab2a4543
commit ad4466d544

View File

@@ -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