perl-lsp – language server for Perl

perl-lsp is a language server for Perl that brings IDE-style semantic intelligence to editors implementing the Language Server Protocol. It is built around tree-sitter-perl and tower-lsp.

The server performs cross-file analysis rather than treating each document in isolation. It infers types from how values are constructed and used, propagates return and parameter information between modules, and follows inheritance, roles and mixins. Framework-specific understanding covers Moo, Moose, Mojo::Base, DBIx::Class and Perl 5.38 class syntax.

Module discovery draws on standard project layouts, @INC, PERL5LIB and cpanfile dependencies. Although perl-lsp is not primarily a linter, its –check mode provides batch diagnostics suitable for CI and returns a failure status when qualifying issues are found.

This is free and open source software.

Key Features

  • Provides completion, go-to-definition, references and cross-file rename.
  • Offers hover information, signature help and inlay hints.
  • Emits semantic tokens and document and workspace symbols.
  • Uses perltidy for document and range formatting.
  • Includes optional checks for unsafe dereferences, redundant guards and dereference-shape mismatches.
  • Provides CLI tools for code exploration and refactoring.
  • Uses a per-project SQLite cache for repeat resolution.
  • Supports custom framework intelligence through Rhai plugins.

Website: github.com/tree-sitter-perl/perl-lsp
Support:
Developer: tree-sitter-perl
License: MIT License

perl-lsp is written in Rust. Learn Rust with our recommended free books and free tutorials.


Related Software

Perl Linters
Perl::CriticExtensible framework for creating and applying coding standards
PerltidyIndents and reformats Perl scripts

Read our verdict in the software roundup.


Best Free and Open Source Software Explore our comprehensive directory of recommended free and open source software. Our carefully curated collection spans every major software category.

This directory is part of our ongoing series of informative articles for Linux enthusiasts. It features hundreds of detailed reviews, along with open source alternatives to proprietary solutions from major corporations such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk.

You’ll also find interesting projects to try, hardware coverage, free programming books and tutorials, and much more.

Discovered a useful open source Linux program that we haven’t covered yet? Let us know by completing this form.
Subscribe

Please read our Comment Policy before commenting.

Notify of
guest
0 Comments
Oldest
Newest Most Voted