8000 Update app-neovim.sh - build from binaries by Salanoid · Pull Request #6 · omacom/omakub · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Aug 30, 2026. It is now read-only.

Update app-neovim.sh - build from binaries - #6

Merged
dhh merged 5 commits into
omacom:masterfrom
Salanoid:patch-1
Jun 13, 2024
Merged

dhh merged 5 commits into
omacom:masterfrom
Salanoid:patch-1

Conversation

@Salanoid
@Salanoid Salanoid commented Jun 5, 2024 •
Copy link
Copy Markdown
Contributor

Build neovim from binaries because in apt last stable version is missing sometimes.

Build made accordingly to this readme:
https://github.com/neovim/neovim/blob/master/BUILD.md

Build neovim from binaries because in apt last stable version is missing sometimes. 

Build made accordingly this readme:
https://github.com/neovim/neovim/blob/master/BUILD.md
@felipedmesquita
Copy link
Copy Markdown
8000

@Salanoid for me eza and alacritty (among others) are also missing from apt (no install candidate). Do you have any insight as to way that might be?

@Salanoid
Salanoid commented Jun 5, 2024 •
Copy link
Copy Markdown
Contributor Author

@Salanoid for me eza and alacritty (among others) are also missing from apt (no install candidate). Do you have any insight as to way that might be?

This thread might be helpful: alacritty/alacritty#3863.

You can try running apt-cache search alacritty to look for the packages.

From what I've seen, you need to add an unofficial existing PPA sudo add-apt-repository ppa:aslatter/ppa to install Alacritty on different Ubuntu versions because it isn't available in the standard repositories. Or in this case, you can build Alacritty from the source https://github.com/alacritty/alacritty/blob/master/INSTALL.md.

Comment thread install/app-neovim.sh Resolved
@dhh
dhh commented Jun 6, 2024
Copy link
Copy Markdown
Collaborator

Don't love the idea of having to build from source. Maybe @tjdevries has an opinion here?

@ghost
ghost commented Jun 6, 2024
Copy link
Copy Markdown

