This repository contains installation scripts and configuration files for setting up the VSCode
editor from scratch. The configuration files inside the dotfiles/.config/Code
are pretty
opinionated. They are suitable for embedded Zephyr/NCS development, writing Python scripts and
JavaScript/React Native applications.
The configuration is especially coupled to our .pre-commit-config.yaml
file in the
irnas-zephyr-template repo, as it sets up formatters, linters and other tools that are used by the
pre-commit
tool.
Currently supported operating systems:
- Linux (specifically Ubuntu)
- MacOS
-
To install VsCode run:
./installation_scripts/install_vscode.sh
-
To install LLVM tools run (make sure that all instances of VSCode are closed at this point):
./installation_scripts/install_llvm.sh
You can setup configuration in two ways.
- Open VSCode.
- Select cogwheel icon on the bottom-left.
- Navigate through Profiles -> Import Profile -> Select File and select
irnas.code-profile
file in this repo. - Click Create Profile button on the bottom-left.
- Choose a name for the profile and then click Create button.
The configuration and extensions will be applied to the VSCode editor.
With this approach you need to make sure that you have somewhat latest version of the node
installed on your machine. To install extensions and symlink VSCode settings to its correct location
run:
./installation_scripts/install_extensions.sh
cd dotfiles
./place_dotfiles.sh
Users can maintain two Profiles inside the VSCode:
irnas
- This should be the one provided by this repo.- and custom user Profile, built on top of the
irnas
one.
Whenever this repository is updated users can update the user
Profile and then bring desired
changes to their custom Profile.
place_dotfiles.sh
creates a symlink for the .config/Code
alongside it to its correct location in
the ~/
home directory.
This means that whatever changes are made in the ~/.config/Code
, they are reflected in this
repository and thus visible in the git
version control system.
Developers can thus:
- fork this repo to their personal GitHub account,
- start with a good working VSCode configuration,
- expand it further by their preferences, commit changes and
- sync with the upstream repo, when they want to fetch new commits.
Developers can also manually copy the things that they want and manually update when they want to.
If you care about your current VSCode configuration you may want to backup below folders:
On Windows:
%APPDATA%\Code
%USERPROFILE%\.vscode
On Linux and macOS:
$HOME/.config/Code/
$HOME/.vscode