Lua language server type definitions for DFHack's Lua API.
Any form of contribution (feedback, criticism, words of encouragement) is welcome. Feel free to open an issue, email, or ping me on the DFHack discord.
[!NOTE]
These definitions are work-in-progress, they can lie to you. You can find up to date documentation on the DFHack website. That being said, please raise any problems here or on DFHack's Discord server.
Before using the definitions, make sure you have lua-language-server
installed. You can find instructions on their website.
You can either download the latest release or a nightly build artifact.
settings.json
file (either user or workspace):
{
"Lua.workspace.checkThirdParty": "Ask",
"Lua.workspace.userThirdParty": [
"<library_location>"
]
}
<library_location>
should be the parent directory of the library. So if you cloned the repo it should just be the repository path and if you downloaded a release it should be the directory it was extracted to.You can also read this well-written guide with screenshots by Discord user Agnieszka.
Reportedly working but no instructions yet.
lua-langauge-server
installed, you can follow their instructions..luarc.json
file at the root of your workspace:
{
"runtime": {
"version": "5.3",
"special": {
"arg_error": "error",
"dfhack.error": "error",
"qerror": "error",
"reqscript": "dofile"
}
},
"workspace": {
"library": [
"<library_location>/dist/library"
]
}
}
_ENV
global, if you are in a file writing to _ENV
comment out those lines.NoblePosition
) are unsupportedctrl+space
to trigger intellisense on the spot. This is useful for filling out typed tables like ATTRS
on widgets.As with all things, development of this library would not be possible without help.