nocturne
A language-agnostic code analysis library that provides LSP-like functionality without the LSP protocol.
Overview
nocturne allows you to analyze source code by providing it as a string and performing various operations similar to what Language Server Protocols (LSPs) do, such as:
- Diagnostics: Parse code and find syntax errors
- Symbol extraction: Find all functions, structs, types, etc. with full signatures
- Symbol lookup: Find symbols at specific positions
- Completions: Get completion suggestions
- Formatting: Validate and format code
Rust Support:
- Hover information
- Type inference
- Go to definition
- Find references
- Signature help
Supported Languages
- Rust: Uses rust-analyzer's syntax parser (
ra_ap_syntax) for robust parsing and analysis
Usage
use ;
use Rustnocturne;
Running Examples
Running Tests