From fcc77a343ff2d76cab837e5af60e555753ddf75f Mon Sep 17 00:00:00 2001 From: Thomas Vanbesien Date: Fri, 22 May 2026 11:02:52 +0200 Subject: misc(nvim): GitBlame shows SHA1 and has better matching logic --- .config/nvim/plugin/50-git.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.config/nvim/plugin/50-git.lua b/.config/nvim/plugin/50-git.lua index 8a8a634..609ab93 100644 --- a/.config/nvim/plugin/50-git.lua +++ b/.config/nvim/plugin/50-git.lua @@ -15,7 +15,12 @@ local function git_blame(file, line) local sys = vim.system({ "bash", "-c", - string.format('grep -E "^author |^summary " <(git blame -L %d,%d --porcelain -- %s)', line, line, file), + string.format( + 'grep -E --only-matching "^author .*$|^summary .*$|^[[:xdigit:]]{40}" <(git blame -L %d,%d --porcelain -- %s)', + line, + line, + file + ), }):wait() if sys.stdout then vim.notify(sys.stdout, vim.log.levels.INFO) -- cgit v1.3.1