DataWeave Syntax Highlighting
VS Code extension that adds syntax highlighting to MuleSoft DataWeave (.dwl) files.
Features
- Recognizes the
.dwl extension as the DataWeave language.
- Highlights:
- Header directives:
%dw, output, input, import, var, fun, type, ns, and the separator ---.
- MIME types (e.g.,
application/json).
- Control keywords:
if, else, match, case, do, using, etc.
- Built-in types:
String, Number, Boolean, Object, Array, Date, etc.
- Built-in functions (
map, filter, reduce, groupBy, upper...) and user-defined function calls.
- Strings (double/single quotes) with interpolation
$( ... ) and escapes.
- Numbers, booleans (
true/false), and null.
- Operators (
++, ->, ==, default, as...).
- Special variables:
payload, attributes, vars, etc., and .property selectors.
- Comments
// and /* ... */, auto-closing brackets/quotes.
Installation
- Download the latest
.vsix file (or package the project using vsce package).
- Open VS Code.
- Go to the Extensions tab (
Cmd + Shift + X on Mac or Ctrl + Shift + X on Windows/Linux).
- Click the "three dots"
... menu in the top right corner of the extensions pane.
- Select "Install from VSIX...".
- Select the downloaded
.vsix file.
Done! The extension will be installed and active for all your .dwl files.
License
This project is licensed under the MIT License - see the LICENSE file for details.
| |