IdiomarkD VS Code Extension
Load and apply IdiomarkD (Idiomark for Developers) profiles in Visual Studio Code to transform code style, generate personalized comments, and apply developer personality traits to your coding workflow.
Overview
The IdiomarkD VS Code Extension enables developers to load their personality profiles directly into their development environment. Once loaded, the profile can transform code to match your preferred style, generate comments that match your voice, and provide a consistent coding experience.
Features
| Feature | Description |
|---|---|
| Profile Loading | Load IdiomarkD profiles from file picker or configuration |
| Status Bar Indicator | Shows active developer profile and status in the status bar |
| Code Transformation | Apply code style preferences (naming, comments, error handling) |
| Comment Generation | Generate comments matching your developer style |
| Configuration | Manage active profile and settings via VS Code settings |
| Command Palette | Quick access to all IdiomarkD commands via Ctrl+Shift+P |
Installation
From Source (Development Build)
The extension is currently in development. Install it manually:
-
Build the extension:
cd packages/vscode-extension
pnpm install
pnpm run build -
Install in VS Code:
- Open VS Code
- Press
F5to launch the Extension Development Host - Or install manually:
- Navigate to
Extensions: Install from VSIX...in the Command Palette - Select the built extension package
- Navigate to
Manual Installation
# Clone the repository
git clone https://github.com/idiomark/idiomarkengine.git
cd idiomark/packages/vscode-extension
# Install dependencies
pnpm install
# Build the extension
pnpm run build
# Package as VSIX (optional)
pnpm run package
Then load the extension:
- Open VS Code
- Go to Extensions (
Ctrl+Shift+X/Cmd+Shift+X) - Click the "..." menu in the top right
- Select "Install from VSIX..."
- Choose the generated
.vsixfile
The extension will be available on the Visual Studio Code Marketplace in a future release.
Usage
Loading a Profile
Load a IdiomarkD profile to activate it in your workspace:
- Open the Command Palette (
Ctrl+Shift+PorCmd+Shift+P) - Type
IdiomarkD: Load Profileand select it - Choose a
.idiomarkd.jsonfile from the file picker - The profile loads and the status bar updates to show the active profile
┌─────────────────────────────────────────────────┐
│ VS Code Status Bar │
│ ... | $(account) Your Name | ... │
│ └── IdiomarkD Profile Indicator │
└─────────────────────────────────────────────────┘
Applying a Profile
Apply your loaded profile to transform code in the active editor:
- Open a file in the editor
- (Optional) Select a portion of code, or leave nothing selected to transform the entire file
- Open the Command Palette (
Ctrl+Shift+PorCmd+Shift+P) - Type
IdiomarkD: Apply Active Profileand select it - The code transforms to match your profile's style preferences
If no selection is made, the entire document will be transformed. Select specific code blocks to transform only those sections.
Viewing Profile Information
View details about your currently loaded profile:
- Open the Command Palette (
Ctrl+Shift+PorCmd+Shift+P) - Type
IdiomarkD: Show Active Profileand select it - A new Markdown document opens with your profile details:
## IdiomarkD Profile
**Developer:** Your Name
**Version:** 1.1.0
### Cognitive Style
- **Problem Solving:** iterative_refinement
- **Learning Style:** experimental
- **Documentation:** code_first_comments_selective
### Code Structure
- **Functional Preference:** 0.7
- **Max Function Length:** 25
- **Complexity:** moderate
- **Organization:** co-located
### Naming
- **Philosophy:** descriptive_over_brief
- **Variables:** camelCase
- **Types:** PascalCase
- **Constants:** UPPER_SNAKE
Clearing a Profile
Remove the active profile:
- Open the Command Palette (
Ctrl+Shift+PorCmd+Shift+P) - Type
IdiomarkD: Clear Profileand select it - The profile is unloaded and the status bar updates
Commands Reference
| Command | Description | Keyboard Shortcut |
|---|---|---|
IdiomarkD: Load Profile | Load a IdiomarkD profile from a file | - |
IdiomarkD: Apply Active Profile | Apply the loaded profile to the active editor | - |
IdiomarkD: Show Active Profile | Display profile details in a new document | - |
IdiomarkD: Clear Profile | Remove the active profile | - |
Configuration
Configure the extension in VS Code Settings (Ctrl+, or Cmd+,). Search for "IdiomarkD" to find all available settings:
Settings Reference
| Setting | Type | Default | Description |
|---|---|---|---|
idiomarkd.activeProfile | string | "" | Path to the active IdiomarkD profile file. Set this to automatically load a profile on startup. |
idiomarkd.showStatusBar | boolean | true | Show the IdiomarkD status indicator in the status bar |
idiomarkd.autoApply | boolean | false | Automatically apply the profile to new code (experimental) |
Setting via JSON
Add these to your settings.json:
{
"idiomarkd.activeProfile": "/path/to/your/profile.idiomarkd.json",
"idiomarkd.showStatusBar": true,
"idiomarkd.autoApply": false
}
Workspace Settings
For team consistency, add IdiomarkD settings to your .vscode/settings.json:
{
"idiomarkd.activeProfile": "${workspaceFolder}/.idiomark/team-profile.idiomarkd.json",
"idiomarkd.showStatusBar": true
}
Profile Structure
IdiomarkD profiles are JSON files with profile_type: "developer". They capture your coding style, preferences, and behavioral patterns.
Required Fields
{
"idiomark": "1.1.0",
"profile_type": "developer",
"metadata": {
"identity": {
"name": "Your Name"
}
},
"behavioral": {
// ... behavioral traits
}
}
Complete Profile Example
{
"idiomark": "1.1.0",
"profile_type": "developer",
"metadata": {
"identity": {
"name": "Jane Developer",
"handle": "@janedev"
}
},
"behavioral": {
"cognitive_style": {
"problem_solving": "iterative_refinement",
"learning_style": "experimental",
"documentation_preference": "code_first_comments_selective"
},
"code_structure": {
"functional_preference": 0.7,
"max_function_length": 25,
"complexity_tolerance": "moderate",
"file_organization": "co-located"
},
"naming": {
"philosophy": "descriptive_over_brief",
"conventions": {
"variables": "camelCase",
"types": "PascalCase",
"constants": "UPPER_SNAKE",
"files": "kebab-case"
}
},
"error_handling": {
"philosophy": "graceful_degradation",
"fail_fast": false,
"error_context": "on_error_only",
"logging_level": "warn"
},
"testing": {
"temperament": "pragmatic_not_zealot",
"coverage_threshold": 0.7,
"test_external_dependencies": true,
"mock_strategy": "external_only"
},
"code_review": {
"style": "collaborative_not_adversarial",
"focus_areas": ["architecture", "maintainability", "security"],
"nit_picks": ["inconsistency", "no_tests", "silent_failures"]
}
},
"ai_personality": {
"code_generation": {
"include_explanations": "always",
"comment_style": "why_not_what"
}
}
}
Behavioral Traits Reference
| Trait Category | Properties | Values |
|---|---|---|
| Cognitive Style | problem_solving | iterative_refinement, planned_architecture, exploratory |
learning_style | experimental, documentation_first, tutorial_based | |
documentation_preference | code_first_comments_selective, document_everything, minimalist | |
| Code Structure | functional_preference | 0.0 - 1.0 (imperative to functional) |
max_function_length | Number (lines) | |
complexity_tolerance | low, moderate, high | |
file_organization | co-located, by-feature, by-layer | |
| Naming | philosophy | descriptive_over_brief, brief_over_descriptive, balanced |
conventions.variables | camelCase, snake_case, PascalCase | |
conventions.types | PascalCase, camelCase, UPPER_SNAKE | |
conventions.constants | UPPER_SNAKE, camelCase | |
| Error Handling | philosophy | graceful_degradation, fail_fast, defensive |
fail_fast | true, false | |
error_context | always, on_error_only, minimal | |
logging_level | debug, info, warn, error |
Keyboard Shortcuts
The extension does not define default keyboard shortcuts. You can add custom keybindings:
- Open Keyboard Shortcuts (
Ctrl+K Ctrl+SorCmd+K Cmd+S) - Search for "IdiomarkD"
- Click the + button to add your preferred shortcut
Recommended Shortcuts
// keybindings.json
[
{
"key": "ctrl+alt+l",
"command": "idiomarkd.loadProfile"
},
{
"key": "ctrl+alt+a",
"command": "idiomarkd.applyProfile"
},
{
"key": "ctrl+alt+s",
"command": "idiomarkd.showActiveProfile"
}
]
Troubleshooting
Profile Not Loading
Symptoms: Error message when trying to load a profile.
Solutions:
- Verify the file is valid JSON (use a JSON validator)
- Check that
profile_typeis set to"developer" - Ensure all required fields are present
- Check the VS Code Output panel for detailed error messages
Error: Not a IdiomarkD (developer) profile
This error means the profile file exists but doesn't have profile_type: "developer".
Code Transformation Not Working
Symptoms: Apply Profile command doesn't transform code.
Solutions:
- Ensure a profile is loaded (check status bar)
- Verify the editor has an active file open
- Check the console for errors (
Help > Toggle Developer Tools) - Try reloading the VS Code window (
Developer: Reload Window)
Status Bar Not Showing
Symptoms: No IdiomarkD indicator in the status bar.
Solutions:
- Check that
idiomarkd.showStatusBaris set totrue - Reload the VS Code window
- Verify the extension is activated (check Extensions panel)
Profile Cleared on Restart
Symptoms: Profile needs to be reloaded after VS Code restarts.
Solution:
Set the idiomarkd.activeProfile setting to your profile path:
{
"idiomarkd.activeProfile": "/absolute/path/to/your/profile.idiomarkd.json"
}
Or use a workspace-relative path:
{
"idiomarkd.activeProfile": "${workspaceFolder}/.idiomark/profile.idiomarkd.json"
}
Architecture
The extension uses the platform-agnostic integration interface from @idiomark/core:
Key Components
| Component | Description |
|---|---|
IdiomarkDStateManager | Manages extension state, profile loading, and status bar |
EditorIntegration | Standard interface for loading and applying profiles |
DevBehavior | TypeScript type representing a loaded developer profile |
CodeTransformation | Result of code style transformation |
Extension Activation
The extension activates on VS Code startup (onStartup). On activation, it:
- Creates the
IdiomarkDStateManagerinstance - Registers all commands
- Creates the status bar item
- Loads any profile specified in configuration
Limitations
- Code Transformation: Basic implementation focusing on naming conventions and comments
- No Real-time Transformation: Profile must be manually applied
- No AI Integration: Profile loading only; no direct code generation
- Single Profile: Only one profile can be active at a time
- No Language Server: No real-time code completion or validation
Future Enhancements
The following features are planned for future releases:
- Language Server integration for real-time code completion
- Real-time code transformation as you type
- Multi-profile support with quick switching
- Profile validation and error feedback
- Integration with GitHub Copilot, Cursor, and other AI tools
- Team profile sharing and synchronization
- Visual Studio Code Marketplace publication
Development
Building from Source
# Navigate to extension directory
cd packages/vscode-extension
# Install dependencies
pnpm install
# Build the extension
pnpm run build
# Watch mode for development
pnpm run watch
# Run tests
pnpm test
# Package for release
pnpm run package
Debugging
- Open the extension folder in VS Code
- Press
F5to launch the Extension Development Host - The extension runs in a new VS Code window with debugging enabled
- Set breakpoints in the source code as needed
Project Structure
packages/vscode-extension/
├── src/
│ └── extension.ts # Main extension code
├── out/ # Compiled output
├── package.json # Extension manifest
├── tsconfig.json # TypeScript configuration
└── tsup.config.ts # Build configuration
Related Documentation
- Idiomark Format Specification - Learn about the Idiomark file format
- Getting Started - Create your first profile
- CLI Reference - Use the Idiomark CLI for profile management
- SDK Reference - Build custom integrations
Contributing
We welcome contributions to the VS Code extension! See:
- Contributing Guide - General contribution guidelines
- GitHub Repository - Source code
License
MIT License - See LICENSE for details.