Open TysonAndre opened 3 years ago
Ah good catch! I think this should be easy to solve by just adding a value for the missing registered server on the call to LanguageClient#registerServerCommands
if there is nothing else configured. Will try and think if there's a simplest solution to this in the next few days but I think that will most likely be the solution.
bin/languageclient --version
to get its version number. 0.1.161:checkhealth LanguageClient
? N/ADescribe the bug
LanguageClient_registerServerCommands
no longer works without a key in theg:LanguageClient_serverCommands
config,I'm seeing
Server not configured for filetype php
after updating this to the latest public release.LanguageClient#registerServerCommands calls LanguageClient#Call
LanguageClient#Call will filter out messages to skip.
One of the reasons a message could be skipped is that there is no serverCommand configured for that language.
However, LanguageClient#registerServerCommands is what is used to add language server commands
I expect this was caused by "Do not send requests/notifications for buffers without a configured server command (#1121) "
I assume that
.vim/settings.json
is now recommended instead?I still get issues even with this patch - file updates aren't sent to the language server if I use the plugin rather than hardcoding serverCommands
Environment
nvim --version
orvim --version
): vim 8.2git rev-parse --short HEAD
):1cb8bb5
bin/languageclient --version
): 0.1.161To Reproduce
Current behavior
Server not configured for filetype php
is seen with https://github.com/TysonAndre/LanguageServer-phan-neovimOddly, the language server doesn't start in the latest LanguageClient-neovim versions if I use that repo to set serverCommands, but if I manually hardcode g:LanguageClient_serverCommands it works
g:LanguageClient_serverStderr
was set for--language-server-verbose
to get logged to a file while debugging this, it's extremely verbose.(unrelatedly, this works better when
pcntl
is available inphp -m
. The language server is throwing exceptions in some edge cases when pcntl is unavailable and LanguageClient-neovim doesn't indicate this - I fixed that in github.com/phan/phanv4
just now)Expected behavior
registerServerCommands should work as expected. Modified file contents should get sent to language server if a language server is registered through LanguageClient_registerServerCommand
Additional context
I haven't updated the client in a while, but the server worked on old releases.
If I call LanguageClientStart with the plugin as-is, calling registerServerCommands, the client stops sending commands after the
s:SetHighlights
line.If I hardcode the exact same command line the plugin would generate, then the client works as expected