Codon Language Server (CLS) is the official Visual Studio Code extension for the Codon programming language. Codon is a high-performance Python compiler that generates native machine code without any runtime overhead, often matching or exceeding the speed of C/C++.
CLS is built as a deeply modified fork of Microsoft's Pyright, specifically engineered to support Codon's unique static typing regime and high-performance features.
Key Features
🚀 Performance Oriented
Static Type Enforcement: Unlike standard Python, Codon is strictly typed. CLS enforces these types in real-time, catching errors before they hit the compiler.
Native Integration: Understands Codon's specific compilation targets and library structures.
🛡️ Type Safety
Strict Type Mutation Check: Catches cases where variable types are inadvertently changed, ensuring compatibility with Codon's native code generation.
C-FFI Support: Intelligent suggestions and type checking when interacting with C libraries via Codon's foreign function interface.
🧵 Parallelism & Metaprogramming
Safe Concurrent Loops: Provides analysis for @par loops, ensuring thread safety by tracking global state usage and mutation.
Macro & Attribute Support: High-level support for Codon's metaprogramming features.
🛠️ IDE Essentials
Intelligent Auto-completion: Context-aware suggestions tailored to Codon's standard library.
Real-time Diagnostics: Quick feedback on syntax and type errors.
Go to Definition / Find References: Navigate complex Codon codebases with ease.
Hover Information: Instant documentation for functions, classes, and types.