A standalone LSP server for SysMLv2 and KerML files, wrapping the OMG SysML-v2-Pilot-Implementation parser. Usable with any LSP-compatible editor.
sysmlv2-lsp-server.jar — pre-built fat JAR, ~30 MB. Requires Java 21+ (Eclipse Temurin).
No build needed — just download and point your editor at the JAR (see Quick Start below).
| LSP Feature | Status | Notes |
|---|---|---|
| Diagnostics | Working | Real-time validation with Standard Library resolution |
| Document Symbols | Working | Full symbol hierarchy (packages, parts, attributes) |
| Go to Definition | Working | Navigate to symbol definitions |
| Find References | Working | Find all usages of a symbol |
| Workspace Symbol Search | Working | Search symbols across entire workspace |
| Hover | Working | Metaclass, qualified name, type info, and doc comments |
| Completion | Working | Triggered on . |
| Go to Implementation | Not supported | Not applicable to SysML modeling |
| Call Hierarchy | Not supported | Not applicable to SysML modeling |
The SysMLv2 Standard Library is fully loaded at startup. Implicit imports (Base, ScalarValues, Integer, String, Boolean, etc.) resolve correctly. A pre-computed .index.json provides O(1) namespace lookups, keeping startup under 30 seconds.
Prerequisites: Java 21+ (Eclipse Temurin)
Download the latest release JAR, then:
claude --plugin-dir /path/to/sysmlv2-lspClaude Code will automatically start the LSP server when you open .sysml or .kerml files. The server takes ~15-30 seconds to start (Java + Standard Library indexing).
Add the following to your opencode.json (project-level) or ~/.config/opencode/opencode.json (global), and adjust the JAR path:
{
"$schema": "https://opencode.ai/config.json",
"lsp": {
"sysmlv2": {
"command": ["java", "-Xmx2g", "-jar", "/absolute/path/to/sysmlv2-lsp-server.jar"],
"extensions": [".sysml", ".kerml"]
}
}
}See the OpenCode LSP documentation for additional options (env, initialization, disabled).
java -Xmx2g -jar sysmlv2-lsp-server.jarThe server communicates via stdio (JSON-RPC/LSP). Add -trace for protocol message logging to stderr.
Only needed if you want to modify the server. End users can use the pre-built JAR.
Additional prerequisites: Maven 3.9+, Git with submodule support
# 1. Clone with submodules
git clone --recurse-submodules <repo-url>
cd sysmlv2-lsp
# 2. Build the Pilot Implementation (10-20 min on first run)
./scripts/build-pilot.sh
# 3. Extract JARs + Standard Library to server/lib/
./scripts/extract-jars.sh
# 4. Build the LSP server fat JAR
cd server && ./gradlew shadowJar
# Output: server/build/libs/sysmlv2-lsp-server.jar (~30 MB)| Option | Description |
|---|---|
-Dsysml.library.skip=true |
Skip Standard Library loading (faster startup, no implicit imports) |
-Dsysml.library.path=/path/to/sysml.library |
Use external library directory |
SYSML_LIBRARY_PATH env var |
Alternative to system property |
-trace |
Log JSON-RPC messages to stderr |
Claude Code <── stdio/JSON-RPC ──> sysmlv2-lsp-server.jar
├─ KerMLExpressions (.kermlexpr)
├─ KerML (.kerml)
├─ SysML (.sysml)
├─ Standard Library (.index.json)
└─ Xtext 2.38.0 LSP framework
Three Xtext languages are registered via ServiceLoader (META-INF/services/org.eclipse.xtext.ISetup):
KerMLExpressionsIdeSetupCustomKerMLIdeSetup(adds hover documentation provider)CustomSysMLIdeSetup(adds hover documentation provider)
Key implementation details:
- Custom launcher captures
System.outbefore redirecting to prevent JSON-RPC stream corruption from Xtext log messages - EMF
SysMLPackageis explicitly registered (required in standalone mode; Eclipse usesplugin.xmlextension points) - Guice
ServerModuleis overridden to injectSysMLWorkspaceConfigFactoryfor Standard Library workspace folder injection PrecalculatedLibraryIndexProviderrequires library files under asysml.library/directory path segment to locate.index.json- Shadow JAR merges
META-INF/servicesfiles across all dependencies
MIT — see LICENSE.
The fat JAR bundles LGPL-3.0 (Pilot Implementation), EPL-2.0 (Xtext, LSP4J), and Apache-2.0 (Guice, Guava) dependencies. See NOTICE for details.