Skip to content

Feature: Pre-Install VS Code extensions in desktop VS Code module #218

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

yashksaini-coder
Copy link

/claim #207

Closes #207

Description

  • Add extensions parameter to automatically install the VS-Code extensions
  • Add settings parameter for workspace-specific configuration
  • Create setup.sh script to install extensions & settings management
  • Add validation for extension format (publisher.extension-name)
  • Update test to the coverage for new features
  • Support graceful fallback when VS Code CLI is unavailable

This pull request introduces functionality to automate the setup of Visual Studio Code (VS Code) workspaces, including the installation of extensions and configuration of workspace settings. It adds new Terraform variables and resources, a setup script, and corresponding tests to ensure proper behavior.

Terraform Module Enhancements:

  • Added extensions, settings, and install_extensions variables to allow users to specify VS Code extensions, workspace settings, and control automatic installation behavior. Validation ensures proper formatting for extensions. (registry/coder/modules/vscode-desktop/main.tf, registry/coder/modules/vscode-desktop/main.tfR41-R85)
  • Introduced a coder_script resource that dynamically creates a setup script to install extensions and configure settings when applicable. (registry/coder/modules/vscode-desktop/main.tf, registry/coder/modules/vscode-desktop/main.tfR41-R85)

Setup Script:

  • Implemented a comprehensive Bash script (setup.sh) to handle the installation of extensions, configuration of workspace settings, and creation of extension recommendations. The script includes robust error handling, logging, and validation mechanisms. (registry/coder/modules/vscode-desktop/setup.sh, registry/coder/modules/vscode-desktop/setup.shR1-R267)

Documentation Updates:

Testing:

Type of Change

  • New module
  • Bug fix
  • Feature/enhancement
  • Documentation
  • Other

Module Information

Path: registry/coder/modules/vscode-desktop
New version: v1.0.0
Breaking change: [ ] Yes [X] No

Testing & Validation

  • Tests pass (bun test)
  • Code formatted (bun run fmt)
  • Changes tested locally

Related Issues

None

@yashksaini-coder
Copy link
Author

@matifali can you please review the PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pre-install VS Code extensions in desktop VS Code module
1 participant