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

[D] Grammar and ligature support has some oddities #1403

Closed
TheGag96 opened this issue Jan 30, 2018 · 3 comments
Closed

[D] Grammar and ligature support has some oddities #1403

TheGag96 opened this issue Jan 30, 2018 · 3 comments

Comments

@TheGag96
Copy link

TheGag96 commented Jan 30, 2018

(Repost from the Sublime forum)

I found out the other day that Sublime finally got ligature support, which is great. A lot of stuff from Fira Code works beautifully, but there are still some nitpicks I have that apparently stem from the way language grammars affect ligatures.

Some stuff I'm noticing:

  • the .. operator often makes Sublime think a float literal is on the right hand side if a numeral is there
  • the => operator for lambdas doesn't get made into the pretty Fira Code arrow
  • Stuff like 0x10 doesn't get the smaller x character (though this is the case for every other language too, as well as +-*:; ThomSmith pointed out this is due to lack of support for contextual alternatives)
  • /// is grouped as a double slash and one single further apart instead of the triple slash (this happens in C as well)
  • /= doesn't get combined like in C
  • ||= doesn't get recognized in D nor C (yet |= works just fine in both)
  • ~= doesn't get made into the tilde with a line under it (don't know whether it should be that way or not; this would be for concatenation)

As a side note, after an improvement update to the D grammar about two years back, class code became highlighted entirely with the "class" color. I've been dealing with this until now by setting that color to match regular text.

Anyways, hope to see these improvements. Thanks to the wonderful Sublime team!

@wbond
Copy link
Member

wbond commented Feb 9, 2018

All of the ligature issues are almost certainly related to the (current) poor quality of the D grammar. What we really need is someone who knows a lot about D and who is willing to learn some about Sublime syntaxes so that we can mentor and provide feedback on improvements or a rewrite of the syntax.

If you are interested in helping out, the following would be some good reading:

The C# syntax may be a good reference since @keith-hall has done a ton of work on that, and is one of the most active contributors from the community to this repo.

@BenjaminSchaaf
Copy link
Member

This should have been fixed by #1850 (Other than ||= as that isn't a operator in D afaik)

deathaxe pushed a commit to deathaxe/sublime-packages that referenced this issue Aug 25, 2019
This PR proposes to close some already fixed issues, which were not (correctly) referenced in the fixing pull requests.

Closes sublimehq#442
Closes sublimehq#685
Closes sublimehq#691 (invalid)
Closes sublimehq#795
Closes sublimehq#807
Closes sublimehq#903
Closes sublimehq#1141
Closes sublimehq#1172
Closes sublimehq#1245
Closes sublimehq#1257
Closes sublimehq#1286
Closes sublimehq#1320
Closes sublimehq#1357
Closes sublimehq#1382 (wontfix)
Closes sublimehq#1403
Closes sublimehq#1451
Closes sublimehq#1453 (maybe)
Closes sublimehq#1472
Closes sublimehq#1495
Closes sublimehq#1540
Closes sublimehq#1542
Closes sublimehq#1565
Closes sublimehq#1576
Closes sublimehq#1625
Closes sublimehq#1880
Closes sublimehq#1898
Closes sublimehq#1940 (invalid)
@wbond
Copy link
Member

wbond commented Oct 24, 2019

This issue has been solved by a previous commit, hence it is being closed.

@wbond wbond closed this as completed Oct 24, 2019
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

3 participants