Last active
March 27, 2020 15:56
-
-
Save piersy/c44ac3f592c9bcb617460b1622142912 to your computer and use it in GitHub Desktop.
Setup dev machine
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# need to generate a key for github at this point and add it to github. or do that before. | |
# ssh-keygen -o -a 100 -t ed25519 | |
sudo apt update | |
sudo apt install git build-essentials zsh curl | |
# Install fd | |
mkdir -p bin | |
cd Download | |
wget https://github.com/sharkdp/fd/releases/download/v7.4.0/fd_7.4.0_amd64.deb | |
sudo dpkg -i fd_7.4.0_amd64.deb | |
cd ~ | |
cd ~ | |
mkdir -p projects | |
cd projects | |
# Install dotfiles | |
git clone git@github.com:piersy/dotfiles.git --recursive | |
cd ~ | |
ln -s projects/dotfiles/.bash_profile | |
ln -s projects/dotfiles/.zshrc | |
ln -s projects/dotfiles/.gitconfig | |
## Switch default shell to zsh (requires logout and login to take effect) | |
chsh -s $(which zsh) | |
# Install go | |
CURRENT_DIR=$(pwd) | |
mkdir programs | |
GOVERSION=1.13.8 | |
## use wget in quiet mode and pipe over stdout to tar | |
wget -q -O - https://dl.google.com/go/go${GOVERSION}.linux-amd64.tar.gz | tar -C programs -xzvf - | |
mv programs/go programs/go${GOVERSION} | |
cd /usr/local | |
sudo ln --force -s ${CURRENT_DIR}/programs/go${GOVERSION} go | |
cd | |
## Update path so we can use go | |
export PATH=$PATH:/usr/local/go/bin | |
# Install fzf | |
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf && ~/.fzf/install --no-update-rc --key-bindings --completion | |
# Install nvim | |
cd ~ | |
mkdir -p bin | |
NVIM_VERSION=0.4.3 | |
cd bin | |
wget -O nvim.appimage_${NVIM_VERSION} https://github.com/neovim/neovim/releases/download/v${NVIM_VERSION}/nvim.appimage | |
chmod +x nvim.appimage_${NVIM_VERSION} | |
ln -s nvim.appimage_${NVIM_VERSION} vim | |
cd ~ | |
git clone git@github.com:piersy/nvim.git .config/nvim | |
## Install plug vim | |
curl -fLo .config/nvim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim | |
## Install plugins and quit immediately | |
./bin/nvim.appimage_0.4.3 +PlugInstall +qall | |
# Setup CocSnippets and install go binaries | |
./bin/nvim.appimage_0.4.3 +CocInstall coc-snippets +GoInstallBinaries +qall | |
## Install gopls | |
go get -v golang.org/x/tools/gopls | |
## required by coc nvim | |
sudo apt install nodejs npm | |
## required for clipboard copy and yank to work | |
sudo apt install xclip |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment