A Visual Studio Code extension that adds language support for the Tabular Model Definition Language TMDL, enabling developers to work directly with the code behind semantic model
Note: This repository will eventually host the source code for the TMDL Language Extension.
For now, it serves only as a central location for tracking bugs and gathering feedback. This project is in Public Preview and implementation may significantly change prior to General Availability.
- Install Visual Studio Code
- Install the TMDL View VSCode Extension extension
- After setting up the extension, opening TMDL documents in Visual Studio Code will enable TMDL language features such as semantic highlighting and more.

🐞Feedback is welcome and appreciated! If you come across an issue/bug with the extension or have a feature request, please file an issue.
TMDL syntax highlighting works best in the Default Light and Dark Modern themes in Visual Studio Code.
⚠️ In some themes like Visual Studio Dark and Visual Studio Light, the syntax highlighting may be less visible.
For the best experience, we recommend using one of the themes above.
- Semantic Highlighting: Improves TMDL readability with context-aware coloring.
- Autocomplete: Offers intelligent auto completion suggestions.
- Error Diagnostics: Highlights TMDL language errors.
- Code Formatting: Automatically organizes TMDL code.
- Code Actions: Provides quick fixes and refactoring options for common TMDL issues such as duplicated lineage tag or misspelled property.
- Breadcrumbs: Allow easy navigation within a TMDL document.
- Hover Information: Provides contextual information on mouse hover.
Semantic highlighting enhances readability by providing consistent and context-aware styling—for enums, errors, integers and strings in property values, as well as strings and comments in Power Query (PQ) and many more! Support for DAX queries is also coming soon.
VS Code uses TextMate grammars for basic syntax highlighting via regex-based tokenization. Semantic tokenization adds context-aware highlights from language servers, enhancing the base highlighting improving the overall readability of TMDL documents.
The scope inspector tool allows you to explore what semantic tokens are present in a source file and what theme rules they match to.
Automatically organizes TMDL code for enhanced readability and consistency along with enhanced formatting for embedded Power Query within TMDL with soon integration of DAX query formatting.
Identifies and highlights errors in TMDL code directly within the editor.
Also detects syntax issues in embedded Power Query, with DAX diagnostics support on the way.
Error messages are shown in the user's language based on locale settings.
Note: Users must update their
localesetting separately for Power Query in the VS Code extension to enable localization.
Provides smart, context-aware suggestions while editing TMDL documents.
Autocomplete support also includes embedded Power Query, and will soon expand to include DAX queries.
Displays helpful contextual information when hovering over elements in TMDL documents.
Supports both TMDL and embedded Power Query, with future plans to support DAX as well.
Offers quick fixes and refactoring suggestions for common TMDL issues. Examples include:
- Resolving duplicated lineage tags
- Correcting misspelled properties
- Adding missing syntax elements like colons, quotes, equal signs, etc. And many more helpful fixes.
Allows easy navigation within a TMDL document showing the hierarchical structure of TMDL code
- Currently, the extension on web supports only syntax highlighting. Additional features will be added in future releases.
- The Power Query Autocomplete feature may occasionally display 'No suggestion' in uncommon scenarios.
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.
