Development Setup
The following contains a list of necessary and optional recommended tools to improve your CRS development experience. Make sure you first install CRS on your machine.
Documentation index — full table of contents.
Necessary Tools¶
pre-commit¶
While it is possible to run this in the container itself, you should perform the following actions in your host shell.
- Change to the root folder
- Install pre-commit
- Configure pre-commit to run on this repo:
- Running the hooks (note:
git commitwill also invoke the hooks for you so no need to run them manually each time):
Setting up VSCode¶
You are of course free to use any text editor of your choosing but most guides here focus on VSCode.
Installation (Ubuntu)¶
Either using snap:
-
sudo snap install --classic codeor downloading the deb: -
Download the VS-Code Binaries here.
- Install it by running
sudo dpkg -i <downloaded_file.deb>
Installation (macOS)¶
Either install using homebrew:
-
brew install visual-studio-codeor download the app: -
Download the VS-Code Binaries here.
- Follow the installer instructions
Setting up the local installation.¶
Once installed, you can start vs-code by executing code in the Terminal. This will start a VS-Code session on your local computer (NOT the docker session!).
We recommend to install the following plugins locally:
- C/C++, C/C++ Extension Pack
- Python
- Clang-Format
- Docker
- Dev Containers
To install the plugins, select the
Fixing Include Path Issues¶
Sometimes, certain files are missing in the c++ include path for vs-code. To fix this, however over the error message and select: Quick Fix, Edit Include Path Settings. Then scroll down to Include Path and add the required files in each line.
For a new installation, make sure that the following is in the include path:
Optional Tools¶
Setting up ZSH with Autocomplete on your development Machine¶
- Install zsh
- Change zsh to the default shell
- Run zsh to set up initial config
- Install oh-my-zsh
- Install the auto-completion plugin
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
- Enable the Plugin
Change plugins=(git) to plugins=(git zsh-autosuggestions)
- Restart the terminal
Install Terminator (ubuntu only)¶
Terminator allows you to have multiple terminal tabs open in the same window.
macOS: On mac there is an abundance of available terminal emulators. While there is nothing wrong with using the provided terminal, if you want pane splitting you can use tmux or look into iTerm2, kitty, etc.