Closed japhib closed 2 years ago
When using this plugin and having a single include in my .p8 file:
#include main.lua
I get an error from the extension:
unexpected symbol '#' near 'include'
Is this expected until this feature is implemented?
Yeah, although it’d be a pretty quick change to at least not have it emit an error for the #include statement itself
Fixed with 0.4.0 (#include files are now fully supported)
Hello :)
The syntax itself works, but variables and functions declared in another file are not recognized
Here, I have board.lua
and main.lua
included in game.p8
. When I reference Board
in main.lua
, this warning is displayed:
That makes sense, since the symbols from board.lua
and main.lua
would be imported into game.p8
but e.g. board.lua
would not be imported into main.lua
.
I think it'd be doable to track the #include
s to see which files are included by which other files and solve this use case. I'll re-open this issue until I make that change.
Fixed with 0.4.1
Support go-to-definition and all the other features for files that are #include'ed into a cartridge.