4 { "mfussenegger/nvim-lint",
7 -- Event to trigger linters
8 events = { "BufWritePost", "BufReadPost", "InsertLeave" },
10 -- NOTE: LazyVim had an extension to support global and fallback linters,
11 -- and conditionally enable a linter
13 config = function(_, opts)
14 function M.debounce(ms, fn)
15 local timer = vim.uv.new_timer()
18 timer:start(ms, 0, function()
20 vim.schedule_wrap(fn)(unpack(argv))
25 local lint = require('lint')
29 vim.api.nvim_create_autocmd(opts.events, {
30 group = vim.api.nvim_create_augroup("nvim-lint", { clear = true }),
31 callback = M.debounce(100, M.lint),