~gpanders/dotfiles

ref: f9dc228895c7645f62bd304ad256035d46630887 dotfiles/.config/nvim/plugin/lint.vim -rw-r--r-- 406 bytes
f9dc2288Gregory Anders nvim: replace ale with nvim-lint 3 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
function! s:load()
lua <<
local ok, lint = pcall(require, "lint")
if not ok then
    return
end

lint.linters_by_ft = {
    ["sh"] = { "shellcheck" },
    ["vim"] = { "vint" },
    ["lua"] = { "luacheck" },
    ["nix"] = { "nix" },
}

vim.cmd("autocmd! lint BufWritePost * lua require('lint').try_lint()")
.
endfunction

augroup lint
    autocmd!
    autocmd BufWritePre * ++once call s:load()
augroup END