IntelliJ-EmmyLua
IntelliJ-EmmyLua copied to clipboard
Association of imported libraries with annotations
Is there any way to automatically associate import of libraries with separately written annotations for them?
Current workaround:
--- @type somelib
local somelib = require "somelib"
But it's not very convenient. Thanks.
project structure > module > mark as source.
Sorry, but I don’t understand how your example can help. Consider an example with Defold game engine. All modules in it are stored by zip archives in directory .interal/lib. So Emmylua plugin can’t read archives and analyze lua sources in them. The possible solution is to have in project separate files with empty dummy functions with emmylua annotations. But it requires to specify the type of module when importing it. Just as I showed in the first message.