justarandomgeek / vscode-factoriomod-debug

Factorio Mod Tool Kit
Other
100 stars 24 forks source link

Request: Resolve absolute paths #114

Closed Inrixia closed 8 months ago

Inrixia commented 8 months ago

Factorio lua does not support relative paths above the current directory. But you can import using absolute paths via __modname__/path...

However in doing this you lose all type notation for whatever you import as the types cannot be resolved.

Is it possible to somehow map __modname__ imports so the types look in the correct folder relative to the project?

justarandomgeek commented 8 months ago

like this?

Inrixia commented 8 months ago

Weird since it was not working for me. I'll update here with details of what I was trying to import and my config when I get time.