bscan / PerlNavigator

Perl Language Server that includes syntax checking, perl critic, and code navigation
MIT License
198 stars 39 forks source link

Error with neovim 0.9.2 #88

Closed toniher closed 1 year ago

toniher commented 1 year ago

Hello, using the Neovim 0.9.2 and no extra PerlNavigator configuration, I got the following error when opening Perl files:

[lspconfig] unhandled error: ...soft/nvim-linux64/share/nvim/runtime/lua/vim/lsp/rpc.lua:663: cmd: expected string, got nil

so I cannot make PerlNavigator run...

bscan commented 1 year ago

Has it worked for you before? I'm curious if the recent release broke anything. Also, are you using https://github.com/neovim/nvim-lspconfig ?

Also, how did you install perlnavigator?

toniher commented 1 year ago

I must admit it is the first time I used it. I think it didn't work in previous and current version. I am using nvim-lspconfig, and I installed it via Mason.

bscan commented 1 year ago

I'm not normally a Neovim user, but I just got it up and running. I got that error when the lspconfig couldn't find the perlnavigator. Then I added the following to my init.lua and it worked (after reloading twice; once for installing the navigator, a 2nd time to enable it).

require("mason").setup()
require("mason-lspconfig").setup {
    ensure_installed = { "perlnavigator" },
}
require'lspconfig'.perlnavigator.setup {}
toniher commented 1 year ago

I was not using mason-lspconfig, since I was already installing tools with mason-tool-installer.nvim and using lspconfig for setting all LSPs up. However, when I enabled it for perlnavigator, it started working. So, this issue would be solved. Thanks!