A Language Server Protocol (LSP) implementation focused on Unity-specific features for C# scripts.
- Asset References: Shows where a script component is referenced in scenes (
.unity), prefabs (.prefab), and assets (.asset) files using CodeLens.
src/main.rsbootstraps logging and starts the server runtime.src/server.rsowns LSP transport loop, initialization, request/notification dispatch, and response writing.src/document_storage.rsstores open document text snapshots by URI.src/capabilities/codelens.rsimplements Unity-specific CodeLens:- parse class line from C# file (tree-sitter query)
- read script GUID from
.cs.meta - scan
Assets/for GUID references - resolve final
showUnityReferencescommand arguments
- Build:
cargo build - Check:
cargo check - Test:
cargo test - Single test:
cargo test <name>