feat: nvim-lint

This commit is contained in:
punkfairie 2024-12-15 12:57:27 -08:00
parent 7393fc696a
commit 9e9c99b5bd
Signed by: punkfairie
GPG key ID: A509E8F77FB9D696
3 changed files with 29 additions and 0 deletions

View file

@ -63,6 +63,9 @@ with final.pkgs.lib; let
# Formatting # Formatting
conform-nvim conform-nvim
# Linting
nvim-lint
# Treesitter # Treesitter
nvim-treesitter-textobjects nvim-treesitter-textobjects
nvim-ts-autotag nvim-ts-autotag

View file

@ -0,0 +1,5 @@
local req = MarleyVim.local_require('plugins.linting')
return {
req('nvim-lint'),
}

View file

@ -0,0 +1,21 @@
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,
}