@n8henrie Do you have new information about this problem? I have been able to replicate this with neovim v0.10.1.
No, after years on nvim I have switched to using helix as my primary editor. I do appreciate the input from the community on this issue!
I’ve given this problem a lot of thought, and it’s difficult to solve because I’ve identified at least a couple of reasons why Neovim might hang.
The first issue I detected is when you modify a file outside of Neovim. The solution I found here is to set vim.opt.autoread = false
. With that, now a dialog appears notifying me that the file was modified, and Neovim no longer hangs.
The second issue involves the xclip
utility. According to the Arch Linux wiki, there is an issue with xclip
working in tmux
because it never closes STDOUT, resulting in an infinite loop.
xclip could also be used for this purpose. Unlike xsel, it works better when printing a raw bitstream that does not fit the current locale. Nevertheless, it is neater to use xsel because xclip does not close STDOUT after it has read from the tmux buffer. As such, tmux does not know that the copy task has completed, and continues to wait for xclip to terminate, thereby rendering tmux unresponsive. A workaround is to redirect STDOUT to /dev/null
Source: https://wiki.archlinux.org/title/Tmux#X_clipboard_integration
The solution here is to install xsel
, since Neovim prioritizes it over xclip
.
I will update this thread if I find more causes.
I hope this can help someone.