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
zarnStatic security analysis for source code and dependencies
perl-lspLanguage Server Protocol implementation for Perl

Read our verdict in the software roundup.


Best Free and Open Source Software Explore our carefully curated directory of recommended free and open source software, covering every major software category.

The directory forms part of our extensive collection of articles for Linux enthusiasts. It includes hundreds of detailed reviews, together with free and open source alternatives to proprietary software from companies such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk.

LinuxLinks also covers interesting projects worth exploring, Linux-compatible hardware, free programming books and tutorials, and much more.

Know a useful free and open source Linux application that we haven’t covered? Tell us about it using our submission form.
Subscribe

Please read our Comment Policy before commenting.

Notify of
guest
0 Comments
Oldest
Newest Most Voted