30 lines
862 B
Lua
30 lines
862 B
Lua
return {
|
|
"mfussenegger/nvim-lint",
|
|
config = function ()
|
|
local dmypy = require("lint").linters.dmypy
|
|
dmypy.args = {
|
|
"run",
|
|
'--timeout',
|
|
'50000',
|
|
'--',
|
|
'--show-column-numbers',
|
|
'--show-error-end',
|
|
'--hide-error-context',
|
|
'--no-color-output',
|
|
'--no-error-summary',
|
|
'--no-pretty',
|
|
"--use-fine-grained-cache",
|
|
}
|
|
require("lint").linters_by_ft = {
|
|
python = {"dmypy"},
|
|
}
|
|
vim.api.nvim_create_autocmd({ "BufWritePost" }, {
|
|
callback = function()
|
|
-- try_lint without arguments runs the linters defined in `linters_by_ft`
|
|
-- for the current filetype
|
|
require("lint").try_lint()
|
|
end,
|
|
})
|
|
end
|
|
}
|