I'd rather instead of building from source build from neovim's prebuild binaries like this(in nvim's INSTALL.MD)

curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux64.tar.gz
sudo rm -rf /opt/nvim
sudo tar -C /opt -xzf nvim-linux64.tar.gz

And then in the shell config make sure we add that to the path(bash example)

export PATH="$PATH:/opt/nvim-linux64/bin"

This way we don't need to build from source but instead form nvim's own prebuild's, which is the way they recommend us installing it(and how I install it myself)

@dhh
dhh commented Jun 6, 2024
Copy link
Copy Markdown
Collaborator

We can install the prebuilt bin like we do zellij: https://github.com/basecamp/omakub/blob/master/install/app-zellij.sh

@ghost
ghost commented Jun 6, 2024 •
Copy link
Copy Markdown
8000

I propose this, if this is good do we make a different pull request or change this one?

#!/bin/bash

# Neovim installation
cd ~/Downloads
wget -O nvim-linux64.tar.gz "https://github.com/neovim/neovim/releases/latest/download/nvim-linux64.tar.gz"
sudo rm -rf /opt/nvim
sudo tar -C /opt -xzf nvim-linux64.tar.gz
export PATH="$PATH:/opt/nvim-linux64/bin"
cd -

if [ ! -d "$HOME/.config/nvim" ]; then
	git clone https://github.com/LazyVim/starter ~/.config/nvim
	cp ~/.local/share/omakub/themes/neovim/tokyo-night.lua ~/.config/nvim/lua/plugins/theme.lua
fi

And also change the bashrc to include

export PATH="$PATH:/opt/nvim-linux64/bin"

@dhh
dhh commented Jun 6, 2024
Copy link
Copy Markdown
Collaborator

Too much. The path in the app-zellij.sh installer is the way, if we go with these prebuilt binaries.

Which does bring up a bigger point that we need to eventually get this project onto being ready for arm64 too. Snapdragon is coming!

@ghost
ghost commented Jun 6, 2024 •
Copy link
Copy Markdown

Too much. The path in the app-zellij.sh installer is the way, if we go with these prebuilt binaries.

fair enough how's this(tested and verified this works super super fast), no weird shell add stuff, just plain fast neovim

cd ~/Downloads
wget -O nvim-linux64.tar.gz "https://github.com/neovim/neovim/releases/latest/download/nvim-linux64.tar.gz"
sudo rm -rf /usr/local/bin/nvim  # Remove any existing binary to avoid conflicts
sudo tar -C /usr/local/bin -xzf nvim-linux64.tar.gz --strip-components=2 nvim-linux64/bin/nvim
cd -

if [ ! -d "$HOME/.config/nvim" ]; then
	git clone https://github.com/LazyVim/starter ~/.config/nvim
	cp ~/.local/share/omakub/themes/neovim/tokyo-night.lua ~/.config/nvim/lua/plugins/theme.lua
fi

@dhh
dhh commented Jun 6, 2024
Copy link
Copy Markdown
Collaborator

Let's follow the exact same procedure, using that install command, etc. The less variation we have between the installers, the better.

Salanoid added 2 commits June 6, 2024 22:04
Install Neovim from a prebuilt file following the exact same procedure we use for Zellij.
@Salanoid
Salanoid commented Jun 6, 2024
Copy link
Copy Markdown
Contributor Author

Let's follow the exact same procedure, using that install command, etc. The less variation we have between the installers, the better.

Following the discussion, I made a new commit; we will install Neovim using the same procedure as for Zellij.

@ghost
ghost commented Jun 6, 2024
Copy link
Copy Markdown

looks better then my solution, and works great, thanks for the commit

@Salanoid
Salanoid commented Jun 6, 2024
Copy link
Copy Markdown
Contributor Author

Thank you and thanks for the help!

@dhh
dhh commented Jun 7, 2024
Copy link
Copy Markdown
Collaborator

Seems like nvim 0.10 has incompatibilities with the lazyvim setup we're using. When upgrading, I get this:

│Error detected while processing /home/dhh/.config/nvim/init.lua:                                                                                                                                     │
│E5113: Error while calling lua chunk: vim/_init_packages.lua:0: module 'vim.uri' not found:                                                                                                          │
│        no field package.preload['vim.uri']                                                                                                                                                          │
│        no file './vim/uri.lua'                                                                                                                                                                      │
│        no file '/home/runner/work/neovim/neovim/.deps/usr/share/luajit-2.1/vim/uri.lua'                                                                                                             │
│        no file '/usr/local/share/lua/5.1/vim/uri.lua'                                                                                                                                               │
│        no file '/usr/local/share/lua/5.1/vim/uri/init.lua'                                                                                                                                          │
│        no file '/home/runner/work/neovim/neovim/.deps/usr/share/lua/5.1/vim/uri.lua'                                                                                                                │
│        no file '/home/runner/work/neovim/neovim/.deps/usr/share/lua/5.1/vim/uri/init.lua'                                                                                                           │
│        no file './vim/uri.so'                                                                                                                                                                       │
│        no file '/usr/local/lib/lua/5.1/vim/uri.so'                                                                                                                                                  │
│        no file '/home/runner/work/neovim/neovim/.deps/usr/lib/lua/5.1/vim/uri.so'                                                                                                                   │
│        no file '/usr/local/lib/lua/5.1/loadall.so'                                                                                                                                                  │
│        no file './vim.so'                                                                                                                                                                           │
│        no file '/usr/local/lib/lua/5.1/vim.so'                                                                                                                                                      │
│        no file '/home/runner/work/neovim/neovim/.deps/usr/lib/lua/5.1/vim.so'                                                                                                                       │
│        no file '/usr/local/lib/lua/5.1/loadall.so'                                                                                                                                                  │
│stack traceback:                                                                                                                                                                                     │
│        [C]: in function 'require'                                                                                      
8000
                                                                             │
│        vim/_init_packages.lua: in function '__index'                                                                                                                                                │
│        vim/loader.lua: in function <vim/loader.lua:0>                                                                                                                                               │
│        [C]: at 0x5c7aa498b190                                                                                                                                                                       │
│        [C]: in function 'require'                                                                                                                                                                   │
│        vim/_init_packages.lua: in function '__index'                                                                                                                                                │
│        ...e/dhh/.local/share/nvim/lazy/lazy.nvim/lua/lazy/init.lua:61: in function 'setup'                                                                                                          │
│        /home/dhh/.config/nvim/lua/config/lazy.lua:10: in main chunk                                                                                                                                 │
│        [C]: in function 'require'                                                                                                                                                                   │
│        /home/dhh/.config/nvim/init.lua:2: in main chunk                                                                                                                                             │
│E484: Can't open file /usr/local/share/nvim/syntax/syntax.vim                                                                                                                                        │

@Salanoid
Salanoid commented Jun 7, 2024
Copy link
Copy Markdown
Contributor Author

I don't know exactly how to reproduce it, for me the installation of neovim v0.10.0 with lazygit worked with this script.

@dhh
dhh commented Jun 7, 2024
Copy link
Copy Markdown
Collaborator

The installation worked fine, it's nvim itself at 0.10 that seems to have trouble with the lazyvim configuration.

@ghost
ghost commented Jun 7, 2024
Copy link
Copy Markdown

0.10 should work fine with previous configs unless you did some weird stuff, perhaps delete all the cache and data?

@Salanoid
Salanoid commented Jun 7, 2024
Copy link
Copy Markdown
Contributor Author

Yes, I use v0.10.0 with lazyvim and works fine.

@Salanoid
Salanoid commented Jun 7, 2024
Copy link
Copy Markdown
Contributor Author

I tried the script again on a fresh Ubuntu installation and encountered the same errors as @dhh. Neovim v0.10.0 from prebuilt doesn't work with Packer and LazyVim. To get the latest version with everything needed, we have to build it from source. I used this old script of mine, and it works fine.

@dhh
dhh commented Jun 7, 2024
Copy link
Copy Markdown
Collaborator

Maybe we just need @tjdevries to release a 0.10.1, then? Either way, let's go the prebuilt binary way, but hold off until it's compatible with lazyvim etc.

@ealvar3z
ealvar3z commented Jun 8, 2024 •
Copy link
Copy Markdown

@Salanoid for me eza and alacritty (among others) are also missing from apt (no install candidate). Do you have any insight as to way that might be?

This thread might be helpful: alacritty/alacritty#3863.

You can try running apt-cache search alacritty to look for the packages.

From what I've seen, you need to add an unofficial existing PPA sudo add-apt-repository ppa:aslatter/ppa to install Alacritty on different Ubuntu versions because it isn't available in the standard repositories. Or in this case, you can build Alacritty from the source https://github.com/alacritty/alacritty/blob/master/INSTALL.md.

You can always install the snap version of Alacritty with the --classic flag. The same approach could be used for neovim since the project releases stable and edge channels consistently.

@dhh
dhh merged commit 164919d into omacom:master Jun 13, 2024
burno-lima pushed a commit to burno-lima/omakdot that referenced this pull request May 15, 2026
Update app-neovim.sh - build from binaries
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

0