Here is a screenshot of what is going wrong:
As you can see, the whitespace characters are getting in the way of auto-complete's pop-up text and making things look really terrible.
When really, I'd like it to look like this:
Is there anyone out there who has been able to use whitespace-mode but eliminate it from popping up in the auto-complete stuff?
There is an issue about compatibility between auto-complete and whitespace-mode in the Prelude issue tracker which has the following workaround in its comments (improved a bit from the original):
(defvar my-prev-whitespace-mode nil)
(make-variable-buffer-local 'my-prev-whitespace-mode)
(defadvice popup-draw (before my-turn-off-whitespace activate compile)
"Turn off whitespace mode before showing autocomplete box"
(if whitespace-mode
(progn
(setq my-prev-whitespace-mode t)
(prelude-turn-off-whitespace))
(setq my-prev-whitespace-mode nil)))
(defadvice popup-delete (after my-restore-whitespace activate compile)
"Restore previous whitespace mode when deleting autocomplete box"
(if my-prev-whitespace-mode
(prelude-turn-on-whitespace)))
Essentially this disables whitespace mode for the whole buffer while a popup is shown.
The issue is also reported in the popup.el issue tracker.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With