fix(vim): lint files when we open buffers

Currently they are only getting saved when you save buffers. I was
missing errors when jumping around because the files do not get saved.

This will now show me the errors when the buffer opens not only when the
buffer is saved and I get to see linting errors when jumping around a
codebase.
This commit is contained in:
Ade Attwood 2022-07-25 19:44:14 +01:00
parent b97ece9419
commit ec470f93db

View file

@ -64,8 +64,8 @@ noremap <leader>; gcc
" Lint code with nvim-lint on save. This will lint all filetypes with cspell
" and then any other filetypes will be linted per the config.
au BufWritePost <buffer> lua require('lint').try_lint('cspell')
au BufWritePost <buffer> lua require('lint').try_lint()
au BufWritePost,BufReadPost <buffer> lua require('lint').try_lint('cspell')
au BufWritePost,BufReadPost <buffer> lua require('lint').try_lint()
inoremap jj <esc>:w<cr>