Open ELLIOTTCABLE opened 3 years ago
If you just need it inside the embedded neovim terminal, maybe you could try to set the correct servername in your configuration ?
let $NVIM_LISTEN_ADDRESS=v:servername
Unfortunately, that's the inverse — I need to configure the embedded neovim itself, not the terminal.
Edit: Oh, I mis-understood you — you mean configuring the embedded terminal, so launched-inside-VimR applications work as expected.
That's actually a really helpful tip, although it doesn't solve the underlying problem — with that solution, for instance, if I open a external Terminal.app window after launching VimR from the GUI, it won't be able to control my VimR instance.
For anybody else coming across this, the actual line @Andilutten suggested ended up being unnecessary — I'd hardcoded the envvar in my .profile
, and thus it was getting overwritten on :terminal
-start; all I had to do to at least get nvr
instances inside VimR to start working was the following:
+|if [ -z "$NVIM_LISTEN_ADDRESS" ]; then
| export NVIM_LISTEN_ADDRESS="/tmp/nvimsocket"
+|fi
I asked for something similar (to configure the socket) here: https://github.com/qvacua/vimr/issues/797
This would be excellent, as currently with certain neovim configs, you need to set env variables for core functionality. E.g. I'm attempting to run Python code for the minted LaTeX package in SpaceVim, but SpaceVim requires an environment variable to be set to have Python functionality.
In particular, I don't launch VimR from an existing terminal, so
vimr --cur-env
is useless to me — I'm a "terminal inside VimR", not "VimR from a terminal" kinda user!I'd like to use
nvr
, from neovim-remote, as my$GIT_EDITOR
and the like. I've configured my$NVIM_LISTEN_ADDRESS
to/tmp/nvimsocket
using shell configuration files; and that works fine, of course … if I launch VimR from a terminal:vimr --cur-env
, so VimR's neovim inherits the shell$NVIM_LISTEN_ADDRESS
:terminal
inside VimR itselfnvr
instructing VimR to open windows/buffers/etc as appropriate.nvr
talks to VimR's embedded Neovim over/tmp/nvimsocket
; all works fine!However, in a more normal form of usage,
:terminal
inside VimR itselfnvr
instructing VimR to open windows/buffers/etc as appropriate.nvr
tries to communicate to/tmp/nvimsocket
; but VimR's neovim is listening on something random like:... so nothing happens.
This is, however, just a specific case of the "we don't have control over the integrated
neovim
instance" issue. I really do think that the ideal solution to this is to simple make it configurable.This isn't the first time this sort of issue has cropped up; and plenty of other GUI editors that invoke tools and similar offer options like this. I really hope you'll consider such a feature worth your time!