self is not a keyword and is handled exactly the same as any other identifier in language.
These statements contradict each other.
I’m noticing this too:
self can’t be a keyword; otherwise it couldn’t be used as a variable. It often gets highlighted exceptionally because it is assigned implicitly when using the Method syntax sugar. Roblox chose to highlight it using the same style as keywords, hence the confusion. If there are any doubts, the Lua manual lists every keyword:
type) are Luau-exclusive tokens whose type depends on the context. Presumably, Roblox’s custom syntax highlighter will eventually style them the same as keywords when they are used as statements, or as variables otherwise.
A syntax highlighter does not determine the type of a token. It’s the other way around; the type of a token determines how it will be styled. Often, the grammar of a syntax highlighter is more primitive than the grammar of the language being highlighted, so exceptions are made if something can’t be accurately represented. Ideally, both grammars would be exactly the same, which Roblox is taking steps towards achieving.
Because one is wrong.
self is not a keyword.
Indeed, I stand corrected. The term
keyword in the context of programming implies that it cannot be used as an identifier, which conflicts with the semantic definition of the term “keyword”, which I understand to be a word with a special meaning. This is what was intended by my post.
Thank you for the clarification, it’s greatly appreciated.
The issue as I see it is that the
continue token and any references to the word
self were previously highlighted and bolded. This change actively made my code more confusing to read, and removes a previous feature.
Hi! This case should now be fixed.
I think it is intentional but it is definitely throwing me off. It’s harder for me to find built in methods now because of this change. (especially “self.” and “self:”)
This update introduced a short 1-2 second freeze when switching script tabs for me. This happens every time I switch to a script tab (but not when I switch to the world view tab). I think this is because highlighting (or maybe some keyword stuff, something intensive) is processed when the tab is viewed, whereas before (just a guess) I think it would have been happening once when the tab is first opened.
Otherwise, I’m super happy with everything. (Also, glad to hear that
self’s highlighting is also going to be fixed, its really wrecking my flow haha… Crazy how much the color of one little word does to my ability to read my code)
Hi - a few questions:
Do you mean when you first open a script, or when you switch back to a tab you previously had open? Are you reopening the tab at the same position you left it, or jumping around using, say, the find widget? Does the script first display un-highlighted and then highlight after a second? Or does it initially display highlighted?
Not sure if my post was disregarded, but this is generally one of those smaller features that provide quality of life. Previously when you highlighted a word it would automatically highlight those that matched, this has been changed in this update and currently doesn’t do this.
Both when a script is first opened, and when I switch to a tab I previously had open the freeze occurs.
I am opening the tab at the same position I left it in, and, reordering them has no effect on the duration of the freeze (nor causes a freeze).
I do not have the find widget open.
When switching to an already opened tab I see exactly whatever was last displayed on that tab pixel for pixel, including the typing indicator if it was displayed. (Basically, if I switch to a tab, place my cursor somewhere, and swap right as the cursor blinks on, then swap back, the cursor will always again be visible in the frozen view, and likewise, if I switch when it is not visible, it will not ever be visible when I switch back whether or not the cursor was visible in the tab I am switching from. I suspect that whatever was rendered to the view is cached in memory)
When opening a brand new script tab, or closing a script tab and reopening the same script the text is not highlighted during the freeze, but, the freeze still occurs and occurs for roughly the same length.
Additionally, the Script Menu buttons at the top of studio are grayed out during the freeze when switching from the world view to any script view (so I assume the freeze is occuring before these buttons are updated):
Looks like that’s the vanilla macOS color picker. You can choose the sliders at the top to get different options.
I am hoping in the future, that they add spelling errors/autocorrect feature. Cause whenever I type my lines of code, I make spelling errors commonly and others do too. Otherwise, the new/upgraded feature looks nice!
It seems like I didn’t get this update even if I updated studio, do I need to enable it somewhere?
@darkmodeonn, this is amazing :}
It would also be nice to have this functionality for BrickColor as well
Thank you for the feedback @TheCarbyneUniverse!
We’re making changed to enable plugin developers to modify the “Custom” preset and offer more flexibility.
Furthermore, we’re fixing the partial highlights and looking into the command bar sizing
We’re looking into awesome autocomplete functionality that should help with that