Skip to main content

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​

FeatureDescription
Profile LoadingLoad IdiomarkD profiles from file picker or configuration
Status Bar IndicatorShows active developer profile and status in the status bar
Code TransformationApply code style preferences (naming, comments, error handling)
Comment GenerationGenerate comments matching your developer style
ConfigurationManage active profile and settings via VS Code settings
Command PaletteQuick access to all IdiomarkD commands via Ctrl+Shift+P

Installation​

From Source (Development Build)​

The extension is currently in development. Install it manually:

  1. Build the extension:

    cd packages/vscode-extension
    pnpm install
    pnpm run build
  2. Install in VS Code:

    • Open VS Code
    • Press F5 to launch the Extension Development Host
    • Or install manually:
      • Navigate to Extensions: Install from VSIX... in the Command Palette
      • Select the built extension package

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:

  1. Open VS Code
  2. Go to Extensions (Ctrl+Shift+X / Cmd+Shift+X)
  3. Click the "..." menu in the top right
  4. Select "Install from VSIX..."
  5. Choose the generated .vsix file
note

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:

  1. Open the Command Palette (Ctrl+Shift+P or Cmd+Shift+P)
  2. Type IdiomarkD: Load Profile and select it
  3. Choose a .idiomarkd.json file from the file picker
  4. 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:

  1. Open a file in the editor
  2. (Optional) Select a portion of code, or leave nothing selected to transform the entire file
  3. Open the Command Palette (Ctrl+Shift+P or Cmd+Shift+P)
  4. Type IdiomarkD: Apply Active Profile and select it
  5. The code transforms to match your profile's style preferences
tip

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:

  1. Open the Command Palette (Ctrl+Shift+P or Cmd+Shift+P)
  2. Type IdiomarkD: Show Active Profile and select it
  3. 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:

  1. Open the Command Palette (Ctrl+Shift+P or Cmd+Shift+P)
  2. Type IdiomarkD: Clear Profile and select it
  3. The profile is unloaded and the status bar updates

Commands Reference​

CommandDescriptionKeyboard Shortcut
IdiomarkD: Load ProfileLoad a IdiomarkD profile from a file-
IdiomarkD: Apply Active ProfileApply the loaded profile to the active editor-
IdiomarkD: Show Active ProfileDisplay profile details in a new document-
IdiomarkD: Clear ProfileRemove the active profile-

Configuration​

Configure the extension in VS Code Settings (Ctrl+, or Cmd+,). Search for "IdiomarkD" to find all available settings:

Settings Reference​

SettingTypeDefaultDescription
idiomarkd.activeProfilestring""Path to the active IdiomarkD profile file. Set this to automatically load a profile on startup.
idiomarkd.showStatusBarbooleantrueShow the IdiomarkD status indicator in the status bar
idiomarkd.autoApplybooleanfalseAutomatically 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 CategoryPropertiesValues
Cognitive Styleproblem_solvingiterative_refinement, planned_architecture, exploratory
learning_styleexperimental, documentation_first, tutorial_based
documentation_preferencecode_first_comments_selective, document_everything, minimalist
Code Structurefunctional_preference0.0 - 1.0 (imperative to functional)
max_function_lengthNumber (lines)
complexity_tolerancelow, moderate, high
file_organizationco-located, by-feature, by-layer
Namingphilosophydescriptive_over_brief, brief_over_descriptive, balanced
conventions.variablescamelCase, snake_case, PascalCase
conventions.typesPascalCase, camelCase, UPPER_SNAKE
conventions.constantsUPPER_SNAKE, camelCase
Error Handlingphilosophygraceful_degradation, fail_fast, defensive
fail_fasttrue, false
error_contextalways, on_error_only, minimal
logging_leveldebug, info, warn, error

Keyboard Shortcuts​

The extension does not define default keyboard shortcuts. You can add custom keybindings:

  1. Open Keyboard Shortcuts (Ctrl+K Ctrl+S or Cmd+K Cmd+S)
  2. Search for "IdiomarkD"
  3. Click the + button to add your preferred shortcut
// 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:

  1. Verify the file is valid JSON (use a JSON validator)
  2. Check that profile_type is set to "developer"
  3. Ensure all required fields are present
  4. 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:

  1. Ensure a profile is loaded (check status bar)
  2. Verify the editor has an active file open
  3. Check the console for errors (Help > Toggle Developer Tools)
  4. Try reloading the VS Code window (Developer: Reload Window)

Status Bar Not Showing​

Symptoms: No IdiomarkD indicator in the status bar.

Solutions:

  1. Check that idiomarkd.showStatusBar is set to true
  2. Reload the VS Code window
  3. 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​

ComponentDescription
IdiomarkDStateManagerManages extension state, profile loading, and status bar
EditorIntegrationStandard interface for loading and applying profiles
DevBehaviorTypeScript type representing a loaded developer profile
CodeTransformationResult of code style transformation

Extension Activation​

The extension activates on VS Code startup (onStartup). On activation, it:

  1. Creates the IdiomarkDStateManager instance
  2. Registers all commands
  3. Creates the status bar item
  4. Loads any profile specified in configuration

Limitations​

Current 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​

  1. Open the extension folder in VS Code
  2. Press F5 to launch the Extension Development Host
  3. The extension runs in a new VS Code window with debugging enabled
  4. 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

Contributing​

We welcome contributions to the VS Code extension! See:

License​

MIT License - See LICENSE for details.