Self is no longer a Keyword

usually self is colored as a keyword but now it’s colored as Text, this causes confusion.

happens all the time after update 451

14 Likes

self holds no speciality, it’s merely a local variable pointing to a table. Update 452 (sitetest1) contains a ‘self’ keyword colour setting, so this is probably intentional.

iirc this was planned as per the guidelines of the new studio highlighting update that was mentioned in announcements some time ago.

To OP: I second what’s said here, it’s likely intentional. We’ll figure it out soon, I suppose.

It’s been kind of mentioned already but I’d like to specify: self was neither a keyword nor global.

It ever being highlighted as a keyword would be the real bug.

10 Likes

Yup that’s right! It’s neither a keyword nor a global and we fixed it as part of the syntax highlighting update. We will also include an option to customize the “self” word in a future update!

11 Likes

I would’ve actually preferred if it was considered a global for consistency’s sake since platforms such as VSCode, Stackoverflow etc. do so too.

9 Likes

I wouldn’t mind that as long as that option " to customize the “self” word" is available after the change was made

I don’t really care what the technical term is I just want it to be less confusing

4 Likes

This update confused me too. I think there should be an option to have it as a keyword, because I’m used to it being a keyword, so it’s much harder to locate. In my opinion, it looked much better as a keyword.

5 Likes

I am glad that there will be an option to customize ‘self’. It disappointed me to see that self was merely the same color as everything else.

self should never be considered as a global. The only reason why I used self is because Roblox Studio lacked customizing variables that can pass through methods, other than explicitly using self.

Before I was using Roblox Studio, I was always using this or more explicit naming conventions to pass through methods. Naming self as a global would not make this case any better. The highlighting is purely for decorative purposes.

As darkmodeonn mentioned earlier, we will be able to customize the color and even change the word to fit our conventions of programming.

1 Like

Seems like this has also happened to continue

image

It’s no longer considered a keyword.

5 Likes

Even though it’s not technically special, it’s much more helpful to have it highlighted for code readability anyways imho. Lots of my code for objects looks super confusing now.

Syntax highlighting is meant to be in service of readability, not necessarily technical accuracy.

10 Likes

Make an options area where you can add your own keywords for it, would be super neat and for those self lovers like me :slight_smile:

1 Like