Skip to content
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

[Bug] nvim-remote not working on Windows 11 #3467

Open
pidgeon777 opened this issue Apr 1, 2024 · 1 comment
Open

[Bug] nvim-remote not working on Windows 11 #3467

pidgeon777 opened this issue Apr 1, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@pidgeon777
Copy link

Describe the bug
When opening Lazygit inside Neovim and trying to edit a file with e, Lazygit hangs.

To Reproduce
Steps to reproduce the behavior:

  1. Start Lazygit in Neovim.
  2. Select a file in the Lazygit files list.
  3. Press e.

As a result, the Lazygit terminal will hang.

Expected behavior

After running the e command, I would expect Lazygit to close and Neovim to open a new tab with the corresponding file to be edited.

Version info:
lazygit --version:

commit=3675570a391b1a49ddd198b4c7e71e17701d4404, build date=2024-03-23T09:09:11Z, build source=binaryRelease, version=0.41.0, os=windows, arch=amd64, git version=2.44.0.windows.1

git --version:

git version 2.44.0.windows.1

Additional context
The problem could be related to this code:

https://github.com/jesseduffield/lazygit/blob/master/pkg/config/editor_presets.go#L54-L61

It seems a command to be run in a Linux environment.

So, I suppose there would have to be a Windows equivalent command. Also, how and where should the NVIM variable be set?

@pidgeon777 pidgeon777 added the bug Something isn't working label Apr 1, 2024
@rpkwv8
Copy link

rpkwv8 commented Apr 11, 2024

Also, how and where should the NVIM variable be set?

NVIM env var is set when Lazygit is run inside a terminal created within neovim: https://github.com/neovim/neovim/blob/4459e0cee8b6d043ab2b06cbd89545c45a76a612/runtime/doc/nvim_terminal_emulator.txt#L43
As the above line in the documentation describes, the terminal emulator used by neovim uses the same environment setup as neovim jobs (where NVIM is set):
https://github.com/neovim/neovim/blob/4459e0cee8b6d043ab2b06cbd89545c45a76a612/runtime/doc/builtin.txt#L3866

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants