feat: manage versions with asdf
This commit is contained in:
12
install/install-asdf.sh
Executable file
12
install/install-asdf.sh
Executable file
@ -0,0 +1,12 @@
|
||||
if [ -d ~/.asdf ] ; then
|
||||
|
||||
echo " ✓ asdf already installed"
|
||||
|
||||
else
|
||||
|
||||
git clone --quiet https://github.com/asdf-vm/asdf.git ~/.asdf > /dev/null
|
||||
cd ~/.asdf
|
||||
git checkout --quiet "$(git describe --abbrev=0 --tags)" > /dev/null
|
||||
. asdf.sh
|
||||
|
||||
fi
|
@ -1,46 +0,0 @@
|
||||
#!/bin/bash -e
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
# Make config directory for Neovim's init.vim
|
||||
echo '[*] Preparing Neovim config directory ...'
|
||||
mkdir -p ~/.config/nvim
|
||||
|
||||
# Install nvim (and its dependencies: pip3, git), Python 3 and ctags (for tagbar)
|
||||
echo '[*] App installing Neovim and its dependencies (Python 3 and git), and dependencies for tagbar (exuberant-ctags) ...'
|
||||
sudo apt update
|
||||
sudo apt install neovim python3 python3-pip python3-venv git curl exuberant-ctags -y
|
||||
|
||||
# Install virtualenv to containerize dependencies
|
||||
echo '[*] Pip installing venv to containerize Neovim dependencies (instead of installing them onto your system) ...'
|
||||
python3 -m venv ~/.config/nvim/env
|
||||
|
||||
# Install pip modules for Neovim within the virtual environment created
|
||||
echo '[*] Activating virtualenv and pip installing Neovim (for Python plugin support), libraries for async autocompletion support (jedi, psutil, setproctitle), and library for pep8-style formatting (yapf) ...'
|
||||
source ~/.config/nvim/env/bin/activate
|
||||
pip install pynvim jedi psutil setproctitle yapf doq # run `pip uninstall neovim pynvim` if still using old neovim module
|
||||
deactivate
|
||||
|
||||
# Install vim-plug plugin manager
|
||||
echo '[*] Downloading vim-plug, the best minimalistic vim plugin manager ...'
|
||||
curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||
|
||||
# (Optional but recommended) Install a nerd font for icons and a beautiful airline bar (https://github.com/ryanoasis/nerd-fonts/tree/master/patched-fonts) (I'll be using Iosevka for Powerline)
|
||||
echo "[*] Downloading patch font into ~/.local/share/fonts ..."
|
||||
curl -fLo ~/.fonts/Iosevka\ Term\ Nerd\ Font\ Complete.ttf --create-dirs https://github.com/ryanoasis/nerd-fonts/raw/master/patched-fonts/Iosevka/Regular/complete/Iosevka%20Term%20Nerd%20Font%20Complete.ttf
|
||||
|
||||
# (Optional) Alias vim -> nvim
|
||||
echo '[*] Aliasing vim -> nvim, remember to source ~/.bashrc ...'
|
||||
echo "alias vim='nvim'" >>~/.bashrc
|
||||
|
||||
# Enter Neovim and install plugins using a temporary init.vim, which avoids warnings about missing colorschemes, functions, etc
|
||||
echo -e '[*] Running :PlugInstall within nvim ...'
|
||||
sed '/call plug#end/q' ../configs/init.vim >~/.config/nvim/init.vim
|
||||
nvim -c ':PlugInstall' -c ':UpdateRemotePlugins' -c ':qall'
|
||||
rm ~/.config/nvim/init.vim
|
||||
|
||||
# Copy init.vim in current working directory to nvim's config location ...
|
||||
echo '[*] Linking init.vim -> ~/.config/nvim/init.vim'
|
||||
cd ..
|
||||
ln -s $(pwd)/configs/init.vim ~/.config/nvim/init.vim
|
||||
|
||||
echo -e "[+] Done, welcome to \033[1m\033[92mNeoVim\033[0m! Try it by running: nvim/vim. Want to customize it? Modify ~/.config/nvim/init.vim"
|
15
install/install-nvim.sh
Executable file
15
install/install-nvim.sh
Executable file
@ -0,0 +1,15 @@
|
||||
if [ -f "$HOME/.config/nvim/init.vim" ]; then
|
||||
echo " - moving old file to init.vim.BAK"
|
||||
mv "$HOME/.config/nvim/init.vim" "$HOME/.config/nvim/init.vim.BAK"
|
||||
fi
|
||||
|
||||
echo " - linking init.vim --> init.vim"
|
||||
mkdir -p $HOME/.config/nvim
|
||||
ln -s "$HOME/.dotfiles/configs/init.vim" "$HOME/.config/nvim/init.vim"
|
||||
|
||||
echo " - installing vim-plug"
|
||||
sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
|
||||
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
|
||||
|
||||
echo " - installing vim plugins"
|
||||
nvim --headless +PlugInstall +q
|
0
install/oh-my-zsh.sh
Normal file → Executable file
0
install/oh-my-zsh.sh
Normal file → Executable file
4
install/p10k.sh
Normal file → Executable file
4
install/p10k.sh
Normal file → Executable file
@ -1,3 +1,3 @@
|
||||
echo " - cloning github.com/zsh-users/zsh-autosuggestions into ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k"
|
||||
echo " - cloning github.com/romkatv/powerlevel10k into ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k"
|
||||
git clone --quiet --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k > /dev/null
|
||||
echo " - finished"
|
||||
echo " - finished"
|
||||
|
0
install/zsh-autosuggestions.sh
Normal file → Executable file
0
install/zsh-autosuggestions.sh
Normal file → Executable file
Reference in New Issue
Block a user