zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
49.68k stars 3.05k forks source link

Git in-line blame indicators #4793

Closed krstp closed 7 months ago

krstp commented 1 year ago

Check for existing issues

Describe the feature

Feature request for in-line git blame indicators upon cursor placement

If applicable, add mockups / screenshots to help present your vision of the feature

commit-msg

cktang88 commented 1 year ago

I'd also like to show Git code authorship at top of file, same as https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens#git-codelens

image
vuon9 commented 9 months ago

https://marketplace.visualstudio.com/items?itemName=waderyan.gitblame

I like using the Git Blame extension more than the way GitLens does it.

deadmeu commented 8 months ago

I wanted to chime in and say that I would really appreciate this to be a native feature built into the editor itself as part of its git integration suite. I feel like inline annotations should be a core feature of any modern editor with good git integration due to the popularity of the feature in other editors.

I find that, in other editors with extensions providing this feature, the extensions become extremely popular and, after some time, become heavily commercialised and bloated with unnecessary features. They may also not implement the feature properly, causing issues with git blame options such as the blame.ignoreRevsFile config option. Having a native, built-in implementation would allow these sorts of errors and oversights to be more effectively noticed and resolved.

slingercode commented 8 months ago

I wanted to chime in and say that I would really appreciate this to be a native feature built into the editor itself as part of its git integration suite. I feel like inline annotations should be a core feature of any modern editor with good git integration due to the popularity of the feature in other editors.

I find that, in other editors with extensions providing this feature, the extensions become extremely popular and, after some time, become heavily commercialised and bloated with unnecessary features. They may also not implement the feature properly, causing issues with git blame options such as the blame.ignoreRevsFile config option. Having a native, built-in implementation would allow these sorts of errors and oversights to be more effectively noticed and resolved.

I second this. Having this feature as a native implementation would be so much better that having all the suite of GitLens in VSCode

Edit

Also as a response for @vuon9 it would be great if this could be configurable. I'm more of in line style but having the two options (in line and status bar) it's a 10/10

westonkd commented 7 months ago

Sharing in case it's helpful to anyone:

Until Zed supports this feature I'm defining a Zed task to get (fairly) quick access to the blame around my current position in a file:

.config/zed/tasks.json

[
  {
    "label": "Blame Around Line",
    "command": "git blame $ZED_FILE -L $(($ZED_ROW - 5)),$(($ZED_ROW + 5))"
  }
]

It's then fairly easy to run task: spawn -> Blame Around Line

mrnugget commented 7 months ago

Now merged: #10398

deadmeu commented 7 months ago

Now merged: #10398

Wow, that looks fantastic! Thank you so much for working on this. This is such a great feature to be included by default! :heart_eyes:

JosephTLyons commented 7 months ago

If you run into any bugs or want to suggest enhancements around inline git blame, please open new issues!