@@ -18,9 +18,24 @@ A universal Language Server Protocol (LSP) server for dependency management acro
1818- ** Diagnostics** — Warnings for outdated, unknown, or yanked dependencies
1919- ** Hover Information** — Package descriptions with resolved version from lock file
2020- ** Code Actions** — Quick fixes to update dependencies
21+ - ** High Performance** — Parallel fetching, optimized caching, minimal latency
2122
2223![ deps-lsp in action] ( https://raw.githubusercontent.com/bug-ops/deps-zed/main/assets/img.png )
2324
25+ ## Performance
26+
27+ deps-lsp is optimized for responsiveness:
28+
29+ | Operation | Latency | Notes |
30+ | -----------| ---------| -------|
31+ | Document open (50 deps) | ~ 150ms | Parallel registry fetching |
32+ | Inlay hints | <100ms | Cached version lookups |
33+ | Hover | <50ms | Pre-fetched metadata |
34+ | Code actions | <50ms | No network calls |
35+
36+ > [ !TIP]
37+ > Lock file support provides instant resolved versions without network requests.
38+
2439## Supported Ecosystems
2540
2641| Ecosystem | Manifest File | Status |
@@ -171,19 +186,21 @@ deps-lsp/
171186
172187### Architecture
173188
174- The codebase uses a trait-based architecture with the ` EcosystemHandler ` trait providing a unified interface for all package ecosystems:
189+ The codebase uses a trait-based architecture with the ` Ecosystem ` trait providing a unified interface for all package ecosystems:
175190
176191``` rust
177- // Each ecosystem implements EcosystemHandler
178- impl EcosystemHandler for CargoHandler { ... }
179- impl EcosystemHandler for NpmHandler { ... }
180- impl EcosystemHandler for PyPiHandler { ... }
181-
182- // Generic LSP handlers work with any ecosystem
183- generate_inlay_hints :: <H : EcosystemHandler >(... );
184- generate_hover_info :: <H : EcosystemHandler >(... );
185- generate_code_actions :: <H : EcosystemHandler >(... );
186- generate_diagnostics :: <H : EcosystemHandler >(... );
192+ // Each ecosystem implements the Ecosystem trait
193+ pub trait Ecosystem : Send + Sync {
194+ fn id (& self ) -> & 'static str ;
195+ fn display_name (& self ) -> & 'static str ;
196+ fn matches_uri (& self , uri : & Url ) -> bool ;
197+ fn registry (& self ) -> Arc <dyn Registry >;
198+ fn formatter (& self ) -> Arc <dyn EcosystemFormatter >;
199+ async fn parse_manifest (& self , content : & str , uri : & Url ) -> Result <ParseResult >;
200+ }
201+
202+ // EcosystemRegistry discovers the right handler for any manifest file
203+ let ecosystem = registry . get_for_uri (& uri );
187204```
188205
189206### Benchmarks
0 commit comments