2 releases
Uses new Rust 2024
| 0.12.2 | Apr 8, 2026 |
|---|---|
| 0.12.1 | Apr 1, 2026 |
#60 in #ide
Used in perl-lsp-providers
1.5MB
26K
SLoC
perl-lsp-code-lens
Perl code lens provider for inline actions above code. It is responsible for test-run lenses, reference-count lenses, and script-level actions such as running a shebang file.
Use this crate when
Use perl-lsp-code-lens if you need the code-lens logic itself. It is the
layer between parsed Perl code and the editor commands that sit above it.
Key exports
CodeLensProvider- extracts lenses from an AST and optional file pathCodeLens/Command- serialized lens payloadsresolve_code_lens- turns reference-count data into a runnable commandget_shebang_lens- adds a top-of-file "Run Script" actionis_test_file-.tfile detection for test-specific lenses
Example
use perl_lsp_code_lens::CodeLensProvider;
let provider = CodeLensProvider::new(source.to_string())
.with_file_path("t/basic.t".to_string());
let lenses = provider.extract(&ast);
Stack role
perl-lsp uses this crate to surface inline run and reference actions in the
editor. It sits on top of parser output and file context.
Dependencies
~6.5–9.5MB
~107K SLoC