mirror of
https://github.com/aminnairi/dotfiles.git
synced 2026-11-13 12:19:09 +01:00
now linting the files on buffer writes
This commit is contained in:
1 parent
8ba16d7065
commit
955cf2a0a6
1 file changed
+4
-11
@@ -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()
|
||||
lint.try_lint()
|
||||
end,
|
||||
"Find linter errors"
|
||||
}
|
||||
}
|
||||
vim.api.nvim_create_autocmd({ "BufWritePost" }, {
|
||||
callback = function()
|
||||
lint.try_lint()
|
||||
end
|
||||
})
|
||||
end,
|
||||
config = function()
|
||||
|
||||
Reference in new issue
Block a user