Add table variables to autofill when writing function

Currently any table variables will not show in autofill when writing a function inside a table or a method of that table.

When declaring a function, I would expect the autofill window to appear with a list of variables that are tables in the current scope

3 Likes

This was something I reported as a bug and was moved to Studio Features.

Since standalone global functions are a discouraged practice, I don’t see why this would be something bad to implement. When I use the global function syntax, I’m always declaring a function/method for a table, and it would make sense that already declared tables would populate.

At the moment this is a scenario where we suppress Autocompletions because when believe that it’s more common to be defining a new global function here than creating one in a table. We can reevaluate this decision, though, if completing table variables here is something people want.

As a follow-up, if the table is nested, would you additionally want table members to complete after a .?

2 Likes

Would be nice if you could reconsider, and I would say yes to autofill in nested tables even if it’s something I don’t think I’ve done before but I can imagine scenarios where it could be used

I think it’s a feature many people don’t notice but would be used a lot if implemented

It is also far more common for me to define a method (hundreds) vs global functions (rarely)

2 Likes