marleyvim/nvim/lua/plugins/linting/nvim-lint.lua
2024-12-15 12:57:27 -08:00

21 lines
473 B
Lua

return {
'nvim-lint',
event = { 'BufReadPost', 'BufWritePost', 'BufNewFile' },
after = function()
local lint = require('lint')
lint.linters_by_ft = {
fish = { 'fish' },
}
vim.api.nvim_create_autocmd(
{ 'BufWritePost', 'BufReadPost', 'InsertLeave' },
{
group = vim.api.nvim_create_augroup('nvim-lint', { clear = true }),
callback = function()
require('lint').try_lint()
end,
}
)
end,
}