-
-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document new lazygit edit command config #101
Comments
Also, side-note: if you ever have ideas for how to improve the integration between neovim and lazygit that require a change on the lazygit side, let me know! |
Thanks for writing and maintaining lazygit! It is a game changing git workflow! I’ll let you know if I think of any good ideas for a better integration. For reference and content, right now in this plugin So if people are finding this plugin useful, it is because of lazygit :) |
Thanks :) Sounds good |
Been trying to make this work but I haven't been having much luck. Anyone know how to make it work? Following the new syntax I tried to do this:
but it only seems to work if I don't have the file open in nvim already. When I remove the |
Hello @TylerBarnes, I'd like to share my setup that I think does what you asked about:
os:
# I usually use lazygit embedded in nvim. For this, I use
# https://github.com/willothy/flatten.nvim to simplify the setup without the
# need for external applications.
#
edit: "nvim {{filename}}"
editAtLine: "nvim +{{line}} {{filename}}"
editAtLineAndWait: "nvim +{{line}} {{filename}}" Note 1: I don't use this plugin, but I think the idea is the same regardless. Note 2: I made a performance optimization to skip loading all unnecessary plugins if I only want to send the send instruction to the parent neovim here https://github.com/mikavilpas/dotfiles/blob/fe3ac5480bc80f558b3e3330d89b2bb2abcd7db6/.config/nvim/lua/config/lazy.lua?plain=1#L35 My config: Let me know if you have any questions; I can explain this further if needed |
Thanks @mikavilpas ! Just tried your setup and it works. I think I discovered why I was having trouble with this before. When I edit a file I first see "ATTENTION found a swap file". Once I choose "open read only" or "edit anyway" it opens it in the parent nvim as expected |
I am also trying to get this to work with
Additionally, I am trying to pass it in explicitly too (just in case):
However, this is not working. The editor opens within the limits of the floating window, and I can't get rid of it until I |
Ah, never mind. After exploring your configuration @mikavilpas I found what I was missing:
|
Nice! Btw, I recently found out while almost all workflows with neovim+lazygit work very nicely, some special workflows require a lazygit->neovim->lazygit flow, and these don't work in the embedded lazygit. An example is committing a merge to finish it: when you write the commit message in neovim, lazygit has already been closed and it can't continue the flow. Some projects that I work in require this at times, and for these cases I just use the terminal lazygit to work around it :) 99% stuff works fine. |
(First off sorry but I've lost the issue template and can't get it back upon reload)
Lazygit maintainer here: thanks for making this plugin, lots of people find it really valuable.
Lazygit has a new config structure for specifying how file are edited like so:
I'm not sure how this fits onto neovim (I've been intending to get into neovim but haven't found the time) but it would be good to document what the corresponding values should be when using this plugin.
The text was updated successfully, but these errors were encountered: