blib/lib/PLS.pm

filter: Statementstmt 100% 8 / 8 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 100% 10 / 10 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/PLS/Server/Request/TextDocument/DidOpen.pm ↑ Summary blib/lib/PLS/Parser/Pod/ClassMethod.pm »
1 package PLS;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 our $VERSION = '0.906';
7  
8 =head1 NAME
9  
10 PLS - Perl Language Server
11  
12 =head1 DESCRIPTION
13  
14 The Perl Language Server implements a subset of the Language Server Protocol
15 for the Perl language. Features currently implemented are:
16  
17 =over
18  
19 =item * Go to definition (for packages, subroutines, and variables)
20  
21 =item * Listing all symbols in a document
22  
23 =item * Hovering to show documentation
24  
25 =item * Signature help (showing parameters for a function as you type)
26  
27 =item * Formatting
28  
29 =item * Range Formatting
30  
31 =item * Auto-completion
32  
33 =item * Syntax checking
34  
35 =item * Linting (using perlcritic)
36  
37 =item * Sorting imports
38  
39 =back
40  
41 =head1 OPTIONS
42  
43 This application does not take any command line options.
44 The following settings may be configured using your text editor:
45  
46 =over
47  
48 =item pls.cmd - path to pls
49  
50 Make sure that C<pls.cmd> is set to the path to the C<pls> script on your system.
51 If you rely on your C<$PATH>, ensure that your editor is configured with the correct
52 path, which may not be the same one that your terminal uses.
53  
54 =item pls.args - args to pass to the pls command
55  
56 Add any additional arguments needed to execute C<pls> to the C<pls.args> setting.
57 For example, if you run C<pls> in a docker container, C<pls.cmd> would be C<docker>, and
58 C<pls.args> would be C<< ["run", "--rm", "-i", "<image name>", "pls"] >>.
59  
60 =item pls.inc - a list of paths to add to C<@INC>
61  
62 You can use the C<${workspaceFolder}> variable to stand in for your project's root directory,
63 for example C<${workspaceFolder}/lib>. If you are using multiple workspace folders and use
64 C<${workspaceFolder}>, the path will be multiplied by the number of workspace folders,
65 and will be replaced that many times. This is useful if you use SVN and check out
66 each branch to a different directory.
67  
68 =item pls.cwd - the working directory to use for pls
69  
70 If you use C<${workspaceFolder}>, it will be replaced by your workspace's first
71 or only folder.
72  
73 =item pls.perltidy.perltidyrc - the location of your C<.perltidyrc> file.
74  
75 Defaults to C<~/.perltidyrc> if not configured.
76  
77 If you use C<${workspaceFolder}>, it will be replaced by your workspace's first
78 or only folder.
79  
80 =item pls.perlcritic.enabled - whether to enable linting using L<perlcritic>.
81  
82 =item pls.perlcritic.perlcriticrc - the location of your C<.perlcriticrc> file.
83  
84 Defaults to C<~/.perlcriticrc> if not configured.
85  
86 If you use C<${workspaceFolder}>, it will be replaced by your workspace's first
87 or only folder.
88  
89 If you have the RequireTidyCode policy enabled, it will be configured to use
90 the C<.perltidyrc> from pls.perltidy.perltidyrc.
91  
92 =item pls.syntax.enabled - whether to enable syntax checking.
93  
94 =item pls.syntax.perl - path to an alternate C<perl> to use for syntax checking.
95  
96 Defaults to the C<perl> used to run PLS.
97  
98 If you use C<${workspaceFolder}>, it will be replaced by your workspace's first
99 or only folder.
100  
101 Globbing is also performed against this path.
102  
103 =item pls.syntax.args - additional arguments to pass when syntax checking.
104  
105 This is useful if there is a BEGIN block in your code that changes
106 behavior depending on the contents of @ARGV.
107  
108 =back
109  
110 You may configure a .plsignore file in your project's root directory, with
111 a list of Perl glob patterns which you do not want pls to index.
112  
113 By default, PLS will index all files ending with `.pl`, `.pm`,
114 or have `perl` in the shebang line that are not `.t` files.
115  
116 =head1 CAVEATS
117  
118 pls is known to be compatible with Visual Studio Code, Neovim, BBEdit, and emacs.
119  
120 pls will perform much better if you have an XS JSON module installed.
121 If you install L<Cpanel::JSON::XS> or L<JSON::XS>, it will use one of those
122 before falling back to L<JSON::PP>, similar to L<JSON::MaybeXS>.
123  
124 =head1 NOTES
125  
126 Refer to this README for instructions on configuring your specific editor:
127 L<https://marketplace.visualstudio.com/items?itemName=FractalBoy.pls>
128  
129 =head1 COPYRIGHT
130  
131 Copyright (c) 2024 Marc Reisner
132  
133 =head1 LICENSE
134  
135 This library is free software; you may redistribute it and/or
136 modify it under the same terms as Perl itself.
137  
138 =cut
139  
140 1 1;
« blib/lib/PLS/Server/Request/TextDocument/DidOpen.pm ↑ Summary blib/lib/PLS/Parser/Pod/ClassMethod.pm »