Integration with Neovim - PrajitP/App-LanguageServer-Perl GitHub Wiki

Install Perl LSP server

Install the server locally by following instructions in README.md

  • Duplicating steps form README.md (NOTE: This can go out of date)
cpanm Dist::Zilla
dzil authordeps --missing | sudo cpanm
dzil install

Install Neovim LSP client

You can basically install any Neovim LSP client, but I am going to list down the one I personally tried autozimu/LanguageClient-neovim

  • Duplicating steps form above project README.md (NOTE: This can go out of date)
    • Install using vim-plug:
Plug 'autozimu/LanguageClient-neovim', {
    \ 'branch': 'next',
    \ 'do': 'bash install.sh',
    \ }

Configure Neovim settings(in init.vim) to enable Perl LSP

" Inform the LSP client about Perl LSP server
let g:LanguageClient_serverCommands = {
  \ 'perl': ["<LSPServerRootDir>\bin\slp.pl"],
  \ }
augroup FileType perl
    " AutoStart Language Server
    let g:LanguageClient_autoStart=1
    " Rename variable
    nnoremap <leader>lr :call LanguageClient_textDocument_rename()<CR>
    " Format file using Perl Tidy
    nnoremap <leader>lf :call LanguageClient_textDocument_formatting()<CR>
    " Goto definition, currently only support variables
    nnoremap <leader>ld :call LanguageClient_textDocument_definition()<CR>
augroup END
⚠️ **GitHub.com Fallback** ⚠️