diff options
| author | Thomas Vanbesien <tvanbesi@proton.me> | 2026-05-22 11:02:52 +0200 |
|---|---|---|
| committer | Thomas Vanbesien <tvanbesi@proton.me> | 2026-05-22 11:02:52 +0200 |
| commit | 8fdd821d9bb987e374bf051c62df6f07c4b787ff (patch) | |
| tree | e6f7077c1d2fb63232a1bd64f19606a418af8c22 /plugin/50-git.lua | |
| parent | ac87610c0cf8b76094aae3695194e0ceca74c07b (diff) | |
| download | nvim-config-8fdd821d9bb987e374bf051c62df6f07c4b787ff.tar.gz nvim-config-8fdd821d9bb987e374bf051c62df6f07c4b787ff.zip | |
misc(nvim): GitBlame shows SHA1 and has better matching logic
Diffstat (limited to 'plugin/50-git.lua')
| -rw-r--r-- | plugin/50-git.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/plugin/50-git.lua b/plugin/50-git.lua index 8a8a634..609ab93 100644 --- a/plugin/50-git.lua +++ b/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) |
