Skip to content

Commit

Permalink
chore: disable linting autocmd for readonly buffers
Browse files Browse the repository at this point in the history
  • Loading branch information
nickgnd committed Oct 23, 2024
1 parent f719f0b commit 37f17ce
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lua/kickstart/plugins/lint.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,12 @@ return {
vim.api.nvim_create_autocmd({ 'BufEnter', 'BufWritePost', 'InsertLeave' }, {
group = lint_augroup,
callback = function()
lint.try_lint()
-- 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
end,
})
end,
Expand Down

0 comments on commit 37f17ce

Please sign in to comment.