onivim / oni

Oni: Modern Modal Editing - powered by Neovim
https://www.onivim.io
MIT License
11.34k stars 298 forks source link

Oni cannot find neovim installation #1877

Open hwalinga opened 6 years ago

hwalinga commented 6 years ago

When I load oni it complains it cannot find neovim, or it has the incorrect version.

I think that the particular way I installed neovim on Linux (Mint 17.3) makes oni unable to find it.

I installed neovim as an appimage, and I alliased nvim to this appimage.

So, perhaps it cannot handle the appimage, or the fact that I alliased it.

Maybe I need to symlink something? I do not really know where oni searches for neovim.

Can you help me out?

oni-bot[bot] commented 6 years ago

Hello and welcome to the Oni repository! Thanks for opening your first issue here. To help us out, please make sure to include as much detail as possible - including screenshots and logs, if possible.

CrossR commented 6 years ago

Oni looks for the Linux Neovim path with the following line:

https://github.com/onivim/oni/blob/2142ced1f29a7f658773101732f6ed1b96013b63/browser/src/neovim/NeovimProcessSpawner.ts#L92

At a guess, this is because your alias isn't being picked up by Oni, though I haven't tested that yet.

That said, it looks like you should be able to define a global variable called "ONI_NEOVIM_PATH" that points to the appimage for nvim. That would be done with ONI_NEOVIM_PATH=/path/to/nvim.appimage then export ONI_NEOVIM_PATH in your .bashrc or similar.

For example, this is done in our Travis CI build as follows:

https://github.com/onivim/oni/blob/cc74a06223d311ab779e6e2e3b58afd724f4fc5d/build/script/travis-build.sh#L19-L20

If that isn't the case, I'll give it a test on my machine, since at the mo I'm just going of the code.

hwalinga commented 6 years ago

This did not work.

However, my initial guess was indeed right, and it seems that making the link in the same directory as oni is installed, makes it able to find it.

hkupty commented 6 years ago

I tested the newer version (0.3.2) and it also didn't find an nvim instance. Note that it is installed on the same directory. Also, setting the env var didn't work as well.

CrossR commented 6 years ago

I tested the newer version (0.3.2) and it also didn't find an nvim instance. Note that it is installed on the same directory. Also, setting the env var didn't work as well.

When I gave this a test with a Linux appimage, I noticed Oni wasn't dealing with relative paths very well, did you try with a full path for now?

If you are using an appimage, make sure its executable too etc.

I added a quick bit to the wiki for this here when I was testing it : https://github.com/onivim/oni/wiki/FAQ#why-isnt-oni-loading-neovim-for-me

hkupty commented 6 years ago

setting the env var didn't work as well.

I've set it with ONI_NEOVIM_PATH=$(which nvim) from my terminal as well as using the full path and none worked.

I'm using it build from aur.

hwalinga commented 6 years ago

So, this is how I solved it: sudo ln -s /home/hielke/nvim.appimage /usr/local/bin/nvim

Edit: Setting the ONI_NEOVIM_PATH did not work for me.

dfroger commented 6 years ago

Does not for me on Debian 8, with nvim 0.3.0 and oni 0.3.2.

david:~$ /opt/neovim/0.3.0/nvim.appimage --version
NVIM v0.3.0
Build type: RelWithDebInfo
LuaJIT 2.0.5
Compilation: /usr/bin/gcc-5 -Wconversion -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -O2 -g -DMIN_LOG_LEVEL=3 -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wvla -fstack-protector-strong -fdiagnostics-color=auto -Wno-array-bounds -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -I/home/travis/build/neovim/bot-ci/build/neovim/build/config -I/home/travis/build/neovim/bot-ci/build/neovim/src -I/home/travis/build/neovim/bot-ci/build/neovim/.deps/usr/include -I/usr/include -I/home/travis/build/neovim/bot-ci/build/neovim/build/src/nvim/auto -I/home/travis/build/neovim/bot-ci/build/neovim/build/include
Compiled by travis@travis-job-5be9f189-e22f-457f-96c4-f9569f029f7d

Features: +acl +iconv +jemalloc +tui 
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "
/home/travis/build/neovim/bot-ci/build/neovim/build/nvim.AppDir/usr/share/nvim
"

ONI_NEOVIM_PATH=/opt/neovim/0.3.0/nvim.appimage oni does not work (Uh oh! Unable to launch Neovim...).

PATH=/opt/neovim/0.3.0:$PATH oni does not work either. (I have a /opt/neovim/0.3.0/nvim link to /opt/neovim/0.3.0/nvim.appimage.

dfroger commented 6 years ago

Here is my console log in the devtools after trying:

ln /opt/neovim/0.3.0/nvim /usr/local/bin/nvim
ONI_NEOVIM_PATH=/usr/local/bin/nvim oni
CrossR commented 6 years ago

@dfroger your issue looks to be due to Oni's Neovim version check being broken:

bundle.js:1 Error: Unsupported version of Neovim.

This was fixed in #2103, which is Oni 0.3.4, are you able to update your Oni version?

dfroger commented 6 years ago

Just tried oni 0.3.2 and nvim 0.2.2, this works.

@CrossR I'll try. Actually, I did follow the link to the .deb in install guide for linux which points to 0.3.2, and was thinking I was using the lastest version of oni.

dfroger commented 6 years ago

@CrossR oni 0.3.4 and nvim 0.3.0 works nice, thanks!

CrossR commented 6 years ago

Cheers for the heads up @dfroger!

Looks like the Wiki is up to date - https://github.com/onivim/oni/wiki/Installation-Guide, but we haven't pulled the updated wiki into the site yet. I'll have to wait for @bryphe to do that though.