Back to browse
GitHub Repository

perl-lsp — a fast Perl language server in Rust with cross-file type inference, completion, goto-def, and rename. Built on tree-sitter-perl and tower-lsp.

8 starsRust

Perl-lsp – annotation free static analysis for Perl

by rabbiveesh·Jun 23, 2026·3 points·2 comments

AI Analysis

●●SolidNiche GemBig Brain

Witness bags with graph edges handle Perl's late binding better than Perl::LanguageServer.

Strengths
  • Graph edge traversal for value/call flow enables annotation-free type inference.
  • Rhai plugin system lets you extend type rules for custom OOP frameworks.
  • Rust + tree-sitter means fast parsing without runtime Perl dependencies.
Weaknesses
  • Perl ecosystem is shrinking, limiting long-term adoption potential.
  • Existing Perl::LanguageServer has more maturity and CPAN integration.
Target Audience

Perl developers

Similar To

Perl::LanguageServer · Pyright · Intelephense

Post Description

Built in Rust on top of ts-parser-perl and tower-lsp. Witness bags with graph traversal (value edges, call flow edges).

How it works: - builds witnesses and scopes by walking the parse tree. Fully known values get concrete types, otherwise they get an edge pointing to the last witness we have for this symbol - a worklist runs to a fixed point: reducers fold each symbol's witnesses and chase edges. At this point, the witness bag is complete and ready to use - all downstream features are queries into the bag, following along the graph edges that are relevant

Extensible - you can bring your own Rhai plugin to shortcut common patterns (exporters and OOP frameworks), or even add new types of definitions (worker tasks and web routes).

The build/query timing distinction with edges lets you late bind types, which is duly similar to how Perl itself works: `Foo->new` isn't known if it's the constructor for Foo or calling a method on the sub name `Foo`; late binding lets you make that call after the worklist folds.

Similar Projects

Developer Tools●●Solid

A universal code formatter using Rust, Tree-sitter, and Rhai

Neatify exposes AST-level formatting as live Rhai scripts, so you write real code to shape output instead of tweaking a dozen JSON flags. The Tree-sitter backbone means any language with a grammar can be targeted, and the repo-first flavoring plus LLM-assisted script generation is a smart, practical twist. It's clearly early-stage (defaults modify files in-place and coverage is limited), but the architecture is an interesting alternative to opinionated, black-box formatters.

WizardryNiche Gem
its-a-new-world
234mo ago