Replies: 1 comment
-
|
from the code |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am having trouble implementing / understanding
workspace.moduleMap. In Factorio, we use__name__prefixes in order to require files from other mods. This needs to be translated to remove the underscores. For example,require("__flib__.math")should transform intorequire("flib.math")so that the language server can pick up the file from thefliblibrary directory.However, I can't get this to work. Am I misunderstanding how this feature works? Here is my config:
{ "runtime": { "version": "Lua5.2" }, "workspace": { "library": [ "{env:FACTORIO_PATH}/data", "{env:FACTORIO_LIBRARY_ROOT}", "{env:FACTORIO_MODS_ROOT}/flib", "{env:FACTORIO_MODS_ROOT}/sw-rates-lib" ], "moduleMap": [ { "pattern": "^__(.*)__(.*)$", "replace": "$1$2" } ] } }Beta Was this translation helpful? Give feedback.
All reactions