I'm working on writing a simple custom "language" (tab delimited files with some keywords) for Visual Studio Code for learning purposes. I believe I understand how the plugins are set up, but I have had some difficulty getting VS Code to apply the styling.
When I launch VS Code the language shows up as an option in the selector, and is automatically applied to any files ending in .td as expected. However, no colors are applied to any part of the test file.
Am I missing a step? Have I left out something important? Used scopes/names that are somehow invalid?
My package.json:
{
"name": "tab-delimited",
"version": "0.1.0",
"publisher": "tsassone",
"engines": { "vscode": "*" },
"contributes": {
"languages": [{
"id": "tab-delimited",
"aliases": ["Tab Delimited", "tab delimited"],
"extensions": [".td"]
}],
"grammars": [{
"language": "tab-delimited",
"scopeName": "source.td",
"path": "./syntaxes/tab-delimited.plist"
}]
}
}
tab-delimtied.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Tab Delimited</string>
<key>scopeName</key>
<string>source.td</string>
<key>fileTypes</key>
<array>
<string>td</string>
</array>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>\d+</string>
<key>name</key>
<string>keyword.control.td</string>
</dict>
<dict>
<key>match</key>
<string>\b(friend|explicit|virtual)\b</string>
<key>name</key>
<string>storage.modifier.$1.td</string>
</dict>
</dict>
<key>uuid</key>
<string>3F4DA1dc-F063-11E5-9CE9-5E5517507C66</string>
</dict>
</plist>
A simple file for testing:
12345
friend