scaffold: VSCode/VSCodium extension wrapping testium lsp

A thin LSP client that spawns `testium lsp` and forwards messages to
VSCode. All language intelligence lives in the testium repo, so this
extension only needs republishing for editor-side UX changes.

  - package.json: declares the .tum language, registers the LSP client,
    exposes testium.serverPath and testium.trace.server settings.
  - src/extension.ts: vscode-languageclient setup over stdio, surfaces a
    user-visible error if `testium lsp` can't start.
  - syntaxes/tum.tmLanguage.json: TextMate grammar embedding source.yaml
    plus tum-specific tokens for $(name), <| python |>, {% jinja %},
    {{ jinja }}.
  - language-configuration.json: comment char, bracket pairs, auto-close
    for $(/), <|/|>, {%/%}, {{/}}.
  - README.md: install (incl. testium[lsp] extra), settings, packaging
    via vsce, publish to both VS Marketplace and Open VSX (the latter
    is what VSCodium / Cursor / Gitpod use — same .vsix artifact).

Works identically on VSCode and VSCodium — no Microsoft-proprietary
API surface used.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-29 14:59:22 +02:00
parent c6aa6bb07a
commit 770e4cacf1
9 changed files with 514 additions and 0 deletions

69
package.json Normal file
View File

@@ -0,0 +1,69 @@
{
"name": "testium-assist",
"displayName": "Testium Assist",
"description": "Language support for testium .tum test scripts. Completion, hover and diagnostics powered by the testium LSP server (`testium lsp`).",
"version": "0.1.0",
"publisher": "testium",
"license": "EUPL-1.2",
"engines": {
"vscode": "^1.80.0"
},
"categories": [
"Programming Languages"
],
"main": "./out/extension.js",
"activationEvents": [
"onLanguage:tum"
],
"contributes": {
"languages": [
{
"id": "tum",
"aliases": [
"Testium TUM",
"tum"
],
"extensions": [
".tum"
],
"configuration": "./language-configuration.json"
}
],
"grammars": [
{
"language": "tum",
"scopeName": "source.tum",
"path": "./syntaxes/tum.tmLanguage.json"
}
],
"configuration": {
"title": "Testium Assist",
"properties": {
"testium.serverPath": {
"type": "string",
"default": "testium",
"description": "Path to the testium executable used to start the language server (`<path> lsp`). Defaults to looking up `testium` on $PATH."
},
"testium.trace.server": {
"type": "string",
"enum": ["off", "messages", "verbose"],
"default": "off",
"description": "Trace the LSP communication between VSCode and the testium server in the Output panel."
}
}
}
},
"scripts": {
"compile": "tsc -p .",
"watch": "tsc -p . --watch",
"vscode:prepublish": "npm run compile"
},
"dependencies": {
"vscode-languageclient": "^9.0.0"
},
"devDependencies": {
"@types/node": "^20",
"@types/vscode": "^1.80.0",
"typescript": "^5.4.0"
}
}