Skip to content
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

Readme is outdated - MacVim now as optional support for ligatures. #32

Closed
HealsCodes opened this issue Nov 4, 2015 · 23 comments
Closed

Comments

@HealsCodes
Copy link

I think the title says it all - I worked on a PR which recently got merged into mainline MacVim which enables ligature support for the CoreText renderer 😸

@i-tu
Copy link
Owner

i-tu commented Nov 5, 2015

That's great! Can you provide some more information, like a link to the PR? Which release includes or is scheduled to include this feature?

@HealsCodes
Copy link
Author

Sure,
The implementation is in PR #56 closing issue #36.
It was merged on August 23rd and is part of MacVim Snapshot 79 released on October 31st.

Here are some visuals:
ligature-demo
demo

i-tu added a commit that referenced this issue Nov 5, 2015
@i-tu
Copy link
Owner

i-tu commented Nov 10, 2015

Thank you a LOT for doing this, great work! :)

@i-tu i-tu closed this as completed Nov 10, 2015
@lozandier
Copy link

This doesn't seem to work with the recent versions of MacVim; was this highly-anticipated feature disabled for a reason not explicitly made clear in the release branch notes of more recent releases of MacVim?

@HealsCodes
Copy link
Author

No, the latest snapshot builds still have it.
But by community decision it was further improved.

The GUI option was converted to a vimrc option.
You can now do set macligatures to toggle them on the fly.

@lozandier
Copy link

Ah, thanks for taking the time to clear this up!

On Fri, Dec 4, 2015 at 11:49 AM, Shirk notifications@github.com wrote:

No, the latest snapshot builds still have it.
But by community decision it was further improved.

The GUI option was converted to a vimrc option.
You can now do set macligatures to toggle them on the fly.


Reply to this email directly or view it on GitHub
#32 (comment).

Kevin Lozandier
lozandier@gmail.com lozandier@gmail.com

@joaomilho
Copy link

screen shot 2016-01-13 at 10 01 20 pm

I have the right MacVim version, the right font, and ligatures enabled, but still... It actually worked randomly using Fira Code, say, 3% of the time :/

Any idea?

@HealsCodes
Copy link
Author

Hmm..
While I haven't tried with Haskellig yet I'm using Fira Code along with the Core Text renderer and set macligatures.
I see you have cursorline enabled (finally I'm not alone!) - could you maybe try set number and set relativenumber in addition?

It shouldn't make a difference since the ligatures option now forces redraws of it's own but might be worth a try..

@joaomilho
Copy link

Mmm, doesn't make any difference. What is Core Text renderer, BTW?

@HealsCodes
Copy link
Author

If you look at the animated GIF in my second comment you can see the option.
It's located in the Gui settings dialogue.

@HealsCodes
Copy link
Author

@joaomilho - I think I found your problem (and I have to say it's likely a limitation of what we currently can do in the renderer in MacVim).

MacVim requires all characters forming a ligature to be rendered in one go (e.g <+> have to be detected in sequence). However the Vim core which is issuing the drawing commands to all GUI frontends is implemented in a way that it will issue multiple drawing calls for differently colored characters.
(There also is currently an open issue with ligatures if you use colorcolumn for the same reason).

You can check by disabling syntax highlighting:
ligatures-syntax-impact

It's best visible in line 5 where all of the <X> triples switch between normal and ligature rendering.

@joaomilho
Copy link

I actually experience no difference by setting :syntax off.

@HealsCodes
Copy link
Author

Did you check the GUI settings for the CoreText renderer?
coretext renderer

I'm currently testing on an in-between-88-and-89 version and it works fine for me.

@joaomilho
Copy link

Yeap, both with and without.

@joaomilho
Copy link

Actually closing after changing the config makes it work, sometimes. With the syntax off works consistently, but with syntax on in some places, and it adds a red background in the ones that fail. Kinda like...
screen shot 2016-01-14 at 10 50 10 pm
screen shot 2016-01-14 at 10 49 58 pm

@joaomilho
Copy link

I suppose this will depend on the filetype... (2 mins later) ... yeah, of course, in a .hs file it works correctly since my highlight considers <$> a sequence, while in, say, html it considers $ a tag name and changes the color.

@joaomilho
Copy link

BTW, what about function => ƒ ? :D

@HealsCodes
Copy link
Author

There, now I'm really eager to find your problem..
However I'm almost headed for bed - mind sharing your vimrc in a gist or something so I can have a deeper look tomorrow after work?
(would also be nice to know the plugins you're using)

@joaomilho
Copy link

I guess you didn't read my last comment, it's actually working fine now :D Thanks a lot.

@HealsCodes
Copy link
Author

Ah, yes I didn't read that while posting my comment.. Glad it works now 👍

@dashingspidy
Copy link

Greetings,
I'm also facing same problem. Ligatures doesn't effect immediately. I only see them after i go to next line. I do have same settings as above.

@dashingspidy
Copy link

If i uncheck both "Use Core text renderer" & "Draw marked text inline", it works like a charm.

BTW, i'm using version 8.0.3

@chrisvacc
Copy link

chrisvacc commented Dec 24, 2018

Amazing patch, but yea it’s all funky for me until you hit Enter or rerender it

firagif

Turning off CoreText Renderer just makes everything look terrible

Anything? I really love this feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants