We are going to fix this next week.
Having the method name, argument name and type all be different colors in this pop up would make it quicker and easier to read at a glance
If an argument can accept a function value, autofill should not put the brackets () at the end. It’s more common for people to want to use the function as the value rather than whatever is returned from the function
What is this huge string of complete nonsense and why does it show up when I am editing a table? When typing on the second line of a table, it completely blocks the first line and makes it impossible to focus on it
I like it, but please, make it so it works when something is gotten from a WaitForChild, or FindFirstChild, here is a button I get with waitforchild, autocomplete where???
Yeah, this has always been annoying.
Thats also a thing, we should get GetService as the first thing when typing game:G
or game:g
.
With the release of Studio 491 we have included a few minor improvements.
else
and elseif
keywords are now suggested:
We are aware of the issue where ElapsedTime
is still suggested when else
is typed in full
Uppercase Workspace
is suggested instead of the deprecated version:
Fixed missing members of StudioStyleGuideColor
, StudioStyleGuideModifier
, PermissionLevelShown
, HoverAnimateSpeed
, ListDisplayMode
, OutputLayoutMode
, LanguagePreference
, ServerAudioBehavior
, AutoIndentRule
and DraftStatusCode
enumerations:
When using this code
local module = {}
type obj = {
Test: () -> ()
}
function module.new():obj
local testObj = {}
function testObj:Test()
end
return testObj
end
return module
I always get this warning: This function does not take self. Did you mean to use a dot instead of a colon?
--!strict
local module = require(script.Parent.Module)
local obj = module.new()
obj:Test()
To fix it, you have to do this which is pretty annoying:
type obj = {
Test: (obj) -> ()
}
Then users might get confused about the additional parameter and you have these cycle references.
Autocomplete uses the script editor font, and the UI resizes accordingly. Does reducing the Script Editor font size resolve this problem for you, or did you mean you want the ability to size Autocomplete text differently than Script Editor text?
i like to see more features added to luau!
Thanks for improving a bit in Studio 491.
I just noticed now that when doing Instance.new() or Instance:IsA() it doesn’t show the instance options until you put the quotations.
Instance.new() --usually I can see the options by now
---------
Instance.new("") --quotes required to see the options
Also when doing something like
Instance[property] = [thing]
I would type out the entire thing that I want such as
Instance.Parent = plr --autocomplete is still suggesting, so I have to press enter twice to move on
This is a bit more of my feedback, hopefully the team can improve more on this.
When I use :IsA, there is no auto fill, and I use isa a lot.
Could table keys be shown in different methods on the same table?
Do you have an example where it fails? IsA() appears to be working as far as I can tell.
It seems to be working now, which is strange. I had this problem just yesterday. I will follow up if I can reproduce the issue again.
Is this fix still being worked on? One week later, and while an update has been released, still auto-completing with ElapsedTime.
Cool! However, this still occurs.
For me I still get establishedtime when typing el
That is presumably because Luau cannot infer that PlayButton
is infact a button, so you can do script.Parent:WaitForChild("PlayButton") :: GuiButton
, but I’d argue putting scripts inside of GuiObjects is a questionable practice, but I digress.
Adding on top of this, I found out that some properties of CatalogSearchParams
are declared incorrectly:
CatalogSearchParams.BundleTypes
declared as string
, expected {Enum.BundleType}
CatalogSearchParams.AssetTypes
declared as string
, expected {Enum.AssetType}
CatalogSearchParams.IncludeOffSale
declared as string
, expected boolean
A new Studio update 492 has been released and with that come additional Autocomplete improvements.
Callbacks are now suggested using correct index syntax:
Thank you @BenMactavsin, @JoolCaat
Keywords that are values (true
/false
/nil
) or are used to introduce a value (function
) are now assigned a type and prioritized in type-correct contexts:
Thank you @0_salcret
Function type argument names are displayed in function signature help (when available):
Autocomplete will now try to suggest type annotations for function arguments:
And for locals:
@sjr04, @wynnrar this might help your event listeners until we get automatic inference.
WaitForChild
lookups are now supported when we know the type:
In this example,
AssignBlock
is a RemoteEvent
so you get the fields you expect.Thank you @PoweredToFour
Luau learned to handle require
through FindFirstChild
and WaitForChild
.
When lookup can be resolved, Autocomplete will provide module type data:
Thank you @paap15, @clayman100man
task.spawn
and task.defer
definitions were fixed:
Thank you @PysephDEV
When a function is auto-completed into an argument that accepts a function, () are not added:
Thank you @gillern
As always, we will continue adding fixes and improvements in the following weeks!