MIDL Language Support for VS CodeA complete MIDL3 development environment — catch errors as you type, get context-aware completions, and ship correct WinRT APIs faster.
⚡ Real-Time DiagnosticsErrors and warnings surface instantly as you type — no build step required. Syntax errors, undefined types, MIDL2/MIDL3 migration issues, and duplicate definitions are caught with precise source locations and actionable messages.
🧠 Context-Aware IntelliSenseCompletions adapt to where your cursor is. Inside an attribute bracket on a
Includes WinRT primitives, collection/async types, external 🎯 Code Quality16 built-in code quality rules with one-click quick fixers — enforce WinRT naming conventions, simplify verbose patterns, and catch common mistakes.
Async Naming ConventionMethods returning
🔗 NavigationGo to Definition — F12 into Decompiled WinMDF12 on any Windows SDK type jumps to a decompiled IDL view straight from the
F2 Rename SymbolRename a symbol and all its references in one shot. Works across interface declarations,
🌐 Windows SDK IntegrationNamespace Drill-InType a dot after any Windows namespace and IntelliSense walks you through the hierarchy —
Microsoft Learn IntegrationHover any Windows SDK type to see its documentation inline, with a direct link to Microsoft Learn. The side panel shows full API docs without leaving VS Code.
Features🎨 Syntax HighlightingFull TextMate grammar covering both MIDL3 and classic MIDL syntax:
📝 Code Snippets19 snippets for common MIDL3 patterns — type a prefix and press Tab:
🖱️ Hover InformationHover over any token for contextual documentation — keywords, built-in types, user-defined types, and external 🔗 Go to DefinitionCtrl+Click or F12 on any type or member name to jump to its declaration. Also works on attribute names — F12 on 🔎 Find All ReferencesShift+F12 to find every usage of a symbol in the document. ✍️ Signature HelpParameter hints triggered by 📂 Code FoldingCollapse namespaces, runtime classes, interfaces, structs, enums, and versioned blocks using the editor fold controls. 🎯 Semantic Highlighting14 semantic token types with declaration/static modifiers — identifiers resolved against the compilation for precise highlighting. 📐 Document FormattingShift+Alt+F — consistent 4-space indentation, normalized spacing, blank lines between declarations, trailing whitespace cleanup. 📋 Document OutlineHierarchical symbol tree in Outline view and Breadcrumbs — namespaces, types, and members. 🔢 Namespace Type Count Code LensEach namespace block shows a summary of its contained types — e.g., 📝 Doc Comments (
|
| Setting | Type | Default | Description |
|---|---|---|---|
midl.strictMode |
boolean |
true |
Enable strict MIDL3 mode. Classic MIDL constructs (coclass, library, typedef, etc.) produce warnings. Disable for mixed MIDL2/MIDL3 codebases. |
midl.codeQualityHints |
boolean |
true |
Show code quality hints (naming conventions, empty types, etc.) |
midl.useWindowsSdk |
boolean |
true |
Automatically reference Windows.winmd from the installed Windows SDK for type completion and F12 navigation. |
midl.windowsSdkVersion |
string |
"latest" |
Windows SDK version to use. Use the MIDL: Select Windows SDK Version command to pick from installed versions. |
midl.flatSdkTypeCompletions |
boolean |
false |
Show all SDK types by short name in completions (e.g. Button, Control). When off, only namespace names appear and you drill in with dot notation. |
midl.fetchSdkDocs |
boolean |
true |
Fetch type descriptions from Microsoft Learn on hover. Requires internet access. |
midl.inlineDocsBrowser |
boolean |
true |
Open Microsoft Learn documentation in a VS Code side panel instead of the external browser. |
midl.defines |
array |
[] |
Preprocessor defines for inactive region detection (e.g., ["FEATURE_X", "DEBUG"]). |
midl.serverPath |
string |
"midl" |
Path to the MIDL CLI executable. The extension ships its own copy — you shouldn't need to change this unless using a custom build. |
Getting Started
1. Install the Extension
Install MIDL Language Support from the VS Code marketplace or from a .vsix package.
2. Open a .idl File
The extension activates automatically when you open any .idl file. All features — syntax highlighting, diagnostics, completions, hover, and more — are available immediately.
Requirements
- VS Code 1.85+ — Minimum supported VS Code version
The extension ships a self-contained Native AOT binary — no .NET SDK or runtime installation required.
Known Limitations
- Go to Definition — Works within the current file, across
.idlfiles (viawinmidl.jsonor// @ref:directives), and for external.winmdtypes (decompiled view) - Full document sync — The entire document is re-sent and reparsed on every keystroke (incremental text sync planned)
- No refactoring — Code actions are available but full refactoring support is still growing
License
MIT








