dotfiles/.config/nvim/lua/plugins/lint.lua

26 lines
472 B
Lua
Raw Normal View History

2024-08-07 05:36:20 +00:00
return {
"mfussenegger/nvim-lint",
2024-11-06 20:46:00 +00:00
opts = {
linters_by_ft = {
-- ruby = { "rubocop", "standardrb" },
ruby = { "standardrb" },
go = { "golangcilint" },
},
},
2024-10-13 23:52:29 +00:00
config = function()
2024-11-06 20:46:00 +00:00
local lint = require("lint")
lint.linters_by_ft = {
-- ruby = { "rubocop", "standardrb" },
ruby = { "standardrb" },
go = { "golangcilint" },
2024-10-13 23:52:29 +00:00
}
vim.api.nvim_create_autocmd({ "BufWritePost" }, {
callback = function()
2024-11-06 20:46:00 +00:00
lint.try_lint()
2024-10-13 23:52:29 +00:00
end,
})
end,
2024-08-07 05:36:20 +00:00
}