### Build Perl Navigator from Source Source: https://github.com/bscan/perlnavigator/blob/main/README.md Steps to clone the repository, install dependencies, and build the server from source code. This is an alternative installation method for developers. ```sh git clone https://github.com/bscan/PerlNavigator cd PerlNavigator/ npm run ci-all cd server/ npx tsc ``` -------------------------------- ### Install Perl Navigator Server via npm Source: https://github.com/bscan/perlnavigator/blob/main/server/README.md Installs the perlnavigator-server globally using npm. This command should be run with sudo privileges. ```sh sudo npm install -g perlnavigator-server ``` -------------------------------- ### coc.nvim Client Extension Configuration Source: https://github.com/bscan/perlnavigator/blob/main/README.md Configure coc.nvim using the coc-perl extension for simpler setup. This requires installing the extension and setting the server path. ```json { "perlnavigator.enable": true, "perlnavigator.serverPath": "/path/to/PerlNavigator/server/out/server.js" } ``` -------------------------------- ### Build Perl Navigator Extension Source: https://github.com/bscan/perlnavigator/blob/main/CONTRIBUTING.md Clone the repository, install global dependencies including vsce, and package the extension into a .vsix file for installation in VSCode or VSCodium. ```shell git clone https://github.com/bscan/PerlNavigator cd PerlNavigator/ npm install -g @vscode/vsce vsce package ``` -------------------------------- ### Neovim Advanced Configuration Source: https://github.com/bscan/perlnavigator/blob/main/README.md Advanced Neovim configuration for Perl Navigator with various settings like perlPath and enableWarnings. Adjust settings based on your installation. ```lua require'lspconfig'.perlnavigator.setup{ cmd = { "perlnavigator" }, settings = { perlnavigator = { perlPath = 'perl', enableWarnings = true, perltidyProfile = '', perlcriticProfile = '', perlcriticEnabled = true, } } } ``` -------------------------------- ### Sublime Text LSP Settings Source: https://github.com/bscan/perlnavigator/blob/main/README.md Configure Sublime Text's LSP settings to enable Perl Navigator. Ensure the command path is correct for your installation. ```json { "clients": { "perlnavigator": { "enabled": true, "command": ["node", "C:\\temp\\PerlNavigator\\server\\out\\server.js","--stdio"], "selector": "source.perl" }, "settings": { // "perlnavigator.perltidyProfile": "~/.perltidyrc", // "perlnavigator.perlcriticProfile": "~/.perlcriticrc", // "perlnavigator.perlcriticMessageFormat": "%m - %e", // "perlnavigator.perlEnvAdd": false, // default: true // "perlnavigator.perlEnv": { // "KOHA_CONF": "/home/user/git/KohaCommunity/t/data/koha-conf.xml" // }, // "perlnavigator.perlPath": "~/perl5/perlbrew/perls/perl-5.38.2/bin", // "perlnavigator.perlcriticSeverity": 1, // "perlnavigator.includePaths": [ "~/git/KohaCommunity", "~/git/KohaCommunity/lib" ], // "perlnavigator.perlcriticEnabled": true, // "perlnavigator.enableWarnings": true } } } ``` -------------------------------- ### Configure LiteXL Editor for Perl Navigator Source: https://github.com/bscan/perlnavigator/blob/main/README.md Add this configuration to your init.lua file after installing the LiteXL LSP plugin. The perlPath setting is optional if you use the default 'perl'. ```lua local lsp = require "plugins.lsp" lsp.add_server { name = "perlnavigator", language = "Perl", file_patterns = { "%.pl$", "%.pm$" }, command = { "perlnavigator" }, settings = { perlnavigator = { -- The following setting is only needed if you want to set a custom perl path. It already defaults to "perl" perlPath = "perl" } } } ``` -------------------------------- ### Emacs Eglot Configuration Source: https://github.com/bscan/perlnavigator/blob/main/README.md Configure Emacs with eglot-mode for Perl Navigator, specifying a custom Perl path and enabling warnings. This setup also integrates with company-mode. ```lisp (setq-default eglot-workspace-configuration '((:perlnavigator . (:perlPath "/path/to/perl" :enableWarnings t)))) (with-eval-after-load 'eglot (add-to-list 'eglot-server-programs `((cperl-mode perl-mode) . ("/path/to/perlnavigator", "--stdio")))) (global-company-mode) (add-hook 'cperl-mode-hook 'eglot-ensure) (add-hook 'perl-mode-hook 'eglot-ensure) ``` -------------------------------- ### Neovim Basic Configuration Source: https://github.com/bscan/perlnavigator/blob/main/README.md Basic Neovim configuration for Perl Navigator using nvim-lspconfig. This assumes 'perlnavigator' is in your PATH. ```lua require'lspconfig'.perlnavigator.setup{ cmd = { "perlnavigator" } } ``` -------------------------------- ### coc.nvim Server Configuration Source: https://github.com/bscan/perlnavigator/blob/main/README.md Configure coc.nvim to use Perl Navigator by specifying the command and arguments. This is an alternative to using a dedicated client extension. ```json { "languageserver": { "perlnavigator": { "command": "node", "args": [ "/path/to/PerlNavigator/server/out/server.js", "--stdio" ], "filetypes": ["perl"] } } } ``` -------------------------------- ### Configure Kate Editor for Perl Navigator Source: https://github.com/bscan/perlnavigator/blob/main/README.md Add this configuration to Kate's User Server Settings to enable Perl Navigator. Ensure you are using the release binaries. ```json { "servers":{ "perl": { "command": ["d:\\Applications\\perlnavigator.exe", "--stdio"], "url": "https://github.com/bscan/PerlNavigator", "highlightingModeRegex": "^Perl$", "settings": { "perlnavigator": { "perlPath": "perl", } } } } } ``` -------------------------------- ### Vim Lsp Configuration Source: https://github.com/bscan/perlnavigator/blob/main/README.md Add Perl Navigator configuration to your vimrc using the lsp plugin. This defines the server name, filetype, path, and arguments. ```vim let perlnavigator = \ #{name: 'perlnavigator', filetype: 'perl', path: 'perlnavigator', args: ['--stdio'], } let lspServers = [] call add(lspServers, perlnavigator) autocmd VimEnter * call LspAddServer(lspServers) ``` -------------------------------- ### Emacs Lsp-mode Configuration Source: https://github.com/bscan/perlnavigator/blob/main/README.md Configure Emacs with lsp-mode for Perl Navigator, specifying the executable path. Lsp-mode typically finds the server automatically if it's in the system's PATH. ```lisp (use-package lsp-mode ... :custom (lsp-perlnavigator-executable (expand-file-name("~/path/to/perlnavigator"))) ...) ``` -------------------------------- ### Test Perl-only Changes Source: https://github.com/bscan/perlnavigator/blob/main/CONTRIBUTING.md Run this command to test Perl-only changes and view diagnostics and relevant tags for a file. It helps understand the interface between the TypeScript and Perl components. ```shell perl -c -I /home/brian/.vscode-server/extensions/bscan.perlnavigator-0.3.0/server/src/perl -MInquisitor /tmp/msg_test.pl ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.