Scapius EA VS Code Extension & Language Server
✨ Features
- Syntax Highlighting: Combined TextMate fallback grammar + high-precision LSP Semantic Tokens for entities, layers, groups, relationship verbs, properties, and enum values.
- Syntax & Semantic Validation: Real-time diagnostics on document open, edit, and save. Highlights syntax errors, invalid nesting, duplicate entity IDs, and unknown references.
- Real-Time Linting & Code Quality:
- Formatting Rules: Flags multiple properties on the same line (
NEA5101), inconsistent opening brace styles (NEA5102), consecutive blank lines (NEA5103), and missing separation between top-level entities (NEA5104).
- Architecture & Completeness: Detects empty containers (
NEA5002), excessive nesting depth (NEA5003), missing descriptions (NEA5004), missing owners (NEA5005), untagged entities (NEA5006), orphan entities (NEA5007), dead views (NEA5008), redundant relationships (NEA5009), and data classification gaps (NEA5010).
- Interactive Quick Fixes & Code Actions:
- One-click auto-repair (
Cmd + . / Ctrl + .) for formatting violations (splitting properties to separate lines, Egyptian opening brace formatting, inserting missing descriptions).
- Quick inline rule suppressions (
# ea-lint-disable-line <rule-id>).
- Code Completion: Context-aware autocompletions for keywords, entity types, relationship verbs, property keys, Gartner TIME values, lifecycle phases, and declared workspace entity IDs.
- Code Lenses: Interactive inline lenses showing symbol reference counts (
"X references") and entity tallies above layers and groups.
- Code Folding: Structure brace block folding (
{ ... }) for workspaces, layers, groups, entities, views, styles, and contiguous comment blocks.
- Re-factoring: Workspace-wide symbol renaming (
F2) updating definitions, relationships, view inclusion rules, and style selectors across all .ea files.
- Document Formatting: Syntax-aware automatic code formatting (
Shift+Alt+F / Cmd+Shift+I).
- Hover Information: Rich Markdown documentation sheets for entities (Id, Name, Type, Description, Owner, TIME classification, PII, Incoming/Outgoing references).
- Goto Definition: Jump (
F12 / Cmd+Click) from relationship source/targets, view include rules, or style selectors directly to entity declarations.
- Show All References: Search (
Shift+F12) workspace-wide symbol usages across all files.
- Visual Text Decorations: Color pickers for CSS styles (
#FF0000) and inline editor visual badges:
[PII: Sensitive]
[Internet Facing]
[TIME: Migrate / Invest / Tolerate / Eliminate]
[Risk: Critical / High]
📋 Requirements
To use the full Language Server capabilities (diagnostics, autocompletion, code lenses, linting, formatting, and refactoring), ensure the following are installed:
- Visual Studio Code: Version
^1.75.0 or newer.
- .NET 10.0 Runtime: The extension bundles the Scapius EA Language Server as a managed .NET assembly (
NexusEA.LanguageServer.dll).
- Ensure .NET 10.0 Runtime (or SDK) is installed on your system.
- The
dotnet CLI command must be available on your system PATH.
⚙️ Configuration Settings
Customize extension behavior in your VS Code settings.json:
| Setting |
Default |
Description |
scapius.lint.enabled |
false |
Enable Scapius EA linter diagnostics and QuickFix code actions. |
scapius.languageServer.logLevel |
"Information" |
Log level threshold for the Language Server (Trace, Debug, Information, Warning, Error). |
scapius.trace.server |
"off" |
Trace communication between VS Code and the Scapius EA Language Server (off, messages, verbose). |
scapius.decorations.enableSecurityBadges |
true |
Enable inline editor badges for Security attributes (PII, Internet Facing). |
scapius.decorations.enableTimeBadges |
true |
Enable inline editor badges for Gartner TIME classification (Migrate, Invest, etc.). |
scapius.decorations.enableThreatBadges |
true |
Enable inline editor badges for Threat and Risk ratings (Critical, High). |
💻 Commands
Scapius EA: Restart Language Server (scapius.restartServer): Restarts the background LSP server process.
Scapius EA: Dump Workspace Index (scapius.dumpWorkspaceIndex): Exports an in-depth diagnostic dump of all parsed documents, models, and symbols.
Scapius EA: Show References (scapius.showReferences): Highlights symbol reference locations across the workspace.
📄 File Associations
Automatically activates for all files with the .ea extension.
| |