now linting the files on buffer writes

This commit is contained in:
aminnairi
2023-12-10 19:54:27 +01:00
parent 8ba16d7065
commit 955cf2a0a6
+3 -10
View File
@@ -6,18 +6,11 @@ return {
event = { "BufReadPre", "BufWritePost" },
init = function()
local lint = require("lint")
local whichKey = require("which-key")
whichKey.register({
["<leader>e"] = {
name = "Errors",
f = {
function()
vim.api.nvim_create_autocmd({ "BufWritePost" }, {
callback = function()
lint.try_lint()
end,
"Find linter errors"
}
}
end
})
end,
config = function()