mirror of
https://github.com/aminnairi/dotfiles.git
synced 2026-09-14 15:42:14 +02:00
running the linter on keybind only instead of always
This commit is contained in:
@@ -6,15 +6,19 @@ return {
|
|||||||
event = { "BufReadPre", "BufWritePost" },
|
event = { "BufReadPre", "BufWritePost" },
|
||||||
init = function()
|
init = function()
|
||||||
local lint = require("lint")
|
local lint = require("lint")
|
||||||
|
local whichKey = require("which-key")
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd(
|
whichKey.register({
|
||||||
{ "TextChanged", "TextChangedI", "BufEnter", "BufReadPre", "BufWritePost", "CursorHold", "CursorHoldI" },
|
["<leader>e"] = {
|
||||||
{
|
name = "Errors",
|
||||||
callback = function()
|
f = {
|
||||||
|
function()
|
||||||
lint.try_lint()
|
lint.try_lint()
|
||||||
end,
|
end,
|
||||||
|
"Find linter errors"
|
||||||
}
|
}
|
||||||
)
|
}
|
||||||
|
})
|
||||||
end,
|
end,
|
||||||
config = function()
|
config = function()
|
||||||
local lint = require("lint")
|
local lint = require("lint")
|
||||||
|
|||||||
Reference in New Issue
Block a user