Beacon is a Rust implementation of the language server protocol & a hindley-milner type system for Python, inspired by languages like F# & OCaml and the work of Astral & BASED pyright.
Beacon provides advanced type inference and static analysis for Python:
- Hindley-Milner type inference with generics and constraints
- Type narrowing through pattern matching and control flow
- Real-time diagnostics for syntax, semantic, and type errors
- Code intelligence: hover, completions, navigation, symbol search
- Code actions and refactoring: quick fixes, renaming, protocol implementations
- Semantic highlighting and inlay hints
- Code formatting and static analysis
Beacon works with any LSP-compatible editor:
- VS Code / VSCodium
- Zed
- Neovim (via standard LSP client)
- Helix (via standard LSP client)
For editor integration, Beacon uses stdio mode by default:
# Invoke the lsp binary directly or use the cli
beacon-lsp # or beacon lspFor debugging, testing, or remote connections, use TCP mode:
beacon lsp --tcp --host 127.0.0.1 --port 9350See the Development Quick Start Guide for more detailed installation, usage, and editor setup instructions
Install the prerequisites listed in CONTRIBUTING.md, then clone the repo and bootstrap:
git clone https://github.com/stormlightlabs/beacon
pnpm install && cargo fetchUse cargo or the just recipes to build (just build), then run directly
# CLI
cargo run -p beacon-cli -- typecheck samples/basic.py
# Language server (stdio mode)
cargo run -p beacon-lsp -- --stdioMade with ⚡️ by Stormlight Labs.
Stormlight Labs is just me, Owais. Sponsor my work here on github