Repository navigation
Inline git blame - #10398
Inline git blame#10398
Conversation
|
Great stuff. I don't want to disrupt anything you have going on here, but just posting a couple things I wonder about for the future:
|
|
Thanks, David!
Yeah, that's a great idea, and we talked about it before: a push-to-talk kinda thing where you hold a key combination down and while it's down it shows the inline blame or something like that. But before we do that, maybe we need global setting and a toggle keybinding, yeah. |
This introduces a new API on `StatefulInteractiveElement` to create a tooltip that can be hovered, scrolled inside, and clicked: `.hoverable_tooltip`. Right now we only use it in the `git blame` gutter, but the plan is to use the new hover/click/scroll behavior in #10398 to introduce new git-blame-tooltips. Release Notes: - N/A --------- Co-authored-by: Antonio <antonio@zed.dev>
fe62802 to
a1fd6eb
Compare
428d6a9 to
bfb82b5
Compare
|
This is cool, but is there a way to display it in the bottom toolbar (like VSCode). I pretty much never want to see it in the code itself. |
|
No, there isn't right now. |
|
All good, just wondering. I'd also be happy with the toggle hotkey baldwindavid mentioned above, so I'll throw a +1 behind that. As it is, it's too distracting so I just have it disabled. But I often want to know who wrote a function if I have questions about it, so it'd be super helpful to have a way to get this information on-demand. |
|
@Tenkir you're probably aware but, if not, a bit of a workaround is to use the {
"context": "Editor && VimControl && !VimWaiting && !menu",
"bindings": {
"space g l": "editor::ToggleGitBlame"
}
} |
|
Hey! what is the relevant styling config for this feature? In my editor it shows up as super white, but I can't narrow down which config would change it |
|
@jay-herrera it's using {
"experimental.theme_overrides": {
"hint": "#fb4a35ff"
}
} |
|
@mrnugget, is there a keymap action that can be mapped to display the tooltip that appears when an inline blame message is hovered? I want to be able to see the pop-up without having to move my mouse cursor. |
…0466) This introduces a new API on `StatefulInteractiveElement` to create a tooltip that can be hovered, scrolled inside, and clicked: `.hoverable_tooltip`. Right now we only use it in the `git blame` gutter, but the plan is to use the new hover/click/scroll behavior in zed-industries#10398 to introduce new git-blame-tooltips. Release Notes: - N/A --------- Co-authored-by: Antonio <antonio@zed.dev>
This adds so-called "inline git blame" to the editor that, when turned on, shows `git blame` information about the current line inline:  When the inline information is hovered, a new tooltip appears that contains more information on the current commit:  The commit message in this tooltip is rendered as Markdown, is scrollable and clickable. The tooltip is now also the tooltip used in the gutter:  ## Settings 1. The inline git blame information can be turned on and off via settings: ```json { "git": { "inline_blame": { "enabled": true } } } ``` 2. Optionally, a delay can be configured. When a delay is set, the inline blame information will only show up `x milliseconds` after a cursor movement: ```json { "git": { "inline_blame": { "enabled": true, "delay_ms": 600 } } } ``` 3. It can also be turned on/off for the current buffer with `editor: toggle git blame inline`. ## To be done in follow-up PRs - [ ] Add link to pull request in tooltip - [ ] Add avatars of users if possible ## Release notes Release Notes: - Added inline `git blame` information the editor. It can be turned on in the settings with `{"git": { "inline_blame": "on" } }` for every buffer or, temporarily for the current buffer, with `editor: toggle git blame inline`.
This adds so-called "inline git blame" to the editor that, when turned on, shows
git blameinformation about the current line inline:When the inline information is hovered, a new tooltip appears that contains more information on the current commit:
The commit message in this tooltip is rendered as Markdown, is scrollable and clickable.
The tooltip is now also the tooltip used in the gutter:
Settings
{ "git": { "inline_blame": { "enabled": true } } }x millisecondsafter a cursor movement:{ "git": { "inline_blame": { "enabled": true, "delay_ms": 600 } } }editor: toggle git blame inline.To be done in follow-up PRs
Release notes
Release Notes:
git blameinformation the editor. It's enabled by default. It can be turned off in the settings with{"git": { "inline_blame": {"enabled": false } } }for every buffer. It can be turned on/off temporarily for the current buffer, witheditor: toggle git blame inline(#4793).(These release notes include #10632)