Skip to content

IntelliJ IDEA and Rust Rover plugin for LUMOS schema language

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

getlumos/intellij-lumos

Repository files navigation

LUMOS IntelliJ Plugin

IntelliJ IDEA and Rust Rover plugin for LUMOS schema language.

Write once in .lumos → Generate type-safe Rust + TypeScript for Solana


Features

File Type Recognition - .lumos files recognized and highlighted ✅ LSP Integration - Full language server protocol support ✅ Auto-Completion - Smart suggestions for types and attributes ✅ Real-Time Diagnostics - Instant error detection and validation ✅ Hover Documentation - Inline type and attribute documentation ✅ Multi-IDE Support - Works with IntelliJ IDEA, Rust Rover, and CLion


Installation

Prerequisites

Install the LUMOS Language Server:

cargo install lumos-lsp

Verify installation:

lumos-lsp --version # lumos-lsp 0.1.1

Option 1: From JetBrains Marketplace (Coming Soon)

Settings → Plugins → Marketplace → Search "LUMOS" → Install → Restart IDE 

Option 2: Manual Installation

  1. Download the latest .zip from Releases

  2. Install:

    Settings → Plugins → ⚙️ → Install Plugin from Disk Select: intellij-lumos-X.X.X.zip Restart IDE 

Quick Start

  1. Open or create a .lumos file:
#[solana] #[account] struct Player { wallet: PublicKey, score: u64, level: u16, }
  1. Features activate automatically:

    • ✅ Syntax highlighting
    • ✅ Auto-completion (PubPublicKey)
    • ✅ Error diagnostics (red squiggles)
    • ✅ Hover information
  2. Generate code:

    lumos generate schema.lumos

Supported IDEs

IDE Version Status
IntelliJ IDEA Community 2024.1+ ✅ Supported
IntelliJ IDEA Ultimate 2024.1+ ✅ Supported
Rust Rover 2024.1+ ✅ Supported
CLion 2024.1+ ✅ Supported

Configuration

LSP Server Path

The plugin automatically detects lumos-lsp in:

  1. $CARGO_HOME/bin/lumos-lsp (default Cargo install location)
  2. System PATH

Custom path (if needed):

Settings → Languages & Frameworks → Language Servers → Configure server manually: /path/to/lumos-lsp 

Development

Build from Source

# Clone repository git clone https://github.com/getlumos/intellij-lumos.git cd intellij-lumos # Build plugin ./gradlew buildPlugin # Output: build/distributions/intellij-lumos-0.1.0.zip

Run in IDE Sandbox

./gradlew runIde

Run Tests

./gradlew test

Troubleshooting

LSP Server Not Starting

Symptom: No auto-completion or diagnostics

Fix:

  1. Verify LSP server is installed:

    which lumos-lsp
  2. If missing, install:

    cargo install lumos-lsp
  3. Check IDE logs:

    Help → Show Log in Finder → Search for "lumos" 

Plugin Not Recognized

Symptom: Can't find LUMOS in plugins list

Fix:

  1. Ensure IDE version is 2024.1 or higher
  2. Install LSP4IJ dependency:
    Settings → Plugins → Marketplace → Search "LSP4IJ" → Install 
  3. Restart IDE

File Type Not Recognized

Symptom: .lumos files open as plain text

Fix:

  1. Right-click .lumos file
  2. Associate with File TypeLUMOS
  3. Restart IDE

Architecture

Plugin Architecture: ┌─────────────────────────────────────┐ │ IntelliJ IDEA / Rust Rover │ │ │ │ ┌──────────────────────────────┐ │ │ │ LUMOS Plugin │ │ │ │ - File Type Registration │ │ │ │ - LSP Client (lsp4ij) │ │ │ │ - Icon Provider │ │ │ └──────────┬───────────────────┘ │ │ │ JSON-RPC (LSP) │ │ v │ │ ┌──────────────────────────────┐ │ │ │ lumos-lsp │ │ │ │ (Language Server) │ │ │ │ - Diagnostics │ │ │ │ - Completion │ │ │ │ - Hover │ │ │ └──────────────────────────────┘ │ └─────────────────────────────────────┘ 

Key Files:

  • LumosFileType.kt - File type registration
  • LumosLanguage.kt - Language definition
  • LumosLspServerDescriptor.kt - LSP client integration
  • plugin.xml - Plugin manifest

Contributing

Contributions welcome! See CONTRIBUTING.md


Related Projects


License

Dual-licensed under:


Links


Made with ❤️ by the LUMOS team

Releases

No releases published

Sponsor this project

 

Packages

No packages published