AudioLab VS Code Settings¶
Comprehensive VS Code configuration for AudioLab audio plugin development.
📁 Files Overview¶
| File | Purpose | Scope |
|---|---|---|
settings.json |
Workspace settings for AudioLab project | Project-specific |
settings.global.json |
User preferences and personal settings | User-wide |
install-settings.ps1 |
Automated installation script | Deployment |
README.md |
Documentation | Reference |
🚀 Quick Start¶
Automatic Installation (Recommended)¶
# Install all settings (workspace + user)
.\install-settings.ps1
# Install only workspace settings
.\install-settings.ps1 -Mode workspace
# Preview changes without applying
.\install-settings.ps1 -DryRun
# Force installation without prompts
.\install-settings.ps1 -Force
Manual Installation¶
Workspace Settings¶
- Copy
settings.jsontoC:\AudioDev\audio-lab\.vscode\settings.json - Restart VS Code
User Settings¶
- Open VS Code user settings:
Ctrl+,→ Click{}(Open Settings JSON) - Merge contents from
settings.global.jsoninto your user settings - Save and restart VS Code
📋 What's Included¶
Workspace Settings (settings.json)¶
Configured for AudioLab development:
C++ Development¶
- Standard: C++20 / C17
- Compiler: MinGW-w64 GCC (MSYS2)
- IntelliSense: Full project indexing
- Include Paths:
- FOUNDATION layer
- COMPONENTS layer
- PRODUCTS layer
- vcpkg packages
- Defines: Windows-specific audio development macros
CMake Integration¶
- Generator: Ninja (fast builds)
- Toolchain: vcpkg integration
- Build Directory:
${workspaceFolder}/build - Configure on Open: Disabled (manual control)
- Export Compile Commands: Enabled (for Clangd)
File Associations¶
Audio and DSP file formats recognized:
- .dsp, .faust → C++
- .pd, .maxpat, .vstpreset → JSON
- Binary audio files (.wav, .aiff, .flac) → Binary viewer
Code Formatting¶
- Tabs: 4 spaces (enforced)
- Format on Save: Enabled
- Rulers: 80, 100, 120 columns
- Formatter: Clangd (LLVM style)
- Line Endings: LF (Unix-style)
Git Integration¶
- Auto-fetch enabled
- Smart commit
- Trim whitespace on save
- Insert final newline
Terminal Configuration¶
Multiple profiles available: - PowerShell (default) - Command Prompt - MSYS2/MinGW64 (for Unix-like tools)
Performance Optimizations¶
- Build directory excluded from file watcher
- Search excludes build artifacts
- Large file support (4GB+)
- Incremental search cache
User Settings (settings.global.json)¶
Personal preferences and global configuration:
Theme & Appearance¶
- Theme: Default Dark Modern (customizable)
- Font: Cascadia Code / Fira Code / JetBrains Mono
- Font Size: 13px (editor), 12px (terminal)
- Ligatures: Enabled
- Smooth Scrolling: Enabled
Editor Behavior¶
- Cursor: Smooth blinking line cursor
- Auto Save: On focus change
- Tab Completion: Enabled
- Parameter Hints: Enabled
- Semantic Highlighting: Enabled
Audio Development¶
- Default Sample Rate: 48kHz
- Default Buffer Size: 512 samples
- Bit Depth: 24-bit
- Plugin Paths: VST3, AAX, CLAP, AU
Environment Variables¶
AUDIOLAB_ROOT=C:\AudioDev\audio-lab
VCPKG_ROOT=C:\vcpkg
AUDIOLAB_BUILD_DIR=C:\AudioDev\audio-lab\build
🔧 Customization Guide¶
Changing Compiler¶
Edit settings.json:
{
"C_Cpp.default.compilerPath": "C:/path/to/your/compiler.exe",
"C_Cpp.default.intelliSenseMode": "windows-gcc-x64" // or windows-clang-x64
}
Adding Include Paths¶
Changing Theme¶
Edit settings.global.json:
Adjusting Font¶
{
"editor.fontFamily": "'JetBrains Mono', 'Fira Code', monospace",
"editor.fontSize": 14,
"editor.fontLigatures": true
}
CMake Generator¶
{
"cmake.generator": "Ninja", // Fast
"cmake.generator": "Visual Studio 17 2022", // MSVC
"cmake.generator": "Unix Makefiles" // Make
}
📦 Required Extensions¶
Essential¶
- C/C++ (
ms-vscode.cpptools) - CMake Tools (
ms-vscode.cmake-tools) - Clangd (
llvm-vs-code-extensions.vscode-clangd)
Recommended¶
- vcpkg CMake Tools (
JackBoosY.vcpkg-cmake-tools) - GitLens (
eamodio.gitlens) - Better Comments (
aaron-bond.better-comments) - Doxygen Documentation Generator (
cschlosser.doxdocgen) - Error Lens (
usernamehw.errorlens) - Markdown All in One (
yzhang.markdown-all-in-one)
Install all recommended extensions:
# Using VS Code CLI
code --install-extension ms-vscode.cpptools
code --install-extension ms-vscode.cmake-tools
code --install-extension llvm-vs-code-extensions.vscode-clangd
code --install-extension JackBoosY.vcpkg-cmake-tools
🛠️ Installation Script Reference¶
install-settings.ps1¶
Full-featured installation automation.
Parameters¶
| Parameter | Type | Default | Description |
|---|---|---|---|
-Mode |
String | all |
workspace, user, or all |
-BackupDir |
String | ./backups |
Custom backup location |
-Force |
Switch | - | Skip confirmation prompts |
-DryRun |
Switch | - | Preview without changes |
Examples¶
# Standard installation
.\install-settings.ps1
# Workspace only (safe, no user settings touched)
.\install-settings.ps1 -Mode workspace -Force
# Preview what would change
.\install-settings.ps1 -DryRun
# Custom backup location
.\install-settings.ps1 -BackupDir "D:\Backups\VSCode"
# User settings only
.\install-settings.ps1 -Mode user
What It Does¶
- Validates Prerequisites
- Checks for source files
-
Verifies AudioLab root
-
Creates Backups
- Timestamped backup directory
- Copies existing settings before modification
-
Format:
backups/YYYYMMDD_HHMMSS/settings.json -
Installs Settings
- Workspace: Direct copy to
.vscode/settings.json -
User: Intelligent merge into global settings
-
Verifies Installation
- JSON syntax validation
- File presence checks
-
Reports backup count
-
Summary Report
- Success/failure status
- Backup location
- Next steps
📖 Settings Explained¶
Key Workspace Settings¶
C++ IntelliSense¶
{
"C_Cpp.default.cppStandard": "c++20",
"C_Cpp.errorSquiggles": "enabled",
"C_Cpp.intelliSenseEngine": "default"
}
Why: Modern C++ features (concepts, modules, ranges) require C++20. Error squiggles catch issues early.
CMake Configure on Open¶
Why: Manual control prevents unwanted CMake runs when opening the workspace. Configure explicitly when ready.
File Exclusions¶
Why: Reduces file watcher overhead, speeds up search, declutters explorer.
Format on Save¶
{
"editor.formatOnSave": true,
"[cpp]": {
"editor.defaultFormatter": "llvm-vs-code-extensions.vscode-clangd"
}
}
Why: Enforces consistent code style automatically. Clangd uses .clang-format rules.
Terminal Profiles¶
{
"terminal.integrated.profiles.windows": {
"MSYS2": {
"path": "C:\\msys64\\usr\\bin\\bash.exe",
"env": { "MSYSTEM": "MINGW64" }
}
}
}
Why: MSYS2 provides Unix-like environment (bash, make, etc.) needed for cross-platform builds.
Key User Settings¶
Auto Save¶
Why: Prevents lost work when switching windows/terminals. Saves on blur.
Editor Limits¶
Why: Limits open editors to reduce memory usage on large projects.
Read-Only Audio Files¶
Why: Prevents accidental modification of binary audio test files.
🐛 Troubleshooting¶
IntelliSense Not Working¶
Problem: Red squiggles, missing completions
Solutions:
-
Check compiler path:
-
Verify vcpkg:
-
Reload IntelliSense:
Ctrl+Shift+P→ "C/C++: Reset IntelliSense Database"-
Restart VS Code
-
Check include paths:
Ctrl+Shift+P→ "C/C++: Edit Configurations (UI)"- Verify include paths match your setup
CMake Not Configuring¶
Problem: CMake configure fails
Solutions:
-
Check CMake toolchain:
-
Verify Ninja:
-
Manual configure:
-
Check CMake output panel:
- View → Output → Select "CMake/Build"
Format on Save Not Working¶
Problem: Code doesn't format on save
Solutions:
- Install Clangd extension
-
Check formatter setting:
-
Verify
.clang-formatexists in project root - Check Clangd status: Bottom-right of VS Code
Settings Not Applying¶
Problem: Changes don't take effect
Solutions:
- Check settings precedence:
-
User Settings < Workspace Settings < Folder Settings
-
View merged settings:
Ctrl+Shift+P→ "Preferences: Open Settings (JSON)"-
Compare with
settings.json -
Clear settings cache:
- Close VS Code
- Delete
%APPDATA%\Code\User\globalStorage -
Restart VS Code
-
Check for JSON errors:
- Look for red underlines in settings files
- Validate with JSON linter
Terminal Not Working¶
Problem: MSYS2 terminal won't start
Solutions:
-
Verify MSYS2 installation:
-
Check environment variables:
-
Use PowerShell instead:
Backup Restoration¶
Problem: Need to restore old settings
Solution:
Backups are stored in settings/backups/YYYYMMDD_HHMMSS/
# List backups
Get-ChildItem .\backups
# Restore workspace settings
Copy-Item .\backups\20250104_123456\settings.json C:\AudioDev\audio-lab\.vscode\
# Restore user settings
Copy-Item .\backups\20250104_123456\settings.json $env:APPDATA\Code\User\
🎯 Best Practices¶
DO ✅¶
- Install workspace settings for all team members
- Keep user settings separate for personal preferences
- Use format on save for consistent code style
- Backup before modifying production settings
- Test with dry run before full installation
- Commit workspace settings to version control
- Document custom changes in project README
DON'T ❌¶
- Don't commit user settings (
.global.json) to git - Don't mix personal preferences into workspace settings
- Don't disable IntelliSense (slow but essential)
- Don't ignore format errors (fix
.clang-formatinstead) - Don't modify installed files (edit source, re-run install)
- Don't skip backups when experimenting
🔄 Updating Settings¶
Workflow¶
- Edit source files (
settings.jsonorsettings.global.json) - Test changes with dry run:
- Apply updates:
- Restart VS Code
- Verify settings took effect
Version Control¶
# Track workspace settings
git add .vscode/settings.json
# Ignore user-specific settings
echo "settings.global.json" >> .gitignore
echo "settings/backups/" >> .gitignore
📚 Additional Resources¶
VS Code Documentation¶
AudioLab Documentation¶
Tools Documentation¶
💡 Tips & Tricks¶
IntelliSense Performance¶
For large projects, limit database size:
Multi-Root Workspaces¶
Working on multiple AudioLab modules:
Keyboard Shortcuts¶
Add custom shortcuts in keybindings.json:
Tasks Integration¶
Create .vscode/tasks.json for common operations:
{
"version": "2.0.0",
"tasks": [
{
"label": "Build AudioLab",
"type": "cmake",
"command": "build",
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
🏁 Next Steps¶
After installing settings:
- Install recommended extensions (see Required Extensions)
- Configure
.clang-formatfor code style - Set up CMake presets for build configurations
- Create tasks for common workflows
- Customize theme to your preference
- Join the team and share your customizations!
📞 Support¶
- Issues: Report via AudioLab issue tracker
- Questions: Ask in development chat
- Contributions: Submit PR with improvements
Version: 1.0.0 Last Updated: 2025-01-04 Maintainer: AudioLab Infrastructure Team