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

Ligature priority in ->-> #1562

Open
edemaine opened this issue Dec 5, 2023 · 2 comments
Open

Ligature priority in ->-> #1562

edemaine opened this issue Dec 5, 2023 · 2 comments
Labels
Milestone

Comments

@edemaine
Copy link

edemaine commented Dec 5, 2023

->-> (nested functions in CoffeeScript and Civet) seems to prefer rendering as

image

instead of what I expected, which you'd get from greedy matching:

imageimage

I don't know much about ligatures, but I'm guessing they can be assigned a weight to give them priorities. Perhaps equal priority would fix this issue? I'm not sure if there's a fix that doesn't break any use-cases, but I also can't imagine that ->-> would make sense with a >-> ligature. Alternatively, I could remove the >-> ligature for my use-case.

@tonsky
Copy link
Owner

tonsky commented Dec 6, 2023

Thanks! I’ll take a look

@edemaine
Copy link
Author

edemaine commented Jan 22, 2024

Somewhat related: |>= is an operator in Civet (pipe assignment) that intends to render as ▷= (a triangle followed by an equals sign), but currently renders as |≥ (a vertical bar followed by greater-than-or-equals). This could be solved by priority (perhaps), or by an additional ligature. Let me know if this is better split into a separate issue; otherwise, I'll leave it here.

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

No branches or pull requests

2 participants