Refactor neovim install based on primeagen's version

This commit is contained in:
david pickle 2025-01-12 15:34:45 -06:00
parent 7cda3112e0
commit 1610999770
2 changed files with 36 additions and 7 deletions

View File

@ -1,5 +1,10 @@
#!/bin/zsh #!/bin/zsh
[[ ! -d $HOME/bin ]] && mkdir $HOME/bin
[[ ! -d $HOME/.config ]] && mkdir $HOME/.config [[ ! -d $HOME/.config ]] && mkdir $HOME/.config
[[ ! -d $HOME/.local ]] && mkdir $HOME/.local [[ ! -d $HOME/.local ]] && mkdir $HOME/.local
[[ ! -d $HOME/.local/bin ]] && mkdir $HOME/.local/bin
[[ ! -d $HOME/.local/build ]] && mkdir $HOME/.local/build
[[ ! -d $HOME/.local/tmp ]] && mkdir $HOME/.local/tmp
# [[ ! -d $HOME/dbox ]] && mkdir $HOME/dbox
[[ ! -d $HOME/dev ]] && mkdir $HOME/dev

View File

@ -1,8 +1,32 @@
#!/bin/zsh #!/bin/zsh
neovim_dir=$HOME/bin/neovim install_command="sudo apt install"
git clone -b v0.10.3 https://github.com/neovim/neovim.git $neovim_dir [[ -x $(which brew) ]] && install_command="brew install"
brew install cmake gettext lua5.1 liblua5.1-0-dev
cd $neovim_dir neovim_dir=$HOME/.local/build/neovim
make CMAKE_BUILD_TYPE=RelWithDebInfo neovim_version="v0.10.3"
sudo make install [ ! -z $NVIM_VERSION ] && neovim_version="$NVIM_VERSION"
echo "neovim_version: \"$neovim_version\""
[ ! -d $neovim_dir ] && git clone https://github.com/neovim/neovim.git $neovim_dir
git -C $neovim_dir fetch --all
git -C $neovim_dir checkout $neovim_version
$install_command cmake gettext lua@5.1 liblua5.1-0-dev
make -C $neovim_dir clean
make -C $neovim_dir CMAKE_BUILD_TYPE=RelWithDebInfo
sudo make -C $neovim_dir install
# lines below from primeagen's dev repo, uncomment/edit as needed
# git clone https://github.com/ThePrimeagen/harpoon.git $HOME/personal/harpoon
# cd $HOME/personal/harpoon
# git fetch
# git checkout harpoon2
# git clone https://github.com/ThePrimeagen/vim-apm.git $HOME/personal/vim-apm
# git clone https://github.com/ThePrimeagen/vim-with-me.git $HOME/personal/vim-with-me
# git clone https://github.com/ThePrimeagen/vim-arcade.git $HOME/personal/vim-arcade
# git clone https://github.com/ThePrimeagen/caleb.git $HOME/personal/caleb
# git clone https://github.com/nvim-lua/plenary.nvim.git $HOME/personal/plenary