(import-macros {: ag!
                : au!} :nvrc.macro.event)
(local nvim-lint (require :lint))

(table.insert nvim-lint.linters.codespell.args :--builtin=clear)
(tset nvim-lint :linters_by_ft {:nix [:nix]})

(ag! nvim-lint
     (au! [BufEnter BufWritePost InsertLeave] * (do
          (nvim-lint.try_lint)
          ; linters that will run on any filetype
          (nvim-lint.try_lint [:codespell]))))