abingham / emacs-ycmd

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

Inform the user that completions are not possible until parsing is done #467

Open renewagner opened 6 years ago

renewagner commented 6 years ago

This originally came up in #466. Currently, ycmd will generate an exception RuntimeError: Still parsing file, no completions yet. whenever a semantic completion request is made before the translation unit has been parsed. This is logged in the *ycmd-server* buffer but there is no other indication in the regular Emacs UI that this is the reason why no completions are displayed.

It would be nice if such an indication could be produced by emacs-ycmd. A simple but effective way to handle this might be showing a "Completion not possible until parsing is done. Please try again later." message similarly to how ycmd-parse-buffer prints "Parsing buffer done" now.