From a02689e635c6c76a00386038e7ee9635dd3cf1f7 Mon Sep 17 00:00:00 2001 From: Oliver Ladner Date: Tue, 16 Dec 2025 11:00:09 +0100 Subject: [PATCH] feat: enable gitleaks linter --- lua/weeheavy/plugins/lsp/nvim-lint.lua | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/lua/weeheavy/plugins/lsp/nvim-lint.lua b/lua/weeheavy/plugins/lsp/nvim-lint.lua index 10ce856..bf43ac6 100644 --- a/lua/weeheavy/plugins/lsp/nvim-lint.lua +++ b/lua/weeheavy/plugins/lsp/nvim-lint.lua @@ -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", "l", function() - lint.try_lint() + lint.try_lint() -- linters_by_ft + lint.try_lint("gitleaks") -- on all ft end, { desc = "Lint current file" }) end, }