Auto-completion not working when requiring extensions from another script (global variables) (SOLVED)

Hi!

I’d like to require modules/extensions I use in a “main.script”, and set them as global variables, so I can eventually require new extensions without having to update all my scripts:
image

The problem is that the code auto-completion (pretty convenient, particularly when you start using a library) doesn’t work anymore in that case.
image ==> (in player.script)
image

But the extensions in question still work as intended (I just don’t have the auto-completion).

(+ Everything works fine when requiring in each script as local variables)

image
I don’t know if this is a bug, a feature request, or just that I don’t know how to do something… but is there a way to make the auto-complete work when requiring extensions from another script (as global variables)?

Note: same when requiring a Lua module containing functions (auto-completion working in the script where the “require” is made, not in the other scripts)

But they seem to be global by default, so it makes sense.

Yes, I have noticed this as well. Seems like a simple oversight.

The editor is not clever enough to figure out that the module you require and set as a global in one script is also available in other scripts.

Ok! So this is the expected behavior.

I just “requested” a feature for the 1st time on Github (:tada:):

Is there something else I should do? (except marking this topic as “solved” and praying for this feature to be added :pray:)

2 Likes