-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What would it take to get ligatures working in emacs? #42
Comments
AFAIK, Emacs does not support ligatures. There’re plugins to do substitution on presentation level though, so you can replace some sequences to unicode symbols |
Check this out though https://github.com/tonsky/FiraCode/wiki/Setting-up-Emacs |
Not sure where the best place to report this is, but one of the lines in the Emacs workaround seems to cause Emacs to hang at 100% when connecting Cider, and produces the error:
The offending line is:
Comment that out and everything works fine. The regexp looks pretty innocuous to me, but perhaps one of the buffers opened by Cider is causing an edge condition that makes it take a long time to match. Should I open a new issue for this? This workaround isn't officially part of Fira Code, really, so I'm uncertain whether I should. Edit: I believe this post addresses the bug directly. |
I encountered the Since I'm running emacs 25 pre-release and my config doesn't work with 24.5, I patched emacs HEAD with the relevant code from the above commit and recompiled (I pointed homebrew emacs at my github). minimal/emacs@812dd51 I pasted the elisp into my config so i can enable and disable the ligatures easily and it's been working great ever since. https://github.com/railwaycat/mirror-emacs-mac/commit/e7a046987d66136da55ae10a9ef90728d1442cbb#diff-3b589fe753801617f11a90443057ef7eR483 This is all mac centric, don't know what the story is on other platforms. |
Ok, I’m not an emacs user, so I don’t really understand what’s going on. I put a link to this issue to the wiki page with Emacs setup instruction |
What should I do to ligature |
The patch linked above doesn't apply cleanly to the emacs 24.5 distribution tarball. I've modified the patch slightly to accommodate the differences. I've built emacs with this patch on both linux and OS X and it seems to work fine and also fix the infinite loop issue. |
#158 is a more specific bug for the hang, I think |
While I can get fira code to work normally in my emacs on linux, I can't get ligatures to display (tried with firacode 1.200 OTF on emacs 25.0.95.1 and 24.5.1, using https://github.com/tonsky/FiraCode/wiki/Setting-up-Emacs). I read in this bugtracker that emacs on osx was patched to support ligatures so I wonder... Are the ligatures working only in emacs OSX, with no way to get it to work on linux short of patching and rebuilding emacs? EDIT: I've built this emacs version from source: https://bitbucket.org/mituharu/emacs-mac (version 5.18) on linux, and even with that version and the "Setting up Emacs" setup, I still don't get ligatures. |
I've googled some more and stumbled on that email thread:
So for now I think the ligatures only work in the OSX version of emacs, when running on mac. Please correct me if I'm wrong. |
@emmanueltouzery I didn't do as deep research as you did. But it is not working for me on emacs on linux even with the settings in the "Setting up emacs" wiki page. |
@mordocai really? With ligatures? Which distribution is that? Or self-built emacs? No way i could get it to eork on linux. Glad if it's possible! |
@mordocai said:
;( |
Ah yes sorry, misread you |
@emmanueltouzery I'm looking at trying https://www.reddit.com/r/emacs/comments/4sm6fa/how_to_enable_pragmatapro_ligatures/ for fira code. Specifically https://gist.github.com/DeLaGuardo/fe1f3d9397d6ef7468460d54d5601156 but I need to figure out what numbers I need to plug in. Edit: This does look like it works fine but I haven't yet figured out what codepoints to map to. |
So I haven't figured out the correct code points yet (is there a list somewhere? I didn't see it) but after you know them you just need to fill them in with the correct character sequences like this: https://gist.github.com/mordocai/9fee3227d32c1945dccd8adb9ed03c55 If anyone can help me with the code points then I'll update the wiki once I confirm it works. |
I got this working over here: #211 (comment) |
Can someone who still has his snippet post it again? Unfortunately he deleted his account :( |
I think you're referring to this @benbot?
|
This bug appears to have nothing to do with Cider mode. I was able reproduce it when using Magit to work on this large file. Commenting out the line is insufficient to fix it in this case. |
I have written a little program that automatically generates the composition char table for Fira Code. I used it to update the above table to Fira Code 2, see https://github.com/boystrange/EmacsFiraCode I'd be happy to update the instructions with the workaround if you feel it's worth it. |
I have been using https://github.com/johnw42/fira-code-emacs, it uses Fira Code 2.0. Although in some modes I am getting the wrong ligatures. |
I'm doing a lot of F# in emacs lately and find that I'd love to have this on my emacs like I do in Visual Studio.
I'm mostly looking for a starting point to work out what I would need to do to get the ball rolling myself.
The text was updated successfully, but these errors were encountered: