Open r4nt opened 9 years ago
Is this the problem where you try to do a completion but are told that parsing is happening?
Also, what settings are you using for ycmd-idle-change-delay and any potentially related stuff? I can try those settings myself and see what there is to see.
FWIW, I agree that this is a fiddly area.
Yep, exactly. I have tried various settings for ycmd-idle-change-delay < 1 second and various settings for company-mode. I am mainly thinking this can be solved because the vim version doesn't have the problem that much (@Valloric for why that might be).
Can you point me at an example that's exhibiting these problems, maybe something in an open-source project?
I'm mainly working on LLVM. Unfortunately there I still need to find time to create a self-compiled emacs (to the the upstream JSON improvement), because JSON escape times basically get in the way of everything else...
Right. I'll just keep this open and wait for you to get back with more info.
Just to note, ycmd does in fact reject completion requests if a FileReadyToParse
event came in and it hasn't yet been fully processed. YCM considers sending the event in the following cases:
...but the event is sent ONLY if the buffer has been changed since the last time we considered sending it.
Note that completion requests will also parse the file.
The reason why subsequent parse events are dropped on the floor is because we used to not do that, and then ycmd would just get clogged with parse events if the file takes a long time to parse and everyone was unhappy. This turned out to be a much better system, because logically the parse events are "update the AST cache for me" and it makes no sense to queue up such events if the update is already happening.
Unfortunately there I still need to find time to create a self-compiled emacs
Alas, that might not help, as long as #165 is unresolved.
I find it's very hard to configure emacs-ycmd with idle-change in a way that code completion is not constantly stumped by parsing, even though parsing is pretty fast (0.3 seconds).
I'm wondering whether the ycmd-idle-change-delay is not counting from (the last command line completion returns || I hit a key), but only from "I hit a key".