juliamono icon indicating copy to clipboard operation
juliamono copied to clipboard

"SS20" (splashtidy) does not work in general cases

Open singularitti opened this issue 1 year ago • 5 comments

I tried to turn feature code "SS20" (splashtidy) on in VSCode with JuliaMono, but in general it does not work for a lot of cases:

__init__()
__()__
(_)(__)(___)
@groupby(_.a) |>
@map({a = key(_), b = mean(_.b)}) |>
image

As you can see, for functions like __init__(), and for code with more than one _ in () or (_.x), it will break.

I suppose a possible fix would be: whenever there is one or more _ next to a ( or a ), _ should be pulled down a little and ( or ) will be stretched.

singularitti avatar Dec 28 '23 05:12 singularitti

Hi! Yes, it was a quick hack to get the Julia start-up banner to look a bit tidier (think t-shirts 😀) and it would be ideal if we could switch SS20 off automatically once the banner had been displayed... I have thought about removing SS20 - but perhaps it's fixable with some more effort on my part.

cormullion avatar Dec 28 '23 09:12 cormullion

I think at least (_.a) should be a quick fix. Perhaps only allow (_) working.

singularitti avatar Dec 28 '23 09:12 singularitti

I had another look at this; there are some technical problems that stop me from doing the job properly: I can't find patterns that span the ANSI color escapes, and I can't use space as part of the search pattern. Not to mention that the stylistic sets aren't supported in every application...

So I've ended up with just (_) and a few continuous runs of glyphs that can be tweaked:

In Wezterm:

Screenshot 2024-01-06 at 10 27 39

In VSCode Editor:

Screenshot 2024-01-06 at 10 40 05

cormullion avatar Jan 06 '24 10:01 cormullion

Why not just pull down all _ when turning on SS20? I know Iosevka does this with "cv99"=3.

singularitti avatar Jan 08 '24 11:01 singularitti

current master:

Screenshot 2024-01-08 at 15 57 33

your "why not...""

Screenshot 2024-01-08 at 15 57 03

I don't really mind either way...

cormullion avatar Jan 08 '24 16:01 cormullion