PLS - Perl Language Server
The Perl Language Server implements a subset of the Language Server Protocol for the Perl language. Features currently implemented are:
Go to definition (for packages, subroutines, and variables)
Listing all symbols in a document
Hovering to show documentation
Signature help (showing parameters for a function as you type)
Linting (using perlcritic)
This application does not take any command line options. The following settings may be configured using your text editor:
Make sure that pls.cmd is set to the path to the pls script on your system. If you rely on your $PATH, ensure that your editor is configured with the correct path, which may not be the same one that your terminal uses.
Add any additional arguments needed to execute pls to the pls.args setting. For example, if you run pls in a docker container, pls.cmd would be docker, and pls.args would be ["run", "--rm", "-i", "<image name>", "pls"].
["run", "--rm", "-i", "<image name>", "pls"]
You can use the $ROOT_PATH mnemonic to stand in for your project's root directory, for example $ROOT_PATH/lib. If you are using multiple workspace folders and use $ROOT_PATH, the path will be multiplied by the number of workspace folders, and will be replaced that many times. This is useful if you use SVN and check out each branch to a different directory.
If you use $ROOT_PATH, it will be replaced by your workspace's first or only folder.
Defaults to ~/.perltidyrc if not configured.
Defaults to ~/.perlcriticrc if not configured.
Defaults to the perl used to run PLS.
This is useful if there is a BEGIN block in your code that changes behavior depending on the contents of @ARGV.
You may configure a .plsignore file in your project's root directory, with a list of Perl glob patterns which you do not want pls to index.
By default, PLS will index all files ending with `.pl`, `.pm`, or have `perl` in the shebang line that are not `.t` files.
pls is known to be compatible with Visual Studio Code, Neovim, and BBEdit.
pls will perform much better if you have an XS JSON module installed. If you install Cpanel::JSON::XS or JSON::XS, it will use one of those before falling back to JSON::PP, similar to JSON::MaybeXS.
Refer to this README for instructions on configuring your specific editor: https://marketplace.visualstudio.com/items?itemName=FractalBoy.pls
Copyright 2022 Marc Reisner
This library is free software; you may redistribute it and/or modify it under the same terms as Perl itself.
To install PLS, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.