24 lines
567 B
Lua
24 lines
567 B
Lua
-- ================ LINTER ================
|
|
local lint = require("lint")
|
|
|
|
require('lint').linters.your_linter_name = {
|
|
ignore_exitcode = true, -- set this to true if the linter exits with a code != 0 and that's considered normal.
|
|
}
|
|
|
|
lint.linters_by_ft = {
|
|
python = {
|
|
"pylint",
|
|
"flake8",
|
|
"ruff",
|
|
},
|
|
}
|
|
|
|
vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost", "InsertLeave" }, {
|
|
group = lint_augroup,
|
|
callback = function()
|
|
lint.try_lint()
|
|
end,
|
|
})
|
|
|
|
vim.keymap.set("n", "<Space>j", "<cmd>lua vim.diagnostic.open_float()<cr>")
|