{"id":47192650,"url":"https://github.com/vallode/dfhack-lua-definitions","last_synced_at":"2026-03-13T11:07:31.353Z","repository":{"id":65559518,"uuid":"592805308","full_name":"vallode/dfhack-lua-definitions","owner":"vallode","description":"LuaLS lua language server definitions for DFHack's library","archived":false,"fork":false,"pushed_at":"2026-03-02T12:14:25.000Z","size":5792,"stargazers_count":6,"open_issues_count":6,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-03-02T16:13:30.737Z","etag":null,"topics":["dfhack","dwarf-fortress","lua"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vallode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-01-24T15:20:37.000Z","updated_at":"2026-03-02T12:14:29.000Z","dependencies_parsed_at":"2024-05-03T12:46:13.516Z","dependency_job_id":"10504fd2-eab6-480b-92a8-5a5824c290c1","html_url":"https://github.com/vallode/dfhack-lua-definitions","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/vallode/dfhack-lua-definitions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vallode%2Fdfhack-lua-definitions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vallode%2Fdfhack-lua-definitions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vallode%2Fdfhack-lua-definitions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vallode%2Fdfhack-lua-definitions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vallode","download_url":"https://codeload.github.com/vallode/dfhack-lua-definitions/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vallode%2Fdfhack-lua-definitions/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30466311,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-13T11:00:43.441Z","status":"ssl_error","status_checked_at":"2026-03-13T11:00:23.173Z","response_time":60,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dfhack","dwarf-fortress","lua"],"created_at":"2026-03-13T11:07:30.785Z","updated_at":"2026-03-13T11:07:31.335Z","avatar_url":"https://github.com/vallode.png","language":"Ruby","readme":"# DFHack Lua API Definitions\n\n[![Main branch test status](https://img.shields.io/github/actions/workflow/status/vallode/dfhack-lua-definitions/.github%2Fworkflows%2Ftest.yml)](https://github.com/vallode/dfhack-lua-definitions/actions/workflows/test.yml)\n[![Current release](https://img.shields.io/github/v/release/vallode/dfhack-lua-definitions)](https://github.com/vallode/dfhack-lua-definitions/releases)\n\n[Lua language server](//github.com/LuaLS/lua-language-server) type definitions for [DFHack](//docs.dfhack.org/en/stable/)'s Lua API.\n\nAny form of contribution (feedback, criticism, words of encouragement) is welcome. Feel free to open an issue, email, or ping me on the DFHack discord.\n\n\u003e [!NOTE]\n\u003e\n\u003e These definitions are work-in-progress, they can lie to you. You can find up to date documentation on the [DFHack website](//docs.dfhack.org/en/stable/docs/dev/Lua%20API.html). That being said, please raise any problems here or on DFHack's [Discord server](//dfhack.org/discord).\n\n## Installation\n\nBefore using the definitions, make sure you have [`lua-language-server`](//github.com/LuaLS/lua-language-server) installed. You can find instructions on [their website](//luals.github.io/#vscode-install).\n\nYou can either download [the latest release](//github.com/vallode/dfhack-lua-definitions/releases/latest/) or a [nightly build artifact](//github.com/vallode/dfhack-lua-definitions/actions/workflows/nightly.yml).\n\n### VSCode / Code - OSS\n\n- Install Lua language server's [VSCode extension](//marketplace.visualstudio.com/items?itemName=sumneko.lua)\n- Code - OSS users can download the VSIX file using the \"Download extension\" button from the link above\n- Append the following to your `settings.json` file (either user or workspace):\n```json\n{\n  \"Lua.workspace.checkThirdParty\": \"Ask\",\n  \"Lua.workspace.userThirdParty\": [\n    \"\u003clibrary_location\u003e\"\n  ]\n}\n```\n- The `\u003clibrary_location\u003e` 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.\n- Restarting VSCode and entering a DFHack-related Lua file should prompt you to load the library.\n\nYou can also read this [well-written guide](//agnieszka.dev/dfhack/vsc/lls/#adding-dfhack-definitions) with screenshots by Discord user Agnieszka.\n\n### Emacs\n\nReportedly working but no instructions yet.\n\n### Helix\n\n- Make sure you have `lua-langauge-server` installed, you can follow [their instructions](//luals.github.io/#other-install).\n- Add the following lines in a `.luarc.json` file at the root of your workspace:\n```json\n{\n  \"runtime\": {\n    \"version\": \"5.3\",\n    \"special\": {\n      \"arg_error\": \"error\",\n      \"dfhack.error\": \"error\",\n      \"qerror\": \"error\",\n      \"reqscript\": \"dofile\"\n    }\n  },\n  \"workspace\": {\n    \"library\": [\n      \"\u003clibrary_location\u003e/dist/library\"\n    ]\n  }\n}\n```\n\n## Known issues\n\n- Developing the DFHack lua library with the annotations loaded can be annoying due to \"duplicate field\" warnings\n- Initally opening DFHack can take a long time to load, especially on weaker hardware (#5)\n- LuaLS has a known problem with type-hinting inside of files that write to the `_ENV` global, if you are in a file writing to `_ENV` comment out those lines.\n- Types defined in C++ headers (like `NoblePosition`) are unsupported\n\n## Tips\n\n- In VSCode (and other derivatives) one can use `ctrl+space` to trigger intellisense on the spot. This is useful for filling out typed tables like `ATTRS` on widgets.\n\n## Credits\n\nAs with all things, development of this library would not be possible without help.\n\n- ab9rf\n- Agnieszka\n- DFHack community\n- Lethosor\n- Lua language server contributors\n- luttje\n- mahahuha/shevernitskiy\n- myk002\n- Rumrusher\n- tatoyoda600\n- Thyrus","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvallode%2Fdfhack-lua-definitions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvallode%2Fdfhack-lua-definitions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvallode%2Fdfhack-lua-definitions/lists"}