feat(vscode-desktop): add extensions and settings pre-installation#926
Open
lsrtech wants to merge 1 commit into
Open
feat(vscode-desktop): add extensions and settings pre-installation#926lsrtech wants to merge 1 commit into
lsrtech wants to merge 1 commit into
Conversation
Closes coder#207 Add the ability to pre-install VS Code extensions and apply machine-level settings on the remote host when the workspace starts. New variables: - extensions: list of extension IDs to pre-install (e.g. ms-python.python) - settings: map of machine-level VS Code settings, merged with existing - extensions_dir: override the extensions storage directory The installation script: - Reuses an existing VS Code CLI if found (from previous connection or vscode-web module), otherwise downloads VS Code Server - Installs extensions to ~/.vscode-server/extensions/ - Writes settings to ~/.vscode-server/data/Machine/settings.json - Merges with existing settings using jq or python3, with fallback No changes to vscode-desktop-core; all new functionality is contained in the wrapper module, following the pattern used by the cursor module for MCP configuration.
matifali
requested changes
Jun 16, 2026
matifali
left a comment
Member
There was a problem hiding this comment.
Each IDE stores extensions in a different server directory: VS Code Desktop uses ~/.vscode-server/, Cursor uses ~/.cursor-server/, Windsurf uses ~/.windsurf-server/, etc. A single core-level implementation cannot cleanly handle these divergent paths.
I believe that it's possible to handle the per IDE path in the vscode-desktop-core module.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat(vscode-desktop): add extensions and settings pre-installation
Description
Closes #207
Adds the ability to pre-install VS Code extensions and apply machine-level settings on the remote host when a Coder workspace starts. Extensions are ready when the user opens VS Code Desktop for the first time — no manual installation needed.
Type of Change
Module Information
Path:
registry/coder/modules/vscode-desktopNew version:
v1.3.0Breaking change: [ ] Yes [x] No
What Changed
New Variables
extensionslist(string)[]ms-python.python)settingsmap(any){}extensions_dirstring""How It Works
A
coder_scriptresource (install-extensions.sh) runs on workspace start when extensions or settings are specified:Settings — Written to
~/.vscode-server/data/Machine/settings.json. Merges with existing settings usingjqorpython3(with overwrite fallback).Extensions — Installed to
~/.vscode-server/extensions/:vscode-webmodule)--install-extension --forceNo-op when unused — The script resource is not created when both
extensionsandsettingsare empty (count = 0).Architecture Decision
All new functionality is contained in the
vscode-desktopwrapper module — no changes tovscode-desktop-core. This is intentional and addresses the "let's solve this systematically for all VS Code-based IDEs" point raised in #207:~/.vscode-server/, Cursor uses~/.cursor-server/, Windsurf uses~/.windsurf-server/, etc. A single core-level implementation cannot cleanly handle these divergent paths.vscode-webandcode-servermodules (each installs extensions via--install-extensionand merges machine settings in its ownrun.sh). Consistency with the existing, merged approach.extensions_dirvariable is exposed (per maintainer request in Feature: Pre-Install VS Code extensions in desktop VS Code module #218) so the same script can be reused by Cursor/Windsurf/Kiro wrappers in follow-up PRs simply by pointing at their server directory.This keeps the shared core module stable while resolving #207 directly.
Addressing #218's review feedback
The previous attempt (#218, closed) was blocked because it assumed the VS Code CLI was already present. This implementation:
vscode-webmodule) and reuses itUsage
Testing & Validation
bun test)