feat: enable gitleaks linter

This commit is contained in:
Oliver Ladner 2025-12-16 11:00:09 +01:00
commit a02689e635

View file

@ -17,6 +17,14 @@ return {
end,
},
},
gitleaks = {
args = {
"--stdin",
function()
return vim.api.nvim_buf_get_name(0)
end,
},
},
},
},
config = function()
@ -42,12 +50,14 @@ return {
vim.api.nvim_create_autocmd({ "BufEnter", "BufReadPost", "BufWritePost", "InsertLeave" }, {
group = lint_augroup,
callback = function()
lint.try_lint()
lint.try_lint() -- linters_by_ft
lint.try_lint("gitleaks") -- on all ft
end,
})
vim.keymap.set("n", "<leader>l", function()
lint.try_lint()
lint.try_lint() -- linters_by_ft
lint.try_lint("gitleaks") -- on all ft
end, { desc = "Lint current file" })
end,
}