IntelliJ-Luanalysis
IntelliJ-Luanalysis copied to clipboard
Globals become undeclared when the file contains ---@module
Environment
name | version |
---|---|
IDEA version | GoLand 2021.1.3 |
Luanalysis version | v1.2.3 |
OS | Windows 10 |
What are the steps to reproduce this issue?
- Create a Lua file containing the ---@module tag and a require()
local enum = require("enum")
---@module WeaponModule
local weapons = {}
What happens?
What were you expecting to happen?
The same behavior as using ---@class, which is to show as an existing function.
I'm having the same issue.
I wanted to restrict the global scope of each file so I added ---@module at the top of all of my files. However I still want them to have globals declared in other files that doesn't have ---@module