abingham / emacs-ycmd

Emacs client for ycmd, the code completion system.
MIT License
384 stars 46 forks source link

Async eldoc interferes with sync company #420

Open quicknir opened 7 years ago

quicknir commented 7 years ago

In the past, ycmd-eldoc made sync calls to the ycmd server, which caused performance issues as discussed in #416. Work in the last 6 months upgraded ycmd-eldoc to make async calls, resolving the performance issue. However, it now seems to be the case that if an async ycmd-eldoc request is active, synchronous company-ycmd requests do not behave as desired.

In particular, if company-ycmd-request-sync-timeout > 0, company-ycmd requests should wait on a response from the server. However, if ycmd-eldoc has already requested a parse that is not complete and completion triggers, instead of giving completion after a brief pause, instead "No completion found" is echoed immediately to the minibuffer and no completion is offered. Re-triggering the completion after the eldoc request finishes (usually < 1 second) causes completion to start.