Perl-LanguageServer
view release on metacpan or search on metacpan
=head1 Perl::LanguageServer
Language Server and Debug Protocol Adapter for Perl
=head2 Features
=over
=item * Language Server
=over
=item * Syntax checking
=item * Symbols in file
=item * Symbols in workspace/directory
=item * Goto Definition
=item * Find References
=item * Call Signatures
=item * Supports multiple workspace folders
=item * Document and selection formatting via perltidy
=item * Run on remote system via ssh
=item * Run inside docker container
=item * Run inside kubernetes
=back
=item * Debugger
=over
=item * Run, pause, step, next, return
=item * Support for coro threads
=item * Breakpoints
=item * Conditional breakpoints
=item * Breakpoints can be set while program runs and for modules not yet loaded
=item * Variable view, can switch to every stack frame or coro thread
=item * Set variable
=item * Watch variable
=item * Tooltips with variable values
=item * Evaluate perl code in debuggee, in context of every stack frame of coro thread
=item * Automatically reload changed Perl modules while debugging
=item * Debug multiple perl programs at once
=item * Run on remote system via ssh
=item * Run inside docker container
=item * Run inside kubernetes
=back
=back
=head2 Requirements
You need to install the perl module Perl::LanguageServer to make this extension work,
e.g. run C<cpan Perl::LanguageServer> on your target system.
Please make sure to always run the newest version of Perl::LanguageServer as well.
NOTE: Perl::LanguageServer depend on AnyEvent::AIO and Coro. There is a warning that
this might not work with newer Perls. It works fine for Perl::LanguageServer. So just
confirm the warning and install it.
Perl::LanguageServer depends on other Perl modules. It is a good idea to install most
of then with your linux package manager.
e.g. on Debian/Ubuntu run:
sudo apt install libanyevent-perl libclass-refresh-perl libcompiler-lexer-perl \
libdata-dump-perl libio-aio-perl libjson-perl libmoose-perl libpadwalker-perl \
libscalar-list-utils-perl libcoro-perl
sudo cpan Perl::LanguageServer
e.g. on Centos 7 run:
sudo yum install perl-App-cpanminus perl-AnyEvent-AIO perl-Coro
sudo cpanm Class::Refresh
sudo cpanm Compiler::Lexer
sudo cpanm Hash::SafeKeys
sudo cpanm Perl::LanguageServer
In case any of the above packages are not available for your os version, just
leave them out. The cpan command will install missing dependencies. In case
the test fails, when running cpan C<install>, you should try to run C<force install>.
=head2 Extension Settings
This extension contributes the following settings:
=over
=item * C<perl.enable>: enable/disable this extension
=item * C<perl.sshAddr>: ip address of remote system
=item * C<perl.sshPort>: optional, port for ssh to remote system
=item * C<perl.sshUser>: user for ssh login
=item * C<perl.sshCmd>: defaults to ssh on unix and plink on windows
=item * C<perl.sshWorkspaceRoot>: path of the workspace root on remote system
=item * C<perl.perlCmd>: defaults to perl
=item * C<perl.perlArgs>: additional arguments passed to the perl interpreter that starts the LanguageServer
=item * C<useTaintForSyntaxCheck>: if true, use taint mode for syntax check
=item * C<perl.sshArgs>: optional arguments for ssh
=item * C<perl.pathMap>: mapping of local to remote paths
=item * C<perl.perlInc>: array with paths to add to perl library path. This setting is used by the syntax checker and for the debuggee and also for the LanguageServer itself.
=item * C<perl.fileFilter>: array for filtering perl file, defaults to [I<.pm,>.pl]
=item * C<perl.ignoreDirs>: directories to ignore, defaults to [.vscode, .git, .svn]
=item * C<perl.debugAdapterPort>: port to use for connection between vscode and debug adapter inside Perl::LanguageServer.
=item * C<perl.debugAdapterPortRange>: if debugAdapterPort is in use try ports from debugAdapterPort to debugAdapterPort + debugAdapterPortRange. Default 100.
=item * C<perl.showLocalVars>: if true, show also local variables in symbol view
=item * C<perl.logLevel>: Log level 0-2.
( run in 0.858 second using v1.01-cache-2.11-cpan-39bf76dae61 )