Add: install neovim script

This commit is contained in:
Yann 2024-04-11 10:58:15 +02:00
parent a4fb327e93
commit 1ba96a4b7f
2 changed files with 77 additions and 0 deletions

75
install-neovim.sh Executable file
View File

@ -0,0 +1,75 @@
#!/usr/bin/env sh
# exit on error
set -e
# no undefined variables
set -u
set -x
sudo apt-get -y install libtool libtool-bin autoconf automake cmake g++ pkg-config unzip gettext apt-transport-https luarocks mpack
# pour deoplete, uniquement python3
sudo apt-get -y install python-dev-is-python3 python3-dev python3-pip python3-neovim
#sudo apt-get -y install pynvim
# Ruby support
sudo apt-get -y install ruby-dev rubygems
sudo gem install neovim
# pour gutentags
sudo apt-get -y install exuberant-ctags
# for vimtex
sudo apt-get -y install latexmk psmisc xdotool
# pip3 install neovim-remote
# For CoC
# curl -sL install-node.now.sh/lts | sudo bash
#curl --compressed -o- -L https://yarnpkg.com/install.sh | bash
# For nvim-lsp html/css
sudo apt-get install -y nodejs #npm
# Telescope
sudo apt-get install -y fd-find
# For rust-tools debuggin
sudo apt-get install -y lldb
#
sudo apt-get -y install shellcheck
# Pas convaincu d'avoir également pip2
# sudo pip2 install neovim --upgrade
cd /tmp/
# if [ ! -d "neovim" ]; then
repo="neovim/neovim"
package_url=$(curl -s https://api.github.com/repos/$repo/releases/latest | grep 'tarball_url' | cut -d\" -f4)
download_directory="/tmp/neovim/"
filename=$(basename "$package_url")
mkdir -p "$download_directory"
#wget --directory-prefix="$download_directory" "$package_url"
curl -L -o "$download_directory/$filename" "$package_url"
cd "$download_directory"
# Overwrite
tar xzvf "$filename" --strip=1
# git clone https://github.com/neovim/neovim/releases/latest --depth=1
# else
# cd /tmp/neovim || exit
# git pull
# cd -
# fi
if [ ! -d "$HOME/.local/share/nvim/site/pack/packer/start/" ]; then
git clone --depth=1 https://github.com/wbthomason/packer.nvim ~/.local/share/nvim/site/pack/packer/start/packer.nvim
fi
cargo install tree-sitter-cli
cd "/tmp/neovim/"
rm -fr build
# make distclean
make CMAKE_EXTRA_FLAGS="-DCMAKE_BUILD_TYPE=Release"
cd ../
mkdir -p ~/.local/share/nvim/shada/
touch ~/.local/share/nvim/shada/main.shada
cd neovim
sudo make install
nvim +PackerSync +TDUpdate +checkhealth

View File

@ -1,5 +1,7 @@
#!/bin/sh
WORKDIR=$HOME/.config/nvim/
BINDIR=$HOME/.local/bin/
mkdir "$WORKDIR"
curl -fsSL -o "$WORKDIR/init.lua" https://gitea.fery.me/king/neovim/raw/branch/master/init.lua
curl -fsSL -o "$BINDIR/install-neovim.sh" https://gitea.fery.me/king/neovim/raw/branch/master/install-neovim.sh