From 1ba96a4b7f2940c36ec424f3b94fc90cabdc5954 Mon Sep 17 00:00:00 2001 From: Yann Date: Thu, 11 Apr 2024 10:58:15 +0200 Subject: [PATCH] Add: install neovim script --- install-neovim.sh | 75 +++++++++++++++++++++++++++++++++++++++++++++++ install.sh | 2 ++ 2 files changed, 77 insertions(+) create mode 100755 install-neovim.sh diff --git a/install-neovim.sh b/install-neovim.sh new file mode 100755 index 0000000..e1a1af0 --- /dev/null +++ b/install-neovim.sh @@ -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 diff --git a/install.sh b/install.sh index d69a190..5fb261f 100644 --- a/install.sh +++ b/install.sh @@ -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