Replies: 11 comments 14 replies
-
On testing this I am afraid the input is messed up when trying to type into lazygit, this is me pressing the delete key: Now I can't exit the window. Any suggestions? I use Kitty and this has been working perfectly:
|
Beta Was this translation helpful? Give feedback.
-
I love what I'm reading here: combining tools that greatly do their purpose together. Thanks for sharing such ideas. One issue I'm facing though is disabled mouse support after execution. Some open issues refer to the same problem, for example #11853. Seems like Helix doesn't check if the sub-command stole mouse support. In the meanwhile, here is my work around: [keys.normal]
C-g = [
":write-all",
":new",
":insert-output lazygit",
":set mouse false", # First disable mouse to hint helix into activating it
":set mouse true",
":buffer-close!",
":redraw",
":reload-all"
] |
Beta Was this translation helpful? Give feedback.
-
Working fine in Ghostty. Would something similar work with Yazi? I guess the problem would be piping back a file to a buffer after creating & opening a new file. Of course, the standard picker for existing files |
Beta Was this translation helpful? Give feedback.
-
had to use |
Beta Was this translation helpful? Give feedback.
-
This doesn't work for me because after quitting Helix, the terminal doesn't get redrawn properly and is cluttered with the remnants of lazygit. Tested with Alacritty and Konsole. |
Beta Was this translation helpful? Give feedback.
-
What does this do this spawns lazygit? Eh, why? How would that be useful? The whole thing of an integration is to have it integrated into the editor not shell out to another tool? |
Beta Was this translation helpful? Give feedback.
-
There's a similar integration with yazi (a cli file manager) but with both settings I've come across the same issue where when you exit helix, the whole editor screen stays on the terminal and doesn't disappear like this. This happens with multiple terminal (im using both wezterm and alacritty) so i'm not sure if this is a helix issue with redrawing another note is that if you're committing in lazygit and you select "open in editor" in the commit message window then the terminal will freeze, i have to either type out by hand or type in another terminal then copy paste the contents |
Beta Was this translation helpful? Give feedback.
-
For me, things are getting stucked when i try to commit.
When trying to commit with the LazyGit UI ( Removing the |
Beta Was this translation helpful? Give feedback.
-
Helix does need a VCS integration, as the whole point of having a good editor expierience is not jumping between different editors all the time. When you need to stage/restore individual lines/hunks (and in big projects you need to do that often!) switching to another tool for this simple task feels very awkward. |
Beta Was this translation helpful? Give feedback.
-
Unable to get it to work with gitu. Helix continues to be displayed. |
Beta Was this translation helpful? Give feedback.
-
Adding to this, I created three scripts to have my most common used git operations inline under g. They allow me to have this on the config:
[keys.normal.space.g]
f = "changed_file_picker"
r = ":reset-diff-change"
# inline blame
b = ":run-shell-command ~/.config/helix/utils/blame_line_pretty.sh %{buffer_name} %{cursor_line}"
# full file changes of last commit under cursor
B = ':open %sh{~/.config/helix/utils/blame_file_pretty.sh %{buffer_name} %{cursor_line}}'
# inline hunk changes
h = ':run-shell-command ~/.config/helix/utils/git-hunk.sh %{buffer_name} %{cursor_line} 3' I place the following scripts in a folder inside `~/.config/helix/utils`. I tried to leave them well documented. You can find the scripts here: https://gist.github.com/gloaysa/828707f067e3bb20da18d72fa5d4963a And how they look in the editor: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Explanation
write-all
: save all buffers so that the changes can be shown in lazygit and commited right awaynew
: create new empty bufferinsert-output lazygit
: runs thelazygit
command and inserts it's output into the new bufferbuffer-close!
will kill the previously empty buffer and send you pack to where you were previouslyredraw
is necessary to re-render the UI to show the buffersreload-all
because if e.g. you commit everything, helix will still show the symbols indicating that lines were changed / deleted on the left of the line numbers. This will prevent thatBeta Was this translation helpful? Give feedback.
All reactions