This is an opinionated, optional setup script for Visual Studio Code. It uses Ansible to install recommended extensions and settings.
Intended for developers working on Ubuntu with Visual Studio Code.
- Many developers use Visual Studio Code as their primary IDE.
- It's easy to get lost with the amount of available extensions and settings.
- This installation aims to provide a sane default setup for most developers.
NOTE: Make sure the following commands work with no errors:
sudo apt update
- if this fails you might want to unselect allOther Software
underSoftware & Updates
- under
ddad
:python3 scripts/onboarding/self_check.py
- all should be green sudo snap refresh
- if this fails you might have a brokensnap
daemon or proxy settings set forsnap
. See [Fixing snap]- Your
~/.netrc
should have the following access rights:chmod 600 ~/.netrc
git clone git@github.adx.fcagroup.com:sf33267/ide_setup.git
cd ide_setup
[OPTIONAL BUT RECOMMENDED] Remove all existing extensions as they might conflict with the recommended ones (you can add extensions' IDs to keep under extensions-to-keep.txt):
code --list-extensions | grep -vF -f vars/exclude-extensions.txt | xargs -n 1 code --uninstall-extension
./install
After the installation finishes,
move to your ddad
repository and run the following command:
python3 scripts/onboarding/bootstrap.py --install clangd
If you get a warning about Pylance
conflicting with other extensions select uninstall Pylance
.
You can also install the pre-commit hooks by running the following commands under the ddad
repository:
pip install pre-commit # if not installed
pre-commit install
NOTE: You can find the whole list of plugins under vars/vs_code_extensions.yml.
-
Installs the following LSPs:
- [cpp] clangd
- [starlark] starpls
- [shell] bash-language-server with:
- [python] basedpyright
- [markdown] marksman
-
Installs the following linters:
- [starlark] buildifier
- [shell] shfmt
- [yaml] yamllint
- [python] black
- [github actions] actionlint
- [sql] sqlfluff
-
Backs up and replaces your current user settings with recommended ones: vars/vs_code_settings.json.
-
Installs the recommended extensions from vars/vs_code_extensions.yml.
# Ansible
- redhat.ansible
# Arxml
- jonasrock.arxml-navigationhelper
# Bazel / Starlark
- BazelBuild.vscode-bazel
# c++
- ms-vscode.cpptools
- llvm-vs-code-extensions.vscode-clangd
- xaver.clang-format
- CS128.cs128-clang-tidy
- akiramiyakoda.cppincludeguard
- NathanJ.cppcheck-plugin
- mine.cpplint
# Docker
- ms-azuretools.vscode-docker
- ms-vscode-remote.remote-containers
# Git
- eamodio.gitlens
# Github actions workflows
- arahata.linter-actionlint
- github.vscode-github-actions
# JSON
- ZainChen.json
# Jinja
- samuelcolvin.jinjahtml
# Lua
- sumneko.lua
# Markdown
- DavidAnson.vscode-markdownlint
- yzhang.markdown-all-in-one
# Python
- detachhead.basedpyright
- ms-python.black-formatter
- ms-python.debugpy
- ms-python.isort
- ms-python.mypy-type-checker
- ms-python.pylint
# Shell
- mkhl.shfmt
- timonwong.shellcheck
- mads-hartmann.bash-ide-vscode
# SQL
- dorzey.vscode-sqlfluff
# Toml
- tamasfe.even-better-toml
# UML
- jebbs.plantuml
# YAML / XML
- redhat.vscode-yaml
- redhat.vscode-xml
# Others
- psioniq.psi-header
- jasonnutter.vscode-codeowners
- ms-vscode.remote-explorer
- ms-vscode-remote.remote-ssh
- ms-vscode.remote-server
Feel free to open a PR with suggested changes or improvements.
sudo apt purge snapd
sudo apt install snapd
- if you're not using the proxy then remove:
sudo rm /etc/systemd/system/snapd.service.d/snap_proxy.conf
systemctl daemon-reload && sudo systemctl restart snapd.service
ChatGeepeetee has not been used in the writing of this README