blob: 040bcc4648a6da5262f480ea97a2d8bdfdab4fa1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
;; Linting
(import-macros {: autocmd} :macros)
(λ callback []
(let [lint (require :lint)]
(lint.try_lint)))
(λ init []
(let [lint-augroup (vim.api.nvim_create_augroup :lint {:clear true})]
(autocmd [:BufEnter :BufWritePost :InsertLeave :TextChangedI]
{:group lint-augroup : callback})))
(λ config []
(let [lint (require :lint)]
(set lint.linters_by_ft {:* [:codespell]
:dockerfile [:hadolint]
:fennel [:fennel]
:gitcommit [:gitlint :codespell]
:haskell [:hlint]
:json [:jsonlint]
:lua [:selene]
:python [:ruff]
:sh [:shellcheck]
:yaml [:yamllint]
:zsh [:zsh]})))
{1 :mfussenegger/nvim-lint : init : config :event :BufNew}
|