feat(vscode): install VSCode and extensions automatically#61
Conversation
Summary of ChangesHello @chicham, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the automated setup for macOS environments by integrating Visual Studio Code and a curated set of essential extensions. It ensures that developers have a consistent and ready-to-use VSCode environment with necessary tools, streamlining the initial configuration process. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
The pull request successfully automates the installation of Visual Studio Code and its extensions using chezmoi. The logic for idempotency in the extension installation script is good, though it can be optimized for performance. By caching the list of installed extensions, we can avoid the overhead of starting the VSCode CLI multiple times.
| install_extension() { | ||
| # Skip if already installed to avoid redundant network calls | ||
| if code --list-extensions | grep -qi "^$1$"; then | ||
| echo "Already installed: $1" | ||
| else | ||
| echo "Installing: $1" | ||
| code --install-extension "$1" | ||
| fi | ||
| } |
There was a problem hiding this comment.
faf468a to
1cec549
Compare
- Add visual-studio-code to darwin Homebrew casks - Add run_onchange_after_install-vscode-extensions.sh to install Catppuccin theme/icons, Python, Pylance, and Ruff extensions automatically after brew finishes Script hardening: - exit 1 (not 0) when code CLI is missing so chezmoi retries on next apply - capture code --list-extensions output before piping to avoid swallowing failures - use grep -F for literal extension ID matching (dots are not regex wildcards) - explicit error on code --install-extension failure with actionable message Closes #52
1cec549 to
5dabde1
Compare
Summary
visual-studio-codeto the macOS Homebrew casks so it is installed during setup.run_onchange_after_install-vscode-extensions.shto automatically install recommended extensions after brew finishes (using theafter_modifier to guarantee ordering).Extensions installed
Catppuccin.catppuccin-vscCatppuccin.catppuccin-vsc-iconsms-python.pythonms-python.vscode-pylancecharliermarsh.ruffThe script is idempotent (skips already-installed extensions) and exits cleanly if the
codeCLI is not found.Closes #52