| Crates.io | lumos-lsp |
| lib.rs | lumos-lsp |
| version | 0.3.0 |
| created_at | 2025-11-22 22:28:38.619886+00 |
| updated_at | 2025-12-08 23:15:58.097426+00 |
| description | Language Server Protocol implementation for LUMOS schema language |
| homepage | |
| repository | https://github.com/getlumos/lumos |
| max_upload_size | |
| id | 1945827 |
| size | 98,364 |
Language Server Protocol (LSP) implementation for LUMOS schema language.
lumos-lsp provides IDE features for .lumos files across all LSP-compatible editors:
cargo install lumos-lsp
git clone https://github.com/getlumos/lumos.git
cd lumos
cargo install --path packages/lsp
The LUMOS VSCode extension uses this LSP server automatically. Just install the extension.
Add to your init.lua:
require'lspconfig'.lumos.setup{
cmd = {"lumos-lsp"},
filetypes = {"lumos"},
root_dir = require'lspconfig'.util.root_pattern(".git", "Cargo.toml"),
}
Add to your Emacs config:
(add-to-list 'lsp-language-id-configuration '(lumos-mode . "lumos"))
(lsp-register-client
(make-lsp-client :new-connection (lsp-stdio-connection "lumos-lsp")
:major-modes '(lumos-mode)
:server-id 'lumos-lsp))
{
"clients": {
"lumos": {
"enabled": true,
"command": ["lumos-lsp"],
"selector": "source.lumos"
}
}
}
Real-time error detection:
// ❌ Syntax error
struct Account {
invalid syntax
}
// ❌ Undefined type
struct Player {
inventory: UndefinedType, // Error: Type 'UndefinedType' is not defined
}
// ✅ Valid
#[solana]
struct Account {
owner: PublicKey,
balance: u64,
}
Smart completions for:
PublicKey, Signature, Keypairu8-u128, i8-i128, bool, String, f32, f64Vec<T>, Option<T>#[solana], #[account], #[key], #[max(n)], #[deprecated]struct, enumHover over types to see documentation:
owner: PublicKey // Hover shows: "Solana public key (32 bytes)"
balance: u64 // Hover shows: "64-bit unsigned integer, Range: 0 to 18,446,744,073,709,551,615"
Editor (VS Code, Neovim, etc.)
↕ JSON-RPC (LSP protocol)
LUMOS Language Server
↓ Uses
LUMOS Parser (lumos-core)
↓ Produces
Abstract Syntax Tree (AST)
cargo build --package lumos-lsp
cargo test --package lumos-lsp
cargo run --package lumos-lsp
The server communicates via stdin/stdout using JSON-RPC.
Set RUST_LOG environment variable to enable logging:
# Debug level
RUST_LOG=debug lumos-lsp
# Info level
RUST_LOG=info lumos-lsp
# Trace level (very verbose)
RUST_LOG=trace lumos-lsp
Logs are written to stderr (not stdout, which is used for LSP communication).
packages/lsp/
├── Cargo.toml
├── README.md
└── src/
├── main.rs # Binary entry point
├── server.rs # Core LSP server
└── server/
├── diagnostics.rs # Diagnostics handler
├── completion.rs # Auto-completion
└── hover.rs # Hover information
Contributions welcome! See the main LUMOS repository for guidelines.
Dual-licensed under MIT or Apache 2.0, at your option.
Version: 0.1.0 Status: Alpha - Core features implemented, additional features coming soon