Skip to main content

Scapius VS Code Extension

The official Scapius extension transforms Visual Studio Code into an interactive Architecture as Code IDE with real-time compilation, diagnostics, formatting, and linting.


Installation

Search for Scapius in the VS Code Extensions pane (Ctrl+Shift+X / Cmd+Shift+X) or install via the command line:

code --install-extension scapius-ea.scapius-vscode

Key Features

1. Syntax Highlighting & Semantic Tokens

Full grammar-aware token coloring with high-precision LSP Semantic Tokens for entity keywords, relationship verbs, enum literals, custom attribute namespaces, and styles blocks.

2. Real-time Semantic Diagnostics

Errors (such as duplicate entity IDs, illegal relationship source-target pairs, invalid nesting, and cycle detection) appear directly in your editor as red squigglies and in the Problems panel.

3. Integrated Linter & Code Quality

The built-in linter runs automatically in the background to enforce architecture consistency and layout standards:

  • Formatting Standards: Detects multiple properties declared on the same line (NEA5101), inconsistent opening brace placements (NEA5102), and excessive consecutive blank lines (NEA5103).
  • Architectural Smells: Flags empty containers (NEA5002), excessive nesting depth (NEA5003), dead views with no selectors (NEA5008), and duplicate redundant relationships (NEA5009).
  • Governance & Completeness: Identifies missing descriptions (NEA5004), missing owners (NEA5005), untagged entities (NEA5006), and missing data classifications (NEA5010).

4. Interactive Quick Fixes & Code Actions

Hover over any lint or formatting warning and press Cmd + . (macOS) or Ctrl + . (Windows/Linux) to trigger Quick Fixes:

  • Auto-Format: Split multiple properties onto new lines with proper indentation.
  • Brace Style Alignment: Realign opening braces to Egyptian style.
  • Rule Suppression: Quickly insert inline # ea-lint-disable-line <rule-id> directives.

5. Intelligent Completions & Snippets

Type any entity keyword (e.g. system, capability, control) or relationship verb (e.g. flows_to, mitigates) and press Tab to expand boilerplate templates with context-aware suggestions.

6. Interactive Code Lenses

Inline reference counters above entities, layers, and groups display real-time relationship and symbol counts ("3 references") that allow one-click navigation across your architecture model.

7. Hover Documentation

Hover over any entity keyword or relationship verb to view inline parameter definitions, allowed enum values, allowed source/target constraints, and ArchiMate mappings.


Configuration Settings

You can customize extension behavior in .vscode/settings.json:

{
"scapius.lint.enabled": true,
"scapius.languageServer.logLevel": "Information",
"scapius.decorations.enableSecurityBadges": true,
"scapius.decorations.enableTimeBadges": true,
"scapius.decorations.enableThreatBadges": true
}
SettingDefaultDescription
scapius.lint.enabledfalseEnable or disable real-time linter diagnostics and QuickFix suggestions.
scapius.languageServer.path""Optional path to a custom Scapius EA Language Server executable or DLL.
scapius.languageServer.logLevel"Information"Logging verbosity for the language server (Trace, Debug, Information, Warning, Error).
scapius.decorations.enableSecurityBadgestrueShow inline badges for Security flags ([PII: Sensitive], [Internet Facing]).
scapius.decorations.enableTimeBadgestrueShow inline badges for Gartner TIME classification.
scapius.decorations.enableThreatBadgestrueShow inline badges for Threat and Risk ratings.