-
Copy the extension to VS Code:
cp -r /Users/dbalmer/Projects/shannan/fulcrum/vscode ~/.vscode/extensions/duso-0.0.1 -
Restart VS Code (close and reopen)
-
Create or open a
.dufile to see syntax highlighting in action
For faster iteration during development:
ln -s /Users/dbalmer/Projects/shannan/fulcrum/vscode ~/.vscode/extensions/dusoThen reload VS Code window with Cmd+Shift+P → "Developer: Reload Window"
- Open the example file:
/Users/dbalmer/Projects/shannan/fulcrum/vscode/example.du - You should see:
- Keywords highlighted in blue (if, then, function, etc.)
- Strings in green
- Template expressions
{{...}}with special highlighting - Comments in gray
- Numbers in different color
To use the syntax highlighter with existing examples:
cd /Users/dbalmer/Projects/shannan/fulcrum/script/examples
# Rename or copy .du files to .du
for f in *.du; do
cp "$f" "${f%.du}.du"
doneThen open any .du file in VS Code for syntax highlighting.
Syntax highlighting not showing?
- Check file extension is
.du - Verify extension installed to correct location:
~/.vscode/extensions/duso* - Restart VS Code completely (close all windows)
- Try opening the
example.dufile to verify it works there
Want to debug the grammar?
- Install "TextMate Language Grammar" support (should be default)
- Open Command Palette:
Cmd+Shift+P - Search "Developer: Inspect Editor Tokens and Scopes"
- Click on text to see what scope is applied