mirror of
https://github.com/aminnairi/dotfiles.git
synced 2026-09-14 19:12:13 +02:00
now linting the files on buffer writes
This commit is contained in:
@@ -6,18 +6,11 @@ return {
|
|||||||
event = { "BufReadPre", "BufWritePost" },
|
event = { "BufReadPre", "BufWritePost" },
|
||||||
init = function()
|
init = function()
|
||||||
local lint = require("lint")
|
local lint = require("lint")
|
||||||
local whichKey = require("which-key")
|
|
||||||
|
|
||||||
whichKey.register({
|
vim.api.nvim_create_autocmd({ "BufWritePost" }, {
|
||||||
["<leader>e"] = {
|
callback = function()
|
||||||
name = "Errors",
|
|
||||||
f = {
|
|
||||||
function()
|
|
||||||
lint.try_lint()
|
lint.try_lint()
|
||||||
end,
|
end
|
||||||
"Find linter errors"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
config = function()
|
config = function()
|
||||||
|
|||||||
Reference in New Issue
Block a user