Skip to content

Commit c853c2a

Browse files
Russ Edwardspredragnikolic
Russ Edwards
authored andcommitted
Add Perl LS documentation
1 parent bed251d commit c853c2a

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

docs/src/language_servers.md

+45
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,51 @@ Spell check can be provided by [LSP-ltex-ls](https://github.com/LDAP/LSP-ltex-ls
447447

448448
Follow installation instructions on [ols](https://github.com/DanielGavin/ols/).
449449

450+
## Perl
451+
452+
1. Install [Perl Navigator](https://github.com/bscan/PerlNavigator). The below example configuration assumes global NPM installation.
453+
2. Install Perl::Critic, Perl::Tidy, etc. as required.
454+
3. Open `Preferences > Package Settings > LSP > Settings` and add the `"perlnavigator"` client configuration to the `"clients"`:
455+
456+
```jsonc
457+
{
458+
"clients": {
459+
"perlnavigator": {
460+
"enabled": true,
461+
"command": [
462+
"/path/to/your/node",
463+
"/path/to/your/globally/installed/perlnavigator",
464+
"--stdio"
465+
],
466+
"selector": "source.perl",
467+
"settings": {
468+
// "perlnavigator.perltidyProfile": "~/.perltidyrc",
469+
// "perlnavigator.perlcriticProfile": "~/.perlcriticrc",
470+
// "perlnavigator.perlEnvAdd": true,
471+
// "perlnavigator.perlEnv": {
472+
// "KOHA_CONF": "/home/user/git/KohaCommunity/t/data/koha-conf.xml",
473+
// },
474+
// "perlnavigator.perlPath": "~/perl5/perlbrew/perls/perl-5.38.2/bin",
475+
// "perlnavigator.perlcriticSeverity": 1,
476+
// "perlnavigator.perlcriticEnabled": true,
477+
// "perlnavigator.enableWarnings": true,
478+
"perlnavigator.includePaths": [
479+
// Used for syntax checking, typically local project roots.
480+
// NOT used for finding installed modules such as perlcritic/perltidy/perlimports.
481+
// Supports "$workspaceFolder", no need to include "$workspaceFolder/lib/".
482+
],
483+
"perlnavigator.perlParams": [
484+
// This is a list of arguments always passed to Perl.
485+
// Does not support $workspaceFolder.
486+
// Useful for finding perlcritic/perltidy/perlimports.
487+
// "-I/path/to/local/perl5/bin"
488+
]
489+
}
490+
}
491+
},
492+
}
493+
```
494+
450495
## PromQL
451496
452497
Follow installation instructions on [LSP-promql](https://github.com/prometheus-community/sublimelsp-promql).

0 commit comments

Comments
 (0)