This PR implements support for synchronizing disabled extensions in VSCode Settings Sync, resolving Issue #143.
Previously, VSCode Settings Sync could not synchronize the disabled state of extensions. When users disabled extensions on one machine, those extensions would remain enabled when synced to another machine, causing inconsistent development environments.
The implementation adds comprehensive support for disabled extension synchronization by:
- Detection: Reading VSCode's internal settings to identify disabled extensions
- Storage: Including disabled extension state in sync data
- Restoration: Automatically restoring disabled states during download
src/service/disabledExtension.service.ts- Core service for disabled extension handlingtest/disabledExtension.test.ts- Comprehensive test suiteDISABLED_EXTENSIONS_FEATURE.md- Detailed documentation
src/service/plugin.service.ts- Enhanced ExtensionInformation model and sync logicsrc/sync.ts- Integrated disabled extension restoration into download workflow
✅ Cross-platform support - Works on Windows, macOS, and Linux
✅ Global and workspace-level - Supports both global and workspace-disabled extensions
✅ Backward compatible - No breaking changes to existing functionality
✅ Error handling - Graceful handling of missing config files and sync errors
✅ User feedback - Progress indication and error reporting
✅ Comprehensive tests - Full test coverage for new functionality
export class ExtensionInformation {
// Existing properties...
public disabled?: boolean; // True if disabled in any way
public disabledGlobally?: boolean; // True if disabled globally
public disabledInWorkspace?: boolean; // True if disabled in workspace
}The service reads VSCode's settings.json files to detect disabled extensions:
- Global:
%APPDATA%/Code/User/settings.json(Windows) or equivalent - Workspace:
<workspace>/.vscode/settings.json
- Upload:
CreateExtensionList()includes disabled extension states - Download:
RestoreDisabledExtensions()restores states after installation
- ✅ Unit tests for disabled extension detection
- ✅ Integration tests for sync workflow
- ✅ Error handling tests
- ✅ Cross-platform compatibility tests
- ✅ Backward compatibility tests
None. This is a purely additive feature that maintains full backward compatibility.
Closes #143 - Considering disabled extensions
This PR resolves the $120 IssueHunt bounty for Issue #143.
- Install some extensions in VSCode
- Disable some extensions globally (right-click → "Disable")
- Disable some extensions in workspace (right-click → "Disable (Workspace)")
- Upload settings using Settings Sync
- On another machine, download settings
- Verify that disabled extensions are properly restored in their disabled state
The feature works transparently - users will see disabled extensions properly synchronized with appropriate status messages in the output channel.
- Code follows project style guidelines
- Self-review completed
- Comments added for complex logic
- Tests added for new functionality
- Documentation updated
- No breaking changes introduced
- Backward compatibility maintained
- Error handling implemented
- Cross-platform compatibility ensured
This implementation provides a robust foundation for disabled extension synchronization while maintaining the simplicity and reliability that users expect from VSCode Settings Sync. The feature works automatically without requiring any additional configuration from users.