Because defining a global function or a local variable usually involves introduction of a new name we didn’t intend to provide autocomplete suggestions in these cases.
While it’s true that it might be a method definition on a table in the scope, we don’t know that until we get to ‘.’ or ‘:’.
In essence, we don’t have a code with a bug for this situation, we don’t have any code at all.
Having said that, for Luau we try to discourage definitions of global functions, so we do have an opportunity to treat ‘function ___’ as a beginning of a method and suggest tables available in scope.
For anyone who stumbles onto this thread that shares the same sentiment, I’ve actually made a plugin that adds this exact functionality to the roblox intellisense inspired by @sleitnick’s Require Autocomplete plugin.