42 lines
1.1 KiB
Bash
Executable File
42 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
# This file is still a work in progress
|
|
# it mostly works if you tinker with uncommenting
|
|
# the function calls
|
|
ZLS_VERSION=master
|
|
|
|
function zls-install {
|
|
mkdir -p ~/.local/bin
|
|
if [[ ! -d /tmp/zls ]]; then git clone https://github.com/zigtools/zls /tmp/zls; fi
|
|
cd /tmp/zls
|
|
git checkout ${ZLS_VERSION}
|
|
zig build -Doptimize=ReleaseSafe
|
|
cp zig-out/bin/zls ~/.local/bin/zls
|
|
cd -
|
|
}
|
|
|
|
function ycm-install {
|
|
echo "Installing ycm deps"
|
|
sudo dnf install -y cmake python3-devel gcc gcc-c++ nodejs-npm
|
|
}
|
|
|
|
function setup {
|
|
mkdir -p ~/.vim/
|
|
mkdir -p ~/.vim/autoload ~/.vim/bundle
|
|
|
|
curl -LSso ~/.vim/autoload/plug.vim https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
|
# Setup plugins
|
|
# YouCompleteMe
|
|
if [[ ! -d ~/.vim/bundle/YouCompleteMe ]]; then
|
|
git clone https://github.com/ycm-core/YouCompleteMe.git ~/.vim/bundle/YouCompleteMe
|
|
cd ~/.vim/bundle/YouCompleteMe
|
|
git submodule update --init --recursive || cd -
|
|
# dnf install cmake node-npm python3-devel gcc gcc-c++
|
|
cd -
|
|
fi
|
|
}
|
|
|
|
#setup
|
|
#ycm-install
|
|
#zls-install
|
|
"$@"
|