Skip to content

Use in neovim

Eddie Ash edited this page Mar 30, 2018 · 1 revision

Install the autozimu/LanguageClient-neovim using your favorite plugin manager.

Example: Neobundle 'autozimu/LanguageClient-neovim'

Configure LSP to use perl language client in your init.vim

let g:LanguageClient_serverCommands = {
  \ 'perl': ['slp.bin'],
  \ }
" AutoStart Language Server
let g:LanguageClient_autoStart=1
autogroup FileType perl
  " Smart Variable renaming
  nnoremap <silent> <F2> :call LanguageClient_textDocument_rename()<CR>
  "gq will now use the format your code properly.
  set formatexpr=LanguageClient_textDocument_rangeFormatting()
  " remaps = to gq, since equal program doesn't allow using a function
  nnoremap = gq
endgroup END