tonsky / FiraCode

Free monospaced font with programming ligatures
SIL Open Font License 1.1
77.48k stars 3.11k forks source link

"{-" sequence looks weird #248

Closed narqo closed 8 years ago

narqo commented 8 years ago

While most of the ligatures are great, the sequence of characters {- looks weird for my taste.

A typical case in Go language is to specify the content of a slice/array/map within a single line. But if a slice of integers starts with a negative number, it turned into a mess of characters.

For example, here is how a slice {-25, -160} looks like in IDEA:

screen shot 2016-08-21 at 20 54 53

I use IDEA 2016.x with FiraCode 1.102.

tonsky commented 8 years ago

Yep. Initially it's a Haskell comment ligature (I think). I think I'd better remove it or move to stylistic set

On Mon, Aug 22, 2016 at 12:59 AM Vladimir Varankin notifications@github.com wrote:

While most of the ligatures are great, the sequence of characters {- looks weird for my taste.

A typical case in Go language is to specify the content of a slice/array/map within a single line. So if a slice of integers starts with a negative number, it turned into a mess.

For example, here is how a slice {-25, -160} looks like in IDEA:

[image: screen shot 2016-08-21 at 20 54 53] https://cloud.githubusercontent.com/assets/88045/17838915/8defd4b8-67e1-11e6-91df-df687dd97348.png

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/tonsky/FiraCode/issues/248, or mute the thread https://github.com/notifications/unsubscribe-auth/AARabE1nEBzmrLDyahLJSanTqc_zuvPpks5qiJHqgaJpZM4JpWV0 .

DylanRJohnston commented 8 years ago

Is there some way we can choose which ligatures we want on / off? I work with Haskell and quite like the [] and {- -} ligatures. In fact a large number of the ligatures you've removed in the past are really useful in Haskell since it's such an infix operator heavy language.

tonsky commented 8 years ago

Not yet, but I think something like that is needed

On Mon, Sep 5, 2016 at 9:04 PM Dylan R. Johnston notifications@github.com wrote:

Is there some way we can choose which ligatures we want on / off? I write in Haskell and quite like the [] and {- -} ligatures.

— You are receiving this because you modified the open/close state.

Reply to this email directly, view it on GitHub https://github.com/tonsky/FiraCode/issues/248#issuecomment-244754484, or mute the thread https://github.com/notifications/unsubscribe-auth/AARabAcq5ly7NI3fSLqSLu7IqRlkwIlSks5qnCFTgaJpZM4JpWV0 .

maddes commented 8 years ago

Maybe creating variants? Like FiraCodeHaskell, FiraCodeJs, etc… New ligatures an improvements could be added to all and then removed as requested :P So if I work on a particular IDE for PHP, I use FiraCodePHP, for Haskell some other and such. Even maybe a FiraCodeConsole variant would ease some of the problems.

maddes commented 8 years ago

And then the ultimate feature would be to be able to select the font for each type of file with .editorconfig. Obviously not on your scope.

QuingKhaos commented 7 years ago

Oh sad, that would have looked nice in Twig, where {{- variable name -}} is used for whitespace control (compared to {{ variable_name }} without whitespace control.

dhouck commented 7 years ago

Your other issue, #408, is probably better; whether or not {- is a ligature, {{- can be, and it is used less often (though not never) in non-template code.