Syntax highlighting and language support for Eller Softshell / Conclusion platform files:
- XML templates (
.xml with workspace association, or .sxml)
- Localization files (
.loc)
Features
XML Templates
- XML / HTML / SVG tag and attribute highlighting
{% ... %} code blocks — embedded JavaScript with full tokenization, // comments, keywords, strings, and Softshell platform builtins (ei, context, i18n, etc.)
{{ ... }} output expressions — JS expression highlighting for inline interpolation
- Localization attributes —
caption--btn_save="Save" syntax, with the -- separator and the localization key highlighted distinctly
<l key="…"> localization tag — recognized as a dedicated tag
<template> root tag — distinct styling
<script> blocks — full JavaScript highlighting, with optional <![CDATA[ ]]> wrapper support
<style> blocks — LESS syntax highlighting (also works for plain CSS)
- Folding — multi-line
{% %} blocks collapse and participate in sticky scroll
- Dimmed comments — everything inside
<!-- ... --> is uniformly dimmed, including commented-out {% %} blocks
Localization Files (.loc)
key:value pairs separated by : (one per line)
@language LANG command — marks following entries as belonging to that language (language name highlighted with a strong accent)
@namespace NAME command — marks following entries as belonging to that namespace (namespace name highlighted with an accent)
- Comments — lines starting with
#
- Empty lines allowed anywhere
- Placeholders —
{id}, {0}, %s, %d are recognized in values
- Escape sequences —
\n, \t, \:, \uXXXX highlighted
Installation
Install from VSIX
- Download
softshell-templates-1.0.0.vsix
- In VS Code: Ctrl+Shift+P →
Extensions: Install from VSIX… → select the file
- Reload the window when prompted
Using the Extension with .xml Files
Softshell templates use the .xml file extension, which VS Code associates with plain XML by default. The extension does not claim .xml globally — that would break XML highlighting for every other XML file you open (POMs, Spring configs, Maven settings, etc.).
Instead, you opt in per workspace by adding a files.associations entry to your project's VS Code settings.
Per-workspace setup (recommended)
Create .vscode/settings.json in your Softshell project root:
{
"files.associations": {
"*.xml": "softshell-template"
}
}
This makes every .xml file in that workspace use Softshell highlighting. Other projects are untouched.
More selective patterns
If your project mixes Softshell templates with other XML files (POMs, build configs, etc.), scope the association to specific folders:
{
"files.associations": {
"**/templates/**/*.xml": "softshell-template",
"**/forms/**/*.xml": "softshell-template",
"**/layouts/**/*.xml": "softshell-template"
}
}
User-level setup (all workspaces)
If you work on Softshell projects most of the time and want the association to apply everywhere, add it to your user settings instead (Ctrl+, → open settings JSON):
{
"files.associations": {
"*.xml": "softshell-template"
}
}
⚠️ This affects every .xml file you open in VS Code on this machine, including non-Softshell files. Use with caution.
One-off override
For a single file, click the language indicator in the bottom-right status bar and pick "Softshell Template" from the list.
.sxml files
The extension also activates automatically for .sxml files if you use that extension for future templates. No configuration needed.
Theme
The extension ships with Softshell Dark, which gives distinct colors to Softshell-specific constructs (the -- separator, localization keys, <l> tag, platform builtins).
Activate it via Ctrl+K Ctrl+T → "Softshell Dark".
The grammar also works with any VS Code theme — standard TextMate scopes ensure meaningful colors in most themes.
Scope Reference
For theme authors or customization via editor.tokenColorCustomizations:
| Scope |
Matches |
entity.name.tag.xml.softshell |
HTML / SVG / XML tag names |
entity.name.tag.localization.softshell |
The <l> tag |
entity.name.tag.template.softshell |
The <template> tag |
entity.name.tag.script.softshell |
The <script> tag |
entity.name.tag.style.softshell |
The <style> tag |
entity.other.attribute-name.xml.softshell |
Attribute names |
punctuation.separator.localization.softshell |
The -- in attr--key |
entity.other.attribute-name.localization-key.softshell |
The loc key after -- |
punctuation.section.embedded.begin.softshell |
{% and {{ delimiters |
punctuation.section.embedded.end.softshell |
%} and }} delimiters |
support.variable.softshell |
Platform objects (ei, context, options, record, …) |
support.function.softshell |
Platform functions (i18n, getHub, …) |
Troubleshooting
Highlighting doesn't apply to .xml files.
Check the language indicator in the bottom-right status bar of an open .xml file. If it says "XML" instead of "Softshell Template", your files.associations setting isn't taking effect. Verify the path:
- Workspace:
.vscode/settings.json in the project root
- User: accessible via Ctrl+, → three-dot menu → "Open Settings (JSON)"
Restart VS Code after changing associations — some cases require a reload.
JavaScript inside {% %} doesn't get IntelliSense.
That's expected — the extension provides syntax highlighting, not a language server. Embedded JS gets tokenization but not full IntelliSense for Softshell platform APIs.
LESS in <style> doesn't appear in the outline / sticky scroll.
VS Code's CSS/LESS language service activates less aggressively inside embedded regions than the JavaScript service does. This is a VS Code limitation, not a grammar issue.