Separate syntax highlighting color for type annotations

As a Roblox developer, it is currently too hard to see type annotations separately from variable names.

There is no syntax highlighting option to differentiate types from their attached variable names. It all turns into soup in my eyeballs and I have to focus too hard to see the variable name separately from the type annotation. If I space the type away from the variable, it makes it too hard to see the assignment that follows instead.

I want to make the type annotation a darker text color so it doesn’t command the same attention as the variable name so I can focus on what’s more important.

RobloxStudioBeta_2022-09-30_14-55-33

15 Likes

Yes, this is unfortunately missing right now.
We plan to add type annotation coloring in the future.

7 Likes

Sounds good, thank you. :slight_smile:
Any idea on timeline? Or is this just a backlog item that will happen when it happens.

1 Like

Just wanted to chip in and add some recommendations:

  • I feel like for default colors, a lighter color like 75, 75, 75 would be good for light-mode and a darker color like 150, 150, 150 would be good for dark-mode.

  • Only types being applied to something should be highlighted, not operators or type-variables.

  • Can be adjusted in Studio Settings of course.

Here’s a rough mockup of what I had in mind, not too encroaching but helpful enough:

Script Editor Mockup

3 Likes

Are there any updates on this? It would be nice to be able to quickly tell what is a variable name and what is the type
image

Hello, how far in the future are we talking?

1 Like

Hello, any updates regarding this? it is currently so hard to read at a glance when you start writing in
–!strict mode when the whole code is fully typed. can’t determine fast enough what is a variable vs what is a type.

Would really like to see this happen soon, it’s really annoying to have to slow down reading to make out what’s code and what’s not code. Believe it or not, the lack of quick distinction between types and variables are the main thing preventing a colleague from adapting them (much to everyone else’s dismay).