Closed crides closed 1 year ago
Hey @crides, glad to hear from you! That's definitely unusual, normally neovim injects the NVIM_LISTEN_ADDRESS
into the environment when it starts a terminal session, and the vw
, e
, etc. commands make use of that env var to learn how to connect to the host Neovim session. This generally happens automagically, but it may be that something in your shell or neovim environment is interfering with that process, possibly your shell's rc files or an autocmd or other neovim plugin.
One thing to check is to try running env | grep NVIM
from inside a shell (I'd try both a shell started via neovim's standard:term
command and with :Neomux
to see if the results differ). In a working setup that should output something like this:
NVIM=/run/user/1000/nvim.8222.0
NVIM_LISTEN_ADDRESS=/run/user/1000/nvim.8222.0
I suspect your output will be missing the NVIM
and/or NVIM_LISTEN_ADDRESS
vars, which would result in the errrors you're seeing . One thing to try is to do something like :echo $NVIM_LISTEN_ADDRESS
(or :let @"=$NVIM_LISTEN_ADDRESS
to copy the value to the clipboard directly), and then set NVIM_LISTEN_ADDRESS
inside the shell yourself (ie export NVIM_LISTEN_ADDRESSS=<your pasted value>
). If vw
and friends work after that then we know that the issue lies in transferring the NVIM_LISTEN_ADDRESS
value into your shell, and the next step would be figuring out what's preventing it from getting set automatically.
Thanks for the detailed reply! The problem is with my Mac at work, and I tried this on my Android today and it seems to work fine. Let me try again on Monday
I had the time to test on other platforms (Arch, and Termux), and it turns out the problem lies around the nvr
binary provided. Installing the neovim-remote
python package works fine, but using the provided binary does not (on Arch and Mac of course). Running nvr
produces the following error (on Arch specifically):
Traceback (most recent call last):
File "site-packages/nvr/nvr.py", line 574, in <module>
File "site-packages/nvr/nvr.py", line 381, in main
File "site-packages/pkg_resources/__init__.py", line 892, in require
File "site-packages/pkg_resources/__init__.py", line 778, in resolve
pkg_resources.DistributionNotFound: The 'neovim-remote' distribution was not found and is required by the application
[1650857] Failed to execute script nvr
I'm not sure of the origin of the error, but it may be easier to just let the user install the python package manually, unless there's some other problem that I can't foresee yet.
Otherwise, I think this is a useful plugin. I'll tweak the keybindings more (c-w
conflicts with kill-word
in readline/zsh (it's useful even if I use vim mode there) for a start), but I'll definitely try to use a nvim-only workflow instead of a tmux-based one (though, the daemon would still be very useful, for remoting purposes).
Glad to hear it! Yea, the provided nvr
binaries are a convenience wrapper to spare the end users the job of python (v)env mgmt, but right now I only provide prebuilt binaries for linux (amd64) and macOS (x86, but generally runs fine on apple silicon via rosetta). Running on arch on android is a pro move! Glad to hear neomux is exploring new terrain and that you got it all working.
Fwiw, I actually still use tmux, I just use it with neomux :) I have a set of extra functions (I should probably add them to neomux come to think of it) that makes each neomux term a separate window in a shared tmux session which provides the nice benefit that if nvim crashes you can still reconnect to the terminals from your last session
closing this, feel free to reopen if you find any other issues
Hi, this seems like a great idea, however I'm having trouble getting the plugin to work. Whenever I start a new shell with
:Neomux
, thevw
,e
commands fail, withnvr
logging:None of the
nvim
processes have a--listen
argument, nor can I find anything related in the source. How is this supposed to be used?