onivim / oni

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

oni 0.3.9 not working with nvim 0.3.3 #2706

Open vlcinsky opened 5 years ago

vlcinsky commented 5 years ago

Oni Version: 0.3.9 Neovim Version (Linux only): 0.3.3 Operating System: Debian Stretch

Issue: When nvim 0.3.3 installed, oni starts very slowly and then does not function. It is even not possible to get the ":" prompt.

Expected behavior: oni shall work with latest released nvim version.

Actual behavior: For nvim version 0.3.3 oni does not work.

Steps to reproduce: Install nvim 0.3.3 (I used nvim.appimage).

Have oni 0.3.9 installed (used deb package)

In default configuration (variable ONI_NEOVIM_PATH not set), oni starts but it takes few seconds more, then it is not possible to open a file or open the ":" prompt.

When ONI_NEOVIM_PATH is set to older version of nvim (I have version 0.3.0), oni works well.

badosu commented 5 years ago

Can confirm not working after upgrade to neovim 0.3.2 too.

zr0z commented 5 years ago

I had the same issue today on MacOS after updating to nvim 0.3.3.

I don't think my solution will help you, as I am on a different OS, but it might help other Mac OS users.

Following #2590, I had been running Oni with the debug.neovimPath configuration key set to my global nvim command.

Commenting out the key in the ~/.config/oni/config.{js,tsx} did allow me to use successfully Oni, as it is now using the version of neovim packaged with the application.

vlcinsky commented 5 years ago

I can confirm, that explicitly setting value of "debug.neovimPath" to nvim version 0.3.0 allows me to use nvim 0.3 3.

It is just an workaround, the issue that oni does not work with the latest nvim version still persist.

mbkv commented 5 years ago

To keep things together (so we don't duplicate work). There's another issue on this #2704. I found the general reason for why it's breaking. But I don't know why exactly it's happening or how to fix it.

tldr; A call to the neovim API is not completing

hojas commented 5 years ago

same issue on MacOS

pmav99 commented 5 years ago

Archlinux too

$ pacman -Qs neovim
local/neovim 0.3.3-1
    Fork of Vim aiming to improve user experience, plugins, and GUIs
local/oni 0.3.9-1
    An IDE built around Neovim
losinggeneration commented 5 years ago

neovim/neovim@4da5cb38d396d76d8072815d150725f7c9a85078 changed the behavior of the command line argument --embed to no longer imply --headless.

A pretty simple patch: losinggeneration/oni@da86cba15d14dc5c17aaf7b512f9ef53579654d7 is all that's needed to get Oni working again with nvim >= 0.3.2

badosu commented 5 years ago

Updated the AUR package to depend on neovim<=0.3.1

SteelBlueVision commented 5 years ago

OK, for everyone having this problem (i.e., using NeoVIM versions >= 0.3.2), there is a very simple solution without reinstalling anything or downgrading nvim, or patching/rebuilding oni, or anything like that. I don't know why it was so difficult for the people who figured this out to post the most basic instructions for the most simple of fixes?

This is for Linux (assuming Oni was installed in /opt/Oni), but other OS's are similar, just find the resources/app/lib/browser/vendor.bundle.js file, wherever it lies on your filesystem (probably ...\resources\app\lib\browser\vendor.bundle.js on windows. Replace ... with where the oni stuff lives).

The solution to this is as simple as, editing the file /opt/Oni/resources/app/lib/browser/vendor.bundle.js (may need to use sudo, if it is owned by root): Search (and when I say search, I mean use the Search Command of your editor and not your eyes and fingers!) for the line that has: ...,"--embed","--"... (On my install, it was line # 874 in that file.)

Note: Don't include the ellipses (plural of ellipsis, as in ...) in your search - just the phrase highlighted in gray, above (it should start with a comma and end with a quote). The ellipses are just being used as placeholders for the omitted start/end text of that horrendously long line, to keep things simple.

And insert "--headless", in that line between the embed and -- strings, so it looks like this: ...,"--embed","--headless","--"...

Voila, problem solved in 30 seconds or less!

losinggeneration commented 5 years ago

@mgoldshteyn something like this for POSIX systems.

sed 's/"--embed",/"--embed","--headless",/' resources/app/lib/browser/vendor.bundle.js  > tmp.js
mv tmp.js resources/app/lib/browser/vendor.bundle.js
SteelBlueVision commented 5 years ago

@mgoldshteyn something like this for POSIX systems.

sed 's/"--embed",/"--embed","--headless",/' resources/app/lib/browser/vendor.bundle.js  > tmp.js
mv tmp.js resources/app/lib/browser/vendor.bundle.js

Just make sure you cd to the right starting directory first and you can use sponge or sed with replace in-place (i.e., --in-place) to avoid the need for a temporary file and a move.

losinggeneration commented 5 years ago

I specifically avoided that because in-place is handled differently between OS X & Linux (last I checked) I think something like -i.bak works on both the same way, but then leaves a file.bak behind.

palmier3 commented 5 years ago

Hello, I am on Fedora 27 neovim 0.3.4 prebuilt binary added to the PATH oni 0.3.6

By modifying vendor.bundle.js as explained by @mgoldshteyn, with no other custom change, it worked for me, BUT only if I launch it from the terminal.

I am new to this software and I encountered other bugs which I don't know if are related to this 'hack'. So as for editing files it seem it's working but I couldn't say it doesn't cause errors/bug somewhere else.

pencilcheck commented 5 years ago

I wish they fixed this in the next update, otherwise it would be annoying to have to do this on every new installation or update.

vlcinsky commented 5 years ago

I have no idea, if there is any next update to happen as there is ongoing work on onivim2