MLIR Inc Previewer is a VS Code extension designed for MLIR developers to quickly preview and manage .inc file content. It allows you to preview included .inc file contents without leaving your current file.
✨ Core Features
🔄 Intelligent Expand/Collapse
One-click Expansion: Press Ctrl+Shift+U near #include "xxx.inc" statements to view .inc file content
One-click Collapse: Press the same shortcut again or use right-click menu to collapse preview content
Smart Detection: Automatically detects .inc include statements near cursor position
🧹 Preview Management
Status Bar Display: Shows real-time count of un-cleaned previews in current file
Batch Cleanup: Click status bar or use right-click menu to clean all previews at once
Clean and Save: Combined command to clean previews and save file in one operation
🧭 Navigation
Navigate to Next: Jump to the next preview block in the file
Context Menu: All commands available via right-click in C/C++ files
Command Palette: Access all features via VS Code command palette
🚀 Quick Start
Open a C/C++ file containing .inc include statements
Place cursor near #include "xxx.inc"
Use one of these methods:
Press Ctrl+Shift+U
Right-click -> MLIR menu
Command palette -> Search "MLIR"
⌨️ Keyboard Shortcuts
Shortcut
Action
Ctrl+Shift+U
Toggle .inc preview
Ctrl+S
Clean all previews and save file
📋 Requirements
clangd extension for accurate .inc file navigation