hvesalai / emacs-scala-mode

The definitive scala-mode for emacs
http://ensime.org
GNU General Public License v3.0
362 stars 68 forks source link

Fontification of prettified symbols #152

Open wedens opened 5 years ago

wedens commented 5 years ago

With (setq prettify-symbols-unprettify-at-point 'right-edge) prettified symbol loses its face property after the cursor is placed on it:

peek 2018-12-04 10-52

There is no such issue in other major modes, so it must be something happening in scala-mode specifically.

My setup is basically the same as https://github.com/hlissner/doom-emacs/blob/develop/modules/ui/pretty-code/%2Bfira.el#L6

Emacs 27.0.50 scala-mode 56cba29

wedens commented 5 years ago

I think the problem is that when prettify-symbols-mode tries to re-fontify the symbol, it doesn't have context (and => seems to be fontified contextually): (apply #'font-lock-flush prettify-symbols--current-symbol-bounds)