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 looks strange in the middle of words #1103

Closed
michaelkuhn opened this issue Jul 26, 2020 · 11 comments
Closed

.- ligature looks strange in the middle of words #1103

michaelkuhn opened this issue Jul 26, 2020 · 11 comments
Labels
Milestone

Comments

@michaelkuhn
Copy link

In German, we really like hyphenated words. They sometimes also contain periods because they contain abbreviations or numbers, which looks strange (see attached screenshot taken with Fira Code 5.2).

Would it make sense to only enable the .- ligature if it is surrounded by whitespace?

Bildschirmfoto von 2020-07-26 22-38-28

@tonsky
Copy link
Owner

tonsky commented Jul 26, 2020

Space won’t work, but it was originally intended for Clojure. Maybe it’s not worth keeping—looks strange anyways

@tomyun
Copy link

tomyun commented Aug 19, 2020

FYI, it also kinda conflicts with Julia where .- indicates minus operator with syntactic loop fusion.

@clason
Copy link

clason commented Aug 20, 2020

I don't know how much work this is, but would it be a compromise to turn this ligature into a stylistic set? (Since, at least anecdotally, it seems to be annoying in more situations than it is useful, it's probably better disabled by default, but either choice would be a strict improvement.)

@RubenVerg
Copy link

In scala, there are no operators. All "operators" are just functions that use inline operator syntax, so a.fn(b) becomes a fn b. 3 - 3 can be written as 3.-(3). If the ligature applies, and it becomes 3·-(3), it's hard to read.

@tonsky tonsky added this to the 6 milestone Aug 20, 2020
@pcjentsch
Copy link

FWIW I like it in Julia

@clason
Copy link

clason commented Sep 11, 2020

@pjentsch0 Really? Doesn't it bug you that it's only for .- (and .=), so a .= α.*b .+ c .- d is not consistent?

(What would be perfect would be a stylistic set that aligned . + 'operator' consistently, but how would you choose which operators to include?)

@pcjentsch
Copy link

@clason It does, and I agree that a set is better, but I'd prefer to only have a ligature for .- than no ligatures.

Could we not align . and +-=/ ? Of course you can broadcast almost anything in Julia, but I think that covers a lot of the common use cases. Usually I use the @. macro for long broadcast chains.

I'm not sure what a stylistic set is, I assume it's like a set of ligatures that can be enabled/disabled?

@clason
Copy link

clason commented Sep 11, 2020

@clason It does, and I agree that a set is better, but I'd prefer to only have a ligature for .- than no ligatures.

Interesting.

Could we not align . and +-=/ ?

That would be a reasonable default, yes, but I'd add *.

Usually I use the @. macro for long broadcast chains.

That works (unless there are enough operations that are not supposed to be broadcasted (but that is getting beside the point here).

I'm not sure what a stylistic set is, I assume it's like a set of ligatures that can be enabled/disabled?

https://github.com/tonsky/FiraCode/wiki/How-to-enable-stylistic-sets

@pcjentsch
Copy link

pcjentsch commented Sep 11, 2020

That would be a reasonable default, yes, but I'd add *.

Definitely, I forgot that one.

https://github.com/tonsky/FiraCode/wiki/How-to-enable-stylistic-sets

cool, thanks

@eins78
Copy link

eins78 commented Sep 16, 2020

Another (real-world) example: MwSt.-Nr.
Screenshot 2020-09-16 at 21 46 20

tonsky added a commit that referenced this issue Oct 8, 2020
@tonsky
Copy link
Owner

tonsky commented Oct 10, 2020

Will be disabled in v6 by default. Linked: #860

@tonsky tonsky closed this as completed Oct 10, 2020
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

7 participants