Hacker News new | ask | show | jobs
by kzrdude 1171 days ago
How do you all install neovim on Linux? The .deb is gone with this release, which I think was the most orderly way to fit into my install. I think I'll want to find a PPA solution now. I am not a fan of installs that are not reversible.
9 comments

You can always find the latest Neovim in Nixpkgs Unstable, modulo a week or two. Neovim 0.9 is on its way in right now: https://github.com/NixOS/nixpkgs/pull/225152

Just make sure your user's Nix profile is included in your XDG paths like so, and the .desktop files Nix installs will get picked up by your DE: https://nixos.wiki/wiki/Nix_Cookbook#Desktop_environment_doe...

If you really want to stay on top of the bleeding edge, you can use this overlay to run prebuilt copies of Neovim nightly on any distro: https://github.com/nix-community/neovim-nightly-overlay

To ensure that the Nix installation itself is easily removable and sets everything up correctly for you, use the Determinate Nix Installer for a fast and easy installation: https://github.com/DeterminateSystems/nix-installer

In case you don't want to wait for the final package to land in Nixpkgs, command for installing 0.9 from that PR branch after using the above Nix installer is

  nix profile install github:GaetanLePage/nixpkgs/neovim#neovim
which will build from source against that PR branch.

Nix can be a great complement to a stable, conventional base system like Debian for use cases like this. I hope you give it a try!

If you don't want an older version from your distro, it's easy to use the appImage.

    cd ~
    wget --quiet https://github.com/neovim/neovim/releases/download/nightly/nvim.appimage --output-document nvim
    chmod +x nvim
    sudo chown root:root nvim
    sudo mv nvim /usr/bin
    mkdir -p .config/nvim

To uninstall, one would delete the binary, and .config/nvim + any other folders specified in your plugin manager.
Then I'll need some other service or system that integrates it with the desktop and .desktop files. I haven't looked into that, but I see it exists.
PPAs are available for both stable (0.7.x)[1] and unstable (this 0.9)[2] versions. I use the latter and it has worked well for me.

1. https://launchpad.net/~neovim-ppa/+archive/ubuntu/stable 2. https://launchpad.net/~neovim-ppa/+archive/ubuntu/unstable

The stable one never updated to 0.8 so it has not been of much use in that way unfortunately
I'm not a fan of installs that aren't reversible either. That's why I don't touch any distro that fights me on that (such as one that supports .deb)
You should get a better package manager/distro. With emerge or pacman, it's easy to find/write your own ebuild/pkgbuild, way better than adding ppas.
Fair. I'll soon give asahi a try on a refurb mac, so then I'll be try arch style package management.

Not sure if adding ppas is the problem, i think that's ok, but making packages when none exist is more of a hassle.

I have been installing into $HOME/.local for a while now and it works wonderfully. I build from source, but it should work just as well from a tar or AppImage.
How do you uninstall and clean it up, in that case?

    rm -rf ~/.local/{bin,share}/nvim
A shame they removed the .deb package. Oh well, I use gvim as my daily driver anyway.
I have a script in my dotfiles that installs neovim from source, based on a version I set elsewhere.
We are stuck with the app images now it seems