More than just a syntax highlighter for DeviceTree files in VSCode.
This extension provides comprehensive syntax highlighting for Device Tree Source (DTS) files, including:
- Comments: Line comments (
//) and block comments (/* */) - Preprocessor directives:
#includestatements with file paths - Node definitions: Node names, labels, and addresses (
label: node@address { }) - Properties: Cell arrays (
<...>) with references, numbers, and constants - Data types:
- Strings (
"compatible","okay", ...) - Numbers (decimal
100000, ...) - Node references (
&pinctrl_set1,&pinctrl_set2, ...) - Constants (
IMX8MP_CLK_IPP_DO_CLKO1,IMX8MP_SYS_PLL1_80M, ...)
- Strings (
Example of Device Tree file with syntax highlighting enabled
.dts- Device Tree Source files.dtsi- Device Tree Source Include files.dtso- Device Tree Source Overlays files
Install this extension from the Visual Studio Code Marketplace or by searching for "DeviceTree" in the Extensions panel (Ctrl+Shift+X).
Displays a welcome message (placeholder command for future DeviceTree functionality).
Validates DeviceTree syntax and highlights errors.
Formats DeviceTree files according to standard conventions.
- The extension automatically activates when you open DeviceTree files (
.dts,.dtsi,.dtso) - Syntax highlighting is applied immediately
- Access commands via Command Palette (
Ctrl+Shift+P/Cmd+Shift+P)
- Press
F5to open a new Extension Development Host window - Open DeviceTree files to test syntax highlighting
- Set breakpoints in
src/extension.tsfor debugging - View extension output in the Debug Console
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
- Use the GitHub Issues page
- Include your VS Code version, extension version, and sample DeviceTree files
- Describe expected vs actual behavior
- Check existing issues before creating new ones
- Describe the use case and expected functionality
- Include examples of DeviceTree syntax that should be supported
Everything related to versions and their release notes can be found in the CHANGELOG.md.
MIT
