You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1st of all, this wrapper is awesome and saves tons of time and this issue is really minor.
It seems the g:LanguageClient_serverCommands variable is being set too late therefore function that sets the bindings described in :help LanguageClient doesn't work and opening any buffer complains about missing variable. Calling same function after the buffer opens works fine. Can you somehow register the server commands earlier and, if not, can you recommend other general condition for detecting whether the server will run for given buffer or not?
Error detected while processing function LC_maps:
line 1:
E121: Undefined variable: g:LanguageClient_serverCommands
E116: Invalid arguments for function has_key
E15: Invalid expression: has_key(g:LanguageClient_serverCommands, &filetype)
Press ENTER or type command to continue
Calling it after the buffer opens works fine:
:callLC_maps()
I'll cross post this issue on LanguageClient tracker as I'm not sure where it belongs. Maybe they can just change documentation or the way server commands register.
The text was updated successfully, but these errors were encountered:
An empty dictionary? Doesn't LanguageClient_registerServerCommands() create it? After the buffer opens same condition works perfectly fine and I'm not setting g:LanguageClient_serverCommands anywhere myself.
It does. But the code is executed in ftplugin/php.vim, which may not be executed before autocmd FileType * call LC_maps(). Read :help ftplugin for more information.
Hi there,
1st of all, this wrapper is awesome and saves tons of time and this issue is really minor.
It seems the
g:LanguageClient_serverCommands
variable is being set too late therefore function that sets the bindings described in:help LanguageClient
doesn't work and opening any buffer complains about missing variable. Calling same function after the buffer opens works fine. Can you somehow register the server commands earlier and, if not, can you recommend other general condition for detecting whether the server will run for given buffer or not?Testing
vimrc
(please note theif
statement):Error message:
Calling it after the buffer opens works fine:
I'll cross post this issue on LanguageClient tracker as I'm not sure where it belongs. Maybe they can just change documentation or the way server commands register.
The text was updated successfully, but these errors were encountered: