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.
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:
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).
This seems like a common sense feature that shouldn’t be hard to implement. Function parameters are a mess when its all the same color
function DoSomething(SomeObject: ObjectType, ObjectTwo: ObjectTwoType)
Type annotation highlighting would greatly help with distinguishing the parameters from one another and the number of actual parameters. If you were to quickly glance at that function, you might think it takes 4 parameters
I’m not using type annotations just because of this.
Currently, they have no other benefit than helping with autocomplete and other people understanding your code better. As I’m coding alone I won’t sacrifice the readability of my code for a better autocomplete.
It would be cool if type annotations didn’t interfere with that, if they were darker or something like that, as it could be a performance boost later on.
edit:
its finally here
I don’t see any announcements yet but I opened up my scripts and I see strange colors
exported types still have a coloring problem though: the module it is exported from is colored, but not the type itself
local module = require(module)
local a :module.thing