feat: enable gitleaks linter
This commit is contained in:
parent
dabb828b38
commit
a02689e635
1 changed files with 12 additions and 2 deletions
|
|
@ -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,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue