Skip to content

Latest commit

 

History

History
163 lines (105 loc) · 3.49 KB

File metadata and controls

163 lines (105 loc) · 3.49 KB

Visual Studio Code

Visual Studio Code is the primary code editor for this setup.

The tool is installed through Homebrew and declared in the project Brewfile.

Installation

It is part of the curated Homebrew environment; see Homebrew setup to install everything at once.

Install Visual Studio Code with Homebrew:

brew install --cask visual-studio-code

Verify the installation:

brew list --cask | grep -x visual-studio-code

test -d "/Applications/Visual Studio Code.app" \
  && echo "Visual Studio Code application found."

code --version

The code command must be available in the shell.

Configuration

The shared VS Code settings are stored in:

configs/vscode/settings.json

They contain only generic and reusable preferences. Personal themes, account-dependent extensions, project-specific paths, and local container names are intentionally excluded.

Shared VS Code settings JSON

Recommended extensions

Recommended extensions are listed in:

configs/vscode/extensions.txt

They cover the main PHP and Symfony development workflow:

  • PHP language support with Intelephense
  • path autocompletion
  • Git history and annotations
  • GitHub Actions support
  • PHP namespace imports
  • PHPStan integration
  • Twig support
  • Xdebug integration
  • DotEnv syntax support
  • YAML validation and completion

Install them with the CLI:

mac vscode

Or run the script directly:

./scripts/install-vscode-extensions.sh

The command is idempotent and skips extensions that are already installed.

Recommended VS Code extensions installed

Optional extensions

Optional extensions are listed separately in:

configs/vscode/extensions-optional.txt

They include personal, visual, AI-assisted, and specialized workflow extensions.

Install both recommended and optional extensions with:

mac vscode --with-optional

Or run the script directly:

./scripts/install-vscode-extensions.sh --with-optional

Project-specific settings

Settings tied to a single project must not be stored in the global VS Code user configuration.

Examples include:

  • Docker container names
  • PHPUnit commands
  • PHPStan binary paths
  • project-specific formatter rules
  • workspace folder mappings
  • Symfony console paths

These settings should instead be stored in the relevant project's .vscode/settings.json file when appropriate.

Validation

Validate the shared settings:

node -e 'JSON.parse(require("fs").readFileSync("configs/vscode/settings.json", "utf8"))'

Validate the installation script:

shellcheck scripts/install-vscode-extensions.sh

Test the extension installation:

./scripts/install-vscode-extensions.sh
./scripts/install-vscode-extensions.sh --with-optional

Rollback

Uninstall Visual Studio Code managed by Homebrew:

brew uninstall --cask visual-studio-code

The VS Code user configuration is stored separately under:

~/Library/Application Support/Code/User

Uninstalling the application does not automatically remove these user settings.

To remove one extension:

code --uninstall-extension publisher.extension

To remove a shared configuration file from this repository, delete it and restore the previous version through Git.


← Docs index · Project README