vim-lsc icon indicating copy to clipboard operation
vim-lsc copied to clipboard

“E718: Funcref required” when using host:port

Open ainar-g opened this issue 5 years ago • 6 comments

NVIM: v0.3.1.

vim-lsc versions tested: b02690e, v0.2.9, v0.3.2.

When I use:

let g:lsc_server_commands = {"go": "127.0.0.1:6061", "ruby": "127.0.0.1:7658"}

I get:

Error detected while processing function <SNR>8_OnOpen[4]..lsc#file#onOpen[1]..lsc#server#start[3]..<SNR>24_Start[32]..<SNR>24_Call[
12]..1:
line    3:
E718: Funcref required
Error detected while processing function <SNR>8_OnOpen[4]..lsc#file#onOpen[1]..lsc#server#start[3]..<SNR>24_Start[32]..<SNR>24_Call[
12]..6:
line    3:
E718: Funcref required

When I use:

let g:lsc_server_commands = {"go": "gopls serve", "ruby": "solargraph stdio"}

It works fine, except that gopls refuses to die properly.

ainar-g avatar Apr 03 '19 16:04 ainar-g

Hmm, this format shouldn't work at all on nvim since it doesn't have an equivalent for ch_open using a host and port.

If you run :messages do you see something like "No support for sockets"?

natebosch avatar Apr 03 '19 23:04 natebosch

Hmm, then I would say that that quirk should be documented better. How much time would it take to make a Neovim-compatible version of the code? Which files and functions should be improved?

No, there are no messages besides those in the OP.

ainar-g avatar Apr 04 '19 18:04 ainar-g

https://github.com/natebosch/vim-lsc/issues/83 was the issue to add a workaround.

Looks like new functionality may have been added in nvim since I last checked and this might be supported now. I'll need to check out sockconnect().

natebosch avatar Apr 04 '19 19:04 natebosch

So there are multiple things happening here:

  • I was missing a check for failing to open the channel and setting the server status so it was moving on anyway.
  • For some reason nvim is hiding the echom messages in some cases. I'm trying to output a message saying that the host:port format doesn't work, but nvim isn't showing it to you...

natebosch avatar Apr 09 '19 00:04 natebosch

Filed https://github.com/neovim/neovim/issues/9870

natebosch avatar Apr 09 '19 00:04 natebosch

After pulling the latest commits and settings shortmess-=F, I get a clearer error message:

[lsc:Error] No support for sockets for localhost:6061

ainar-g avatar Apr 09 '19 07:04 ainar-g