Quick and dirty git integration (lazygit) #8485
Replies: 9 comments 27 replies
-
Is there a way to open a specific task from a key binding? It seems like there must be, as the docs mention |
Beta Was this translation helpful? Give feedback.
-
@smpallen99 I posted some similar experiences in #9067 - Great to see these options available now. |
Beta Was this translation helpful? Give feedback.
-
I can't get space g g keybinding to work in zed, what could I possibly do wrong.
|
Beta Was this translation helpful? Give feedback.
-
For anyone looking for step by step implementation, |
Beta Was this translation helpful? Give feedback.
-
How to change the |
Beta Was this translation helpful? Give feedback.
-
This is my current configuration for this combining all that I've learned here and bumps along the way. This is a bit more precise because it specifies bash. I use fish by default and that has problems here. Unclear why, see #20588. Also, it closes on edit: This is updated based on two improvements present at 38c0aa3. First, users of fish no longer need to specify another shell. Even better, thanks to @mikayla-maki's awesome change in #22004, one can now run this in the center pane. tasks.json[
{
"label": "lazygit",
"command": "lazygit",
"working_directory": "${ZED_WORKTREE_ROOT}",
"hide": "on_success",
"use_new_terminal": true,
"allow_concurrent_runs": false
}
] keymap.json[
{
"context": "Editor && vim_mode == normal && !VimWaiting && !menu",
"bindings": {
"space g g": ["task::Spawn", { "task_name": "lazygit", "target": "center"}]
}
}
] |
Beta Was this translation helpful? Give feedback.
-
Anyone knows how Lazygit integration on Neovim (LazyVim distro) https://github.com/folke/snacks.nvim can open the UI so fast? it seems like in this package that the terminal was already live (i can't see the fastfetch/neofetch text for example). It seems like in the background there is always a terminal running, and it is just shown when needed |
Beta Was this translation helpful? Give feedback.
-
After updating to |
Beta Was this translation helpful? Give feedback.
-
@pidanou fyi, this no longer works as of last week's preview release and looks like no plans for it to work again. See #21610 and #21584 Appears opening in the bottom pane via task is about the closest now. |
Beta Was this translation helpful? Give feedback.
-
I just found tasks in zed last night. That make lazygit integration a breeze. Great feature zed.dev team! I'm probably addressing the folks that are using the vim bindings.
LazyGit as a terminal based Git client that uses vim bindings for navigation and control.
Once that's installed, here is the zed task that will open it. You might need to install a zed version from the preview channel to get the Tasks feature.
Open tasks with zed::OpenTasks action ("zed: open tasks" in the command palette) and add the following:
I have it mapped to
<leader>gg
as is fairly standard in neovim.This solution isn't perfect. Here are a couple issues:
shift-escape
afterspace g g
.cmd-w
to close the active pane.Beta Was this translation helpful? Give feedback.
All reactions