neovim + lazyvim
This commit is contained in:
parent
87fd722509
commit
1640ebfb45
14
Makefile
14
Makefile
@ -1,10 +1,14 @@
|
||||
# Autogenerated at 24.03.2025 19:24 using ./gen-makefile
|
||||
# Autogenerated at 21.05.2025 20:24 using ./gen-makefile
|
||||
.DEFAULT_GOAL := help
|
||||
|
||||
#===============================================
|
||||
# Scripts listed in ./install
|
||||
#===============================================
|
||||
|
||||
##albert: Install albert (latest) + ppa
|
||||
albert:
|
||||
@./install/albert
|
||||
|
||||
##apache2: Install apache2 (latest)
|
||||
apache2:
|
||||
@./install/apache2
|
||||
@ -85,10 +89,6 @@ kde-file-templates:
|
||||
kde-portal:
|
||||
@./install/kde-portal
|
||||
|
||||
##lazynvim: <no description>
|
||||
lazynvim:
|
||||
@./install/lazynvim
|
||||
|
||||
##libreoffice: Install libreoffice
|
||||
libreoffice:
|
||||
@./install/libreoffice
|
||||
@ -109,6 +109,10 @@ nodejs:
|
||||
ntfy:
|
||||
@./install/ntfy
|
||||
|
||||
##nvim: Install nvim + lazyvim
|
||||
nvim:
|
||||
@./install/nvim
|
||||
|
||||
##obs-studio: Install obs-studio (latest snap)
|
||||
obs-studio:
|
||||
@./install/obs-studio
|
||||
|
@ -3,6 +3,7 @@ set -oe pipefail
|
||||
|
||||
__root__=$( dirname $(readlink -e -- "${BASH_SOURCE}"))
|
||||
source $__root__/helpers/io.sh || exit 255
|
||||
source $__root__/helpers/git.sh || exit 255
|
||||
source $__root__/helpers/basic.sh || exit 255
|
||||
source $__root__/helpers/debug.sh || exit 255
|
||||
source $__root__/helpers/packages.sh || exit 255
|
||||
|
@ -94,7 +94,7 @@ open_url() {
|
||||
# unpack .tar.gz file $1 into path $2
|
||||
unpack_targz() {
|
||||
require tar
|
||||
tar -xzf "$1" -C "$2"
|
||||
tar -xzvf "$1" -C "$2"
|
||||
}
|
||||
|
||||
# make soft symbolic link of path $1 to path $2
|
||||
|
@ -2,7 +2,7 @@
|
||||
_dir=$( dirname $(readlink -e -- "${BASH_SOURCE}"))
|
||||
source "$_dir/io.sh" || exit 255
|
||||
source "$_dir/basic.sh" || exit 255
|
||||
source "$_dir/pkg.sh" || exit 255
|
||||
source "$_dir/packages.sh" || exit 255
|
||||
|
||||
########################################################
|
||||
# Shorthands for git
|
||||
@ -10,7 +10,7 @@ source "$_dir/pkg.sh" || exit 255
|
||||
|
||||
git.clone_quick() {
|
||||
require git
|
||||
git clone --depth=1 --single-branch "$*"
|
||||
git clone --depth=1 --single-branch "$@"
|
||||
}
|
||||
|
||||
git.is_repo() {
|
||||
|
@ -1,64 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# https://www.devas.life/effective-neovim-setup-for-web-development-towards-2024/
|
||||
|
||||
set -eo pipefail
|
||||
trap ontrap SIGINT SIGTERM SIGSTOP
|
||||
|
||||
ontrap() {
|
||||
echo
|
||||
echo "[!] Interrupted"
|
||||
exit
|
||||
}
|
||||
|
||||
[ -z "$1" ] && version=0.10.1 || version="$1"
|
||||
|
||||
filedir="$HOME/install/neovim-$version"
|
||||
filename="nvim-linux64.tar.gz"
|
||||
filepath="$filedir/$filename"
|
||||
configdir="$HOME/.config/nvim"
|
||||
localdir="$HOME/.local"
|
||||
|
||||
echo "[*] Installing neovim v$version"
|
||||
|
||||
if [ -d $configdir ]; then
|
||||
mv $configdir "$configdir.bak-$(date +'%Y%m%d_%H%M%S')"
|
||||
fi
|
||||
|
||||
mkdir -p $filedir $configdir $localdir/{bin,lib,share}
|
||||
|
||||
if [ ! -f $filepath ]; then
|
||||
echo "[*] Downloading to $filepath..."
|
||||
wget -q https://github.com/neovim/neovim/releases/download/v$version/nvim-linux64.tar.gz \
|
||||
-O $filepath \
|
||||
--show-progress
|
||||
fi
|
||||
|
||||
echo "[*] Unpacking: $filepath..."
|
||||
tar -zxf $filepath -C $filedir
|
||||
cp -rf $filedir/nvim-linux64/bin/nvim $localdir/bin/
|
||||
cp -rf $filedir/nvim-linux64/lib/nvim $localdir/lib/
|
||||
cp -rf $filedir/nvim-linux64/share $localdir/share
|
||||
rm -rf $filedir/nvim-linux64
|
||||
|
||||
echo "[*] Reinit git repo..."
|
||||
git clone https://github.com/LazyVim/starter \
|
||||
$configdir \
|
||||
--depth=1 \
|
||||
--single-branch
|
||||
cd $configdir
|
||||
rm -rf .git
|
||||
git init -q
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
33
install/nvim
Executable file
33
install/nvim
Executable file
@ -0,0 +1,33 @@
|
||||
#!/usr/bin/env bash
|
||||
##makedesc: Install nvim + lazyvim
|
||||
source "$( dirname $(readlink -e -- "${BASH_SOURCE}"))/../helpers.sh" || exit 255
|
||||
|
||||
# https://www.lazyvim.org/installation
|
||||
# https://www.devas.life/effective-neovim-setup-for-web-development-towards-2024/
|
||||
|
||||
title
|
||||
|
||||
require git
|
||||
|
||||
nvimUrl="https://github.com/neovim/neovim/releases/latest/download/nvim-linux-x86_64.tar.gz"
|
||||
installPath="$HOME/install"
|
||||
installTar="$installPath/nvim.tar.gz"
|
||||
|
||||
[ -d "$HOME/.config/nvim" ] && mv "$HOME"/.config/nvim{,.bak}
|
||||
[ -d "$HOME/.local/share/nvim" ] && mv "$HOME"/.local/share/nvim{,.bak}
|
||||
[ -d "$HOME/.local/state/nvim" ] && mv "$HOME"/.local/state/nvim{,.bak}
|
||||
[ -d "$HOME/.cache/nvim" ] && mv "$HOME"/.cache/nvim{,.bak}
|
||||
|
||||
download "$nvimUrl" "$installTar"
|
||||
unpack_targz "$installTar" "$installPath"
|
||||
|
||||
sudo rm -vrf /opt/nvim
|
||||
sudo mv -v "$installPath/nvim-linux-x86_64" /opt/nvim
|
||||
|
||||
git.clone_quick https://github.com/LazyVim/starter "$HOME/.config/nvim"
|
||||
rm -rf "$HOME/.config/nvim/.git"
|
||||
|
||||
sudo update-desktop-database && \
|
||||
xdg-desktop-menu forceupdate
|
||||
|
||||
# export PATH="$PATH:/opt/nvim-linux-x86_64/bin"
|
Loading…
x
Reference in New Issue
Block a user