Closed ian-h-chamberlain closed 1 month ago
Maybe this can help you?
"editor.fontLigatures": "'ss01', 'ss02', 'ss03', 'ss04', 'ss05', 'ss06', 'ss07', 'ss08', 'dlig'",
This just turns off calt code ligature
That would probably work, but also has the side effect of disabling all the other calt
ligatures, which I would want in Rust, e.g. &&
, //
, ///
, ..
, ?.
, ::
, etc.
The tradeoff of having all those other ligatures is probably worth it vs this one corner case, but I think the optimal solution would just be to give the ::
ligature precedence over >:
(if that's possible), or define a new contextual alternate for >::
, or something along those lines.
Another alternative would be to move >:
and related ligatures into their own stylistic set (ss09
or something), but I'm not sure that would really match up with how the rest of the stylistic sets are structured or what they are meant to be used for.
I honestly don't see a big problem with this (turning off calt) simply because //
and other is not that different in my opinion.
I honestly don't see a big problem with this (turning off calt) simply because
//
and other is not that different in my opinion.
Actually, I just realized that disabling calt
also disables all texture healing, which to me seems like one of the main selling points of this font family! I suppose in VSCode you can limit the disabling of calt
to "[rust]"
in the configuration, but IMO it would be preferable to have proper turbofish support in the calt
set of ligatures.
Okay, yes I agree, I’m wrong. And in general, according to the development idea, they should have foreseen the turbofish syntax and how it should be displayed.
Fixed in ca8015b27bdc6d8e1201b1ad722f4ae3c38970d0
Rust code may contain a "turbofish", which is written like so:
Since there is a ligature for
>:
, this seems to take priority rather than the second::
. This can also have a side effect of making syntax highlighting look a bit weird if the>
is a different token type than::
, like so:Both of these ligatures are part of
calt
so as far as I can tell there's no way to disable just>:
with configuration.