running the linter on keybind only instead of always

This commit is contained in:
aminnairi
2023-12-06 04:49:10 +01:00
parent 586fcd2c1d
commit 6e1cdbc1d4
+9 -5
View File
@@ -6,15 +6,19 @@ return {
event = { "BufReadPre", "BufWritePost" },
init = function()
local lint = require("lint")
local whichKey = require("which-key")
vim.api.nvim_create_autocmd(
{ "TextChanged", "TextChangedI", "BufEnter", "BufReadPre", "BufWritePost", "CursorHold", "CursorHoldI" },
{
callback = function()
whichKey.register({
["<leader>e"] = {
name = "Errors",
f = {
function()
lint.try_lint()
end,
"Find linter errors"
}
)
}
})
end,
config = function()
local lint = require("lint")