-
In VS code, I used to have git lens for git blame for a specific line, is there a way to get git blame for a specific line in the current implementation of helix? or a convenient workaround? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 4 replies
-
Currently, it is not possible. But a workaround could be possible using this PR #3393 when it includes a variable like We could build a script with a keybinding to show the result of the script in a popup like:
|
Beta Was this translation helpful? Give feedback.
-
The PR @danillos referenced was closed, and #12527 merged instead. This allows a similar solution but with slightly different syntax. There's a few suggestions starting at #3035 (comment). Combining the ideas of @danillos, @DoctorRyner, and @rockboynton, this is my current binding: B = ":sh git log -n 5 --format='format:%%h (%%an: %%ar) %%s' --no-patch -L%{cursor_line},+1:%{buffer_name}" Note that |
Beta Was this translation helpful? Give feedback.
-
I wrote (with claude) a bash script that extracts the author, time, message and commit url (it gets the PR url instead if the PR number is present in the commit message). By default the script produces the information below, but if you pass Add this Then pass the following to your helix config: [keys.normal.space]
B = ":sh blame %{buffer_name} %{cursor_line}" # Show blame information
U = ":sh blame --url-only %{cursor_line} %{buffer_name} | xargs -I{} xdg-open {}" # Open PR or commit url in browser |
Beta Was this translation helpful? Give feedback.
-
There is now an easier way if you build #13133 Use |
Beta Was this translation helpful? Give feedback.
Currently, it is not possible.
But a workaround could be possible using this PR #3393 when it includes a variable like
%val{linenumber}
.We could build a script with a keybinding to show the result of the script in a popup like: