tweak(ocaml): add more extra ligatures #7809
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Tuareg mode (for ocaml) current uses
its own ligatures. This extends that
with some extra, non-conflicting ones
using the
:ui ligatures
module'spre-defined ligatures.
Before:
After:
I'm using the dot instead of the cartesian product sign for the tuple type because it uses the * character, which is also used for multiplication. One way to resolve this is to add the cross product symbol to the default
+ligatures-extra-symbols
plist as a compromise between X for multiplication and X for cartesian product. I'm not sure if this is optimal, though, should this be done?I added the tuple symbol just for the screenshot, but I might remove it because of how hacky it is (matches on ", " to avoid it being lopsided, but then tuples not in that format won't work + there are no spaces on each side).