VS Code
Installation & Setup
Install the IWE Extension
The IWE extension is available on the Visual Studio Code Marketplace:
Option 1: Via VS Code Marketplace
- Open VS Code
- Go to Extensions view (
Ctrl+Shift+X/Cmd+Shift+X) - Search for “IWE”
- Click “Install” on the IWE extension
Option 2: Via Command Line
code --install-extension IWE.iweOption 3: Direct LinkVisit the IWE extension on VS Code Marketplace
Prerequisites
The IWE extension requires the iwes LSP server binary to be installed on your system:
- Install via Cargo (recommended):
cargo install iwe - Download from GitHub Releases:
- Visit IWE releases
- Download the appropriate binary for your system
- Ensure
iwesis in your system PATH
- Build from Source:
git clone https://github.com/iwe-org/iwe.git cd iwe cargo build --release --bin iwes # Copy target/release/iwes to your PATH
Verify Installation
- Open VS Code in a directory with markdown files
- Open a
.mdfile - Check the bottom status bar - you should see “IWE” indicating the language server is active
- Try using IWE features (see shortcuts below)
VS Code Shortcuts for IWE Actions
Core Actions
| IWE Feature | VS Code Shortcut | Alternative Access |
|---|---|---|
| Code Actions (Extract/Inline/AI/Transform) | Ctrl+. / Cmd+. | Right-click → “Quick Fix…” |
| Go to Definition (Follow Links) | F12 | Right-click → “Go to Definition” |
| Find All References (Backlinks) | Shift+F12 | Right-click → “Go to References” |
| Document Symbols (Table of Contents) | Ctrl+Shift+O / Cmd+Shift+O | Command Palette → “Go to Symbol” |
| Workspace Search (Global Search) | Ctrl+T / Cmd+T | Command Palette → “Go to Symbol in Workspace” |
| Format Document (Auto-Format) | Shift+Alt+F / Shift+Option+F | Right-click → “Format Document” |
| Rename Symbol (Rename File) | F2 | Right-click → “Rename Symbol” |
Additional VS Code Features
| Feature | Shortcut | Description |
|---|---|---|
| Command Palette | Ctrl+Shift+P / Cmd+Shift+P | Access all IWE commands |
| Auto-Complete | Ctrl+Space / Cmd+Space | Trigger link completion while typing |
| Peek Definition | Alt+F12 / Option+F12 | Preview linked document without opening |
| Peek References | Shift+Alt+F12 / Shift+Option+F12 | Preview backlinks without opening |
Command Palette Access
All IWE features are also available via the Command Palette (Ctrl+Shift+P / Cmd+Shift+P):
- Type “IWE” to see all available commands
- Type “Go to” for navigation commands
- Type “Format” for formatting commands
- Type “Rename” for refactoring commands
Usage Examples
Extracting a Section
- Place cursor on a header line (e.g.,
## Section Title) - Press
Ctrl+./Cmd+.to open Quick Actions - Select “Extract section”
- VS Code will create a new file and replace the section with a link
Following Links
- Click on any markdown link or place cursor within brackets
- Press
F12orCtrl+Click/Cmd+Click - VS Code will navigate to the target document
Finding Backlinks
- Place cursor on a header or anywhere in a document
- Press
Shift+F12 - VS Code will show all documents that link to the current location
- Click any result to navigate
AI-Powered Actions
- Select text you want to modify
- Press
Ctrl+./Cmd+. - Choose from available AI actions (if configured)
- The selected text will be processed and replaced
Global Search
- Press
Ctrl+T/Cmd+T - Type search terms
- VS Code will show matching documents and sections
- Use arrow keys to navigate results, Enter to open
Configuration
Workspace Settings
Create or edit .vscode/settings.json in your workspace:
{
"iwe.enable": true,
"iwe.trace.server": "off",
"files.associations": {
"*.md": "markdown"
},
"markdown.validate.enabled": true
}User Settings
For global IWE configuration, edit your VS Code user settings:
- Open Settings (
Ctrl+,/Cmd+,) - Search for “IWE”
- Configure available options
Features in VS Code
Auto-Complete
- Link Completion: Type
[and get suggestions for existing documents - Smart Suggestions: Context-aware completions based on document structure
- Snippet Support: Quick insertion of common markdown patterns
Visual Enhancements
- Inlay Hints: See parent document references and link counts
- Syntax Highlighting: Enhanced markdown highlighting with IWE-specific elements
- Error Detection: Real-time validation of links and structure
File Management
- Auto-Save: New files created by extraction are automatically saved
- File Watching: Changes are tracked and processed in real-time
- Project Integration: Works with VS Code’s built-in file explorer
Troubleshooting
Common Issues
- LSP Server Not Starting
- Check that
iwesis installed and in PATH - Restart VS Code
- Check Output panel → “IWE Language Server” for errors
- Check that
- Features Not Working
- Ensure you’re in a directory with
.iwe/config.toml - Verify the file is saved as
.md - Check VS Code status bar for IWE indicator
- Ensure you’re in a directory with
- Performance Issues
- Large workspaces may be slow; consider using library path configuration
- Disable unnecessary VS Code extensions
- Check system resources
Debug Mode
Enable debug logging:
- Set environment variable:
IWE_DEBUG=true - Restart VS Code
- Check the IWE log file in your workspace directory
- Include logs when reporting issues
Getting Help
- GitHub Issues: Report bugs or request features
- Discussions: Community support and questions
- Documentation: Full documentation wiki
Best Practices for VS Code
- Use Workspace Folders: Open your entire knowledge base as a workspace folder
- Configure File Associations: Ensure all markdown files are properly associated
- Enable Auto-Save: Prevent data loss with VS Code’s auto-save feature
- Use Split Views: Work with multiple documents simultaneously
- Organize with Explorer: Use VS Code’s file explorer alongside IWE’s navigation
- Keyboard Shortcuts: Learn the shortcuts for faster workflow
- Extensions Integration: IWE works well with other markdown extensions