How to use Neovim 0.5 on iSH on iPadOS

Takuya Matsuyama - Aug 5 '21 - - Dev Community

I have an iPad. I love Neovim. Can I use it on my iPad? -- Let's try it.

Use iSH as a terminal emulator

iSH

https://ish.app/

iSH is a Linux shell built for iOS & iPadOS, using usermode x86 emulation and syscall translation. It's not a SSH client. You can actually have a terminal locally on your device.
It runs Alpine Linux, so you can install packages with apk command. Pretty neat!

Couldn't build Neovim from source

Apparently, the official iSH package repository currently provides only Neovim 0.4.
Looks like you need to build the latest Neovim from its source.

Install prerequisites:

apk update
apk add git build-base cmake automake autoconf libtool pkgconf coreutils curl unzip gettext-tiny-dev
Enter fullscreen mode Exit fullscreen mode

Clone the reopsitory:

git clone https://github.com/neovim/neovim.git
cd neovim
Enter fullscreen mode Exit fullscreen mode

Build it:

make -j4 CMAKE_BUILD_TYPE=Release
Enter fullscreen mode Exit fullscreen mode

But got an error:

Install the project...
-- Install configuration: "Release"
-- Installing: /root/neovim/.deps/usr/lib/libluv_a.a
-- Installing: /root/neovim/.deps/usr/include/luv/luv.h
-- Installing: /root/neovim/.deps/usr/include/luv/util.h
-- Installing: /root/neovim/.deps/usr/include/luv/lhandle.h
-- Installing: /root/neovim/.deps/usr/include/luv/lreq.h
make[4]: Leaving directory '/root/neovim/.deps/build/src/luv-static-build'
[ 94%] Completed 'luv-static'
make[3]: Leaving directory '/root/neovim/.deps'
[ 94%] Built target luv-static
make[2]: Leaving directory '/root/neovim/.deps'
make[1]: *** [Makefile:104: all] Error 2
make[1]: Leaving directory '/root/neovim/.deps'
make: *** [Makefile:105: deps] Error 2
Enter fullscreen mode Exit fullscreen mode

I don't understand what's going wrong from this error log.
iSH is quite unstable on doing those things.

I decided to go another way.

Try Alpine's edge repository

The iSH's default package repository is kind of outdated.
So, I tried to use the Alpine's official edge repository.
Because neovim-0.5.0 is available there:

https://pkgs.alpinelinux.org/package/edge/community/x86/neovim

echo https://dl-cdn.alpinelinux.org/alpine/edge/main > /etc/apk/repositories
echo https://dl-cdn.alpinelinux.org/alpine/edge/community >> /etc/apk/repositories
apk update
apk upgrade
apk add neovim
Enter fullscreen mode Exit fullscreen mode

Boom. It worked!

IMG_0341

You can't use all the edge packages

I found that git or nodejs won't work if I installed it from the edge repos due to "Bad system call".
So, you basically should be on the default package repos.

I hope iSH gets more stable. Kudos to tbodt for the awesome work!

Related

I've made a tutorial video on how to set up Neovim on macOS:

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player