Stream: t-compiler/wg-rls-2.0

Topic: real fancy highlighting


Jake Goulding (Jul 21 2020 at 11:37, on Zulip):

https://buttondown.email/hillelwayne/archive/syntax-highlighting-is-a-waste-of-an-information/

When do we get some of these in RLS? :-)

Jonas Schievink (Jul 21 2020 at 11:40, on Zulip):

r-a has rainbow highlighting, but it seems to be broken at the moment: https://github.com/rust-analyzer/rust-analyzer/issues/2436

Laurențiu Nicola (Jul 21 2020 at 11:40, on Zulip):

The trickier part is probably combining all that info while still keeping the result somewhat understandable

Laurențiu Nicola (Jul 21 2020 at 11:40, on Zulip):

https://github.com/rust-analyzer/rust-analyzer/issues/4691 would be nice tho'

matklad (Jul 21 2020 at 11:42, on Zulip):

We have a bunch of highligting niceties:

Jonas Schievink (Jul 21 2020 at 11:43, on Zulip):

Also see editor.semanticTokenColorCustomizations for building your own highlighting

matklad (Jul 21 2020 at 11:44, on Zulip):

Jonas Schievink might be hard to do that in Emacs :D

Jonas Schievink (Jul 21 2020 at 11:44, on Zulip):

Ah, yeah. But that's an editor limitation ;)

Laurențiu Nicola (Jul 21 2020 at 11:47, on Zulip):

We also support highlighting for ? IIRC. I think being hard to notice was one of the bigger complaints about it.

Jake Goulding (Jul 21 2020 at 11:48, on Zulip):

Emacs being less customizable than something else sounds silly :sweat_smile:

matklad (Jul 21 2020 at 11:52, on Zulip):

@Laurențiu Nicola one think I've wanted for a long time is exit point higlighting:

image.png

(note subtle background around ? and the tail expr)

I think this should be implementable on top of highlight ranges request

Laurențiu Nicola (Jul 21 2020 at 11:53, on Zulip):

Laurențiu Nicola said:

https://github.com/rust-analyzer/rust-analyzer/issues/4691 would be nice tho'

^^

Laurențiu Nicola (Jul 21 2020 at 11:54, on Zulip):

Yeah, we could use the semantic highlighting support

matklad (Jul 21 2020 at 11:55, on Zulip):

I am thinking rather about https://microsoft.github.io/language-server-protocol/specification#textDocument_documentHighlight

Laurențiu Nicola (Jul 21 2020 at 11:56, on Zulip):

Oh

Jeremy Kolb (Jul 21 2020 at 13:01, on Zulip):

You could probably abuse the Write kind since I think that one stands out more than Read.

Jeremy Kolb (Jul 21 2020 at 13:01, on Zulip):

I am a little surprised that's not an open list actually

woody77 (Jul 21 2020 at 23:49, on Zulip):

matklad said:

Laurențiu Nicola one think I've wanted for a long time is exit point higlighting:

image.png

(note subtle background around ? and the tail expr)

I think this should be implementable on top of highlight ranges request

That's an awesome modifier to add to the semantic highlighting. Too bad that VSCode (at least) can't set background colors in semantic highlighting..

Laurențiu Nicola (Jul 22 2020 at 04:08, on Zulip):

Maybe we should file an issue for that

matklad (Jul 22 2020 at 09:19, on Zulip):

@woody77 hm, yeah, I think it makes sense to add this as a modifier as well, even if themes can't take advantage of it right now

woody77 (Jul 24 2020 at 00:33, on Zulip):

Laurențiu Nicola said:

Maybe we should file an issue for that

Lemme go do that...

woody77 (Jul 24 2020 at 00:47, on Zulip):

Turns out background highlighting is an old issue that's in the backlog: https://github.com/microsoft/vscode/issues/3429

Last update: Sep 27 2020 at 14:30UTC