Highly ambitious ATProtocol AppView service and sdks

Plugins#

Enhance your Slices development workflow with plugins.

Lexicon IntelliSense#

A VS Code extension that provides real-time validation and IntelliSense support for AT Protocol lexicon files.

View on VS Code Marketplace

Features#

  • Real-time validation: Validates lexicon files as you type using the @slices/lexicon validator
  • JSON Schema support: Provides autocomplete and validation for lexicon structure
  • Cross-lexicon validation: Validates references between lexicon files in your workspace
  • Error diagnostics: Shows validation errors directly in the editor

Installation#

Install from the VS Code marketplace:

  1. Open VS Code Extensions (Cmd+Shift+X on Mac, Ctrl+Shift+X on Windows/Linux)
  2. Search for "Lexicon IntelliSense" by SlicesNetwork
  3. Click Install

Configuration#

Configure the extension in VS Code settings:

{
  "lexiconIntelliSense.enableValidation": true,
  "lexiconIntelliSense.lexiconDirectory": "lexicons"
}

Settings:

  • lexiconIntelliSense.enableValidation: Enable/disable validation (default: true)
  • lexiconIntelliSense.lexiconDirectory: Directory containing lexicon files relative to workspace root (default: "lexicons")

Commands#

Access these commands via the Command Palette (Cmd+Shift+P):

  • Lexicon: Validate Current File - Validates the currently open lexicon file
  • Lexicon: Validate Workspace - Validates all lexicon files in the workspace

Usage#

The extension automatically activates for:

  • JSON files in directories containing "lexicons" in the path
  • JSON files with lexicon structure (containing id and defs fields)

It validates:

  • Structure: Required id and defs fields
  • Types: Correct definition types (record, query, procedure, subscription)
  • References: Resolvable references to other lexicons
  • Formats: String formats like datetime, uri, nsid, at-uri, did

Example#

When editing a lexicon file like lexicons/com/example/post.json:

{
  "lexicon": 1,
  "id": "com.example.post",
  "defs": {
    "main": {
      "type": "record",
      "description": "A blog post",
      "record": {
        "type": "object",
        "required": ["title", "content"],
        "properties": {
          "title": {
            "type": "string",
            "maxLength": 200
          },
          "content": {
            "type": "string"
          }
        }
      }
    }
  }
}

The extension provides:

  • Autocomplete for property types and fields
  • Validation errors for missing required fields
  • Warnings for invalid references
  • IntelliSense for lexicon-specific properties