update lsp diagnostics to use internal functions
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
return {
|
||||
"mfussenegger/nvim-lint",
|
||||
config = function()
|
||||
require("lint").linters_by_ft = {
|
||||
local lint = require("lint")
|
||||
lint.linters_by_ft = {
|
||||
markdown = { "markdownlint" },
|
||||
lua = { "luacheck" },
|
||||
py = { "flake8", "pylint", "pydocstyle", "pycodestyle", "mypy" },
|
||||
@@ -20,5 +21,14 @@ return {
|
||||
"-e",
|
||||
"2250",
|
||||
}
|
||||
local lint_augroup = vim.api.nvim_create_augroup("lint", { clear = true })
|
||||
|
||||
vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost", "InsertLeave" }, {
|
||||
group = lint_augroup,
|
||||
callback = function()
|
||||
lint.try_lint()
|
||||
end,
|
||||
})
|
||||
end,
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user