jming422 / fira-code-mode

Emacs minor mode for Fira Code ligatures using prettify-symbols
GNU General Public License v3.0
103 stars 11 forks source link

`fira-code-mode` breaks color display in `eat` even after being disabled #27

Closed lambdadog closed 1 year ago

lambdadog commented 1 year ago

I'm also opening this issue on the eat issue tracker.

It took me some time to hunt down fira-code-mode as the issue, since I had tried disabling it in the buffer (I use global-fira-code-mode) to no success, but something about the interaction between these two modes isn't undone correctly.

To reproduce (with both fira-code-mode and eat in the load-path):

M-x load-library fira-code-mode RET
M-x load-library eat RET
M-x eat RET RET
M-x fira-code-mode RET

At this point the colors in the buffer have disappeared.

M-x fira-code-mode RET

Despite fira-code-mode now being disabled, the colors remain gone.


This also works with eat-eshell-mode, in which case even toggling eat-eshell-mode leaves the colors broken.

jming422 commented 1 year ago

Hm, interesting. fira-code-mode is mostly a wrapper around Emacs' builtin prettify-symbols-mode, which handles all of the rendering/faces and such. The only other font alteration fira-code-mode does is adding some styling to instances of 0x in the buffer when the customize setting fira-code-mode-enable-hex-literal is enabled (the default).

I doubt that the hex literal font locks are causing your issue, but it probably would be easy to try it anyway to see if disabling it fixes your issue!

If disabling fira-code-mode-enable-hex-literal fixes it, then I might be using font-lock incorrectly, in which case I can try to fix it here! But if that doesn't fix your problem, then it's out of scope for fira-code-mode -- at that point it would have something to do with the interaction between eat and the prettify-symbols-mode builtin.

Hope this helps!

lambdadog commented 1 year ago

@jming422 Ah, this does seem to be the case. I missed it initially since just enabling prettify-symbols-mode does nothing on its own, but pushing something to prettify-symbols-alist before enabling it does cause the issue.

I'll close over here and update the eat issue, ty!