Skip to content

Instantly share code, notes, and snippets.

@tykurtz
Last active April 1, 2021 05:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tykurtz/d53670e0142b92d49b364af41b45a119 to your computer and use it in GitHub Desktop.
Save tykurtz/d53670e0142b92d49b364af41b45a119 to your computer and use it in GitHub Desktop.
Dev environment setup for spacemacs with c++ dev

Install spacemacs

sudo apt install -y emacs git
git clone -b develop https://github.com/syl20bnr/spacemacs ~/.emacs.d
wget -O ~/.spacemacs https://gist.githubusercontent.com/tykurtz/41c6d7b0930b9f8b107265ab895114a4/raw/e0e5f4bba3692b9746d27c377e5eddd81a7cd1e2/.spacemacs
emacs --batch -l ~/.emacs.d/init.el --eval="(configuration-layer/update-packages t)"  # Layer initialization before launch

Install ccls (code completion, navigation, etc.)

Add to ~/.bashrc

# Combines multiple compile_commands.json into a single file at project root.
ccls-ros-merge(){
    cat ./**/**/compile_commands.json > compile_commands.json && sed -i -e ':a;N;$!ba;s/\n\]\[\n/,\n/g' compile_commands.json
}

Misc. Setup

Install misc. software

sudo apt install -y spotify-client byobu

SSH

Add

ForwardX11 yes
Compression yes

to ~/.ssh/config

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment