VS Code extensions
Extensions are large and live in HOME by default. 42space moves them to
goinfre (~/.vscode/extensions becomes a link) and records them, so every
machine installs the same ones.
Adopt what you already have
42space scan
42space review
The scan offers to move ~/.vscode/extensions to goinfre without
re-downloading anything, and records every extension with its version and
release channel.
Add, remove and inspect
42space add vscode:esbenp.prettier-vscode
42space remove vscode:esbenp.prettier-vscode
42space vscode # version, channel, profiles and install state of each extension
Pre-release channel
42space add vscode:ms-python.python --pre-release # follow pre-releases
42space add vscode:ms-python.python --stable # back to stable releases
Changing channel drops the old lock entry, so the next sync fetches the newest version on the new channel. New machines install the locked version, pre-releases included.
Profiles
42space add vscode:ms-python.python --profile Python
42space add vscode:esbenp.prettier-vscode --profile Web --profile Default
42space remove vscode:esbenp.prettier-vscode --profile Web # keep it in the others
42space vscode profiles # profiles VS Code knows, and which ones the manifest needs
- Without
--profile, an extension goes to the default profile.Defaultnames it explicitly. - Profiles are created in VS Code (Manage › Profiles). They live in
~/.config/Code, which is in HOME, so they follow you. 42space doctorfails when the manifest uses a profile that doesn't exist.
Updates made by VS Code
VS Code updates extensions by itself. A version newer than the lock counts as an update: 42space keeps it and moves the lock forward, so your other machines follow. Only missing, corrupt or older installs are reinstalled.
In the manifest
~/.config/42space/tools.d/vscode-extensions.toml
packages = ["esbenp.prettier-vscode", "ms-python.python"]
[package_options."ms-python.python"]
pre_release = true
profiles = ["Python"]