If you just want the dotfiles, jump to Install GNU Stow
Prerequisites:
- neovim (latest)
- vim-plug
- zsh
- oh-my-zsh
sudo apt-get update
sudo apt-get upgrade
sudo apt-get update
sudo apt upgrade
sudo apt-get install nodejs
npm install -g eslint
-
keep in mind that you will need to run
npm init
as well aseslint --init
in the root directory of your project for ESLint to work- TODO: figure out a solution for a global config
-
May also need a
jsconfig.json
file located in project root: read more- TODO: figure out a solution for global config
Note: to see the ESLint warnings/errors, you must place your cursor over the underlined variable/expression
- then the error will show in the preview window
- simply putting your cursor on the line is not enough
sudo apt-get install zsh
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
- seleect 'Yes' at the prompt to set it as your default shell
docker run hello-world
-
if on WSL, you may need to configure your Docker Desktop settings
-
Settings > Resources > WSL Integration > Select your distro > Apply & Restart
-
now if you try running the docker command again, you will get a permission denied error
-
to fix the error, run the following commands
sudo groupadd docker
sudo usermod -aG docker ${USER}
- restart terminal
su -s ${USER}
(you will probably get an authentication failure -- I still run the command anyway)- now you should be able to run
docker run hello-world
Note: after you run the Docker commands and restart your terminal, sometimes it sets your shell back to /bin/bash
- to set terminal back to zsh:
chsh -s $(which zsh)
- then restart terminal again
sudo add-apt-repository ppa:neovim-ppa/unstable
sudo apt-get update
sudo apt-get install neovim
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
vi ~/.profile
- add the following lines somewhere in the file to add Homebrew to your path
# in .zshrc
# replace <user> with your linux username
echo 'eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)' >> /home/<user>/.profile
eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)
- source the config
source ~/.zshrc
- test brew installation
brew --version
- install build tools
sudo apt-get install build-essential
brew install gcc
brew install node
- once you have confirmed you can run Docker, run the following to install neovim
brew install neovim --HEAD
-
if you have issues installing with brew, you can try Building Neovim from source
-
if your installation is hanging on
cmake --build .
, check your task manager -
if your CPU is pegged, you may have better luck building from source
- install prerequisites
sudo apt-get install ninja-build gettext libtool libtool-bin autoconf automake cmake g++ pkg-config unzip
- clone the repo
git clone https://github.com/neovim/neovim.git
cd neovim
- build and install
make CMAKE_BUILD_TYPE=RelWithDebInfo
sudo make install
nvim --version
sudo apt-get install vim-gtk
sudo apt-get install xclip
# in .zshrc
# (WSL2-specific setting)
export DISPLAY="$(/sbin/ip route | awk '/default/ { print $3 }'):0"
# in vimrc
set clipboard=unnamedplus
-
Install VcXsrv
-
open XLaunch
- multiple windows > next
- start no client > next
- select all checkboxes > next
- save configuration to
C:\Users\<yourUserName>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
- finish
-
if having issues, you may need to allow Xming and VcXsrv through the firewall
-
Start > Windows Security > Allow an app through firewall
-
Change Settings
-
Tick all boxes for anything Xming and VcXsrv
-
Restart XLaunch
-
Restart Terminal
sudo apt-get install stow
- clone this repo
cd dotfiles
- delete the readme
rm README.md
- delete your .zshrc
rm ~/.zshrc
- apply symlinks
stow *
cd ~
- 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'
- zsh-z
git clone https://github.com/agkozak/zsh-z $ZSH_CUSTOM/plugins/zsh-z
- zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
source ~/.zshrc
- you should see your theme change, and command syntax highlighting should work
vi ~/.config/nvim/init.vim
- install nvim plugins
:PlugInstall
- source the vimrc
so %
- In order for the vim dev icons to work, you will need powerline/nerd fonts installed
- open PowerShell as admin
- clone the fonts repo
git clone https://github.com/powerline/fonts.git
cd fonts
.\install.ps1
-
open Windows Terminal config with CTRL + ,
-
update the
fontFace
setting in the config -
to confirm which fonts are available to Windows, open Settings > Fonts > search for "nerd"
-
"fontFace": "DroidSansMono Nerd Font"
-
update the fonts in WSL
fc-cache -f -v