Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
437247e
Add global API type hints
vaisest May 19, 2026
20d3942
Update .emmyrc.json instructions
vaisest May 19, 2026
dd3ba27
Fix typo
vaisest May 19, 2026
e7196a0
Add missing func parameters and recommend skipping the rest of the tests
vaisest May 19, 2026
4cd97d4
Fix definition file
vaisest May 19, 2026
b58d777
Improve type hinting for classes by:
vaisest May 19, 2026
913a772
Add lsp config to gitignore
vaisest May 20, 2026
151f5c0
Change class constructor to be added as a separate method, instead of…
vaisest May 20, 2026
d24ba6f
Declare Build as a type
vaisest May 20, 2026
30daab7
Move HeadlessWrapper.lua dummy functions to def file
vaisest May 20, 2026
115ecdb
Add more handle class type hints, and fix typo
vaisest May 20, 2026
3697173
Misc fixes
vaisest May 20, 2026
29dbff1
Require self to be supplied to parent constructors manually (using `:…
vaisest May 20, 2026
2ec64ee
Change class constructors to call the constructor directly, instead o…
vaisest May 21, 2026
05b912c
Update data export class definitions
vaisest May 21, 2026
61093bf
Update def file callback variable
vaisest May 21, 2026
7fc5c60
Describe emmylua alternative in CONTRIBUTING.md
vaisest May 21, 2026
8baf71c
Explicitly return self from constructors to preserve type information
vaisest May 21, 2026
535da28
Fix control type hint and toastnotification constructor syntax
vaisest May 21, 2026
d95bd5a
Recommend avoiding HeadlessWrapper for language server
vaisest May 21, 2026
7a8ad5b
Remove varargs from new() and recommend treating LoadModule like requ…
vaisest May 25, 2026
8f3acb6
Recommend some luals addons for test framework definitions
vaisest May 25, 2026
14d5f45
Fix cspell error and add mod type examples
vaisest May 26, 2026
f7210b3
White space fixes
vaisest May 26, 2026
46bc9b0
Add missing SimpleGraphic definitions and recommend including them as…
vaisest Jun 14, 2026
9f44eee
Convert all modules to be compatible with require()
vaisest Jun 14, 2026
6224cac
Fix typo
vaisest Jun 14, 2026
f6480b3
Remove print from def file
vaisest Jun 14, 2026
842eab6
Fix tests
vaisest Jun 14, 2026
e0c0dd5
Disable test. Fixed in another PR
vaisest Jun 14, 2026
3254b3f
Fix modCache being dropped during load
vaisest Jun 14, 2026
29224cc
Fix update script
vaisest Jun 14, 2026
2391c33
Fix calc typos
vaisest Jun 14, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ luajit/
spec/test_results.log
spec/test_generation.log
src/luacov.stats.out
runtime/lua/debugger.lua

# Release
manifest-updated.xml
Expand All @@ -37,3 +38,7 @@ src/Data/TimelessJewelData/*.bin
# Simplegraphic Debugging
runtime/imgui.ini
runtime/SimpleGraphic/SimpleGraphic.log
runtime/SimpleGraphic/Screenshots

.emmyrc.json
.luarc.json
77 changes: 75 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ It is recommended to use it over the built-in Lua plugins.
Please note that EmmyLua is not available for other editors based on Visual Studio Code,
such as [VSCodium](https://vscodium.com) or [Eclipse Theia](https://theia-ide.org) but can be built from source if needed.

Another alternative on VSCode is to use [sumneko's Lua language server](https://marketplace.visualstudio.com/items?itemName=sumneko.lua) along with [actboy168's debugger](https://marketplace.visualstudio.com/items?itemName=actboy168.lua-debug). These can potentially offer more features than EmmyLua, such as conditional breakpoints.

### Visual Studio Code

1. Create a new <kbd>Debug Configuration</kbd> of type <kbd>EmmyLua New Debug</kbd>
Expand Down Expand Up @@ -168,20 +170,54 @@ such as [VSCodium](https://vscodium.com) or [Eclipse Theia](https://theia-ide.or
1. In VSCode click <kbd>Start Debugging</kbd> (the green icon) or press <kbd>F5</kbd>
1. The debugger should connect

You might also want to use actboy168 debugger. This is possible by using for example the following launch.json configuration:

```json
{
"version": "0.2.0",
"configurations": [
{
"name": "🍄attach",
"type": "lua",
"request": "attach",
"stopOnEntry": false,
"address": "127.0.0.1:12306",
"luaVersion": "luajit",
},

]
}
```

Then, similarly to the EmmyLua example:

1. Find the sub-folder that looks like `actboy168.lua-debug-x.y.z-win32-x64` in `%USERPROFILE%/.vscode/extensions`. Navigate to it and find the `debugger.lua` script under the script folder. Copy this to `runtime/lua`.
2. Copy-paste the following code snippet into `launch:OnInit()`:
```lua
local debugger = require("debugger"):start("127.0.0.1:12306")
-- debugger:event("wait") -- Uncomment this line if you want PoB to wait until the debugger is attached.
```


#### Excluding directories from EmmyLua

Depending on the amount of system ram you have available and the amount that gets assigned to the jvm running the emmylua language server you might run into issues when trying to debug Path of building.
Files in `/Data` `/Export` and `/TreeData` can be massive and cause the EmmyLua language server to use a significant amount of memory. Sometimes causing the language server to crash. To avoid this and speed up initialization consider adding an `.emmyrc.json` file to the `.vscode` folder in the root of the Path of building folder with the following content:
Files in `/Data` `/Export` and `/TreeData` can be massive and cause the EmmyLua language server to use a significant amount of memory. Sometimes causing the language server to crash. To avoid this and speed up initialization consider adding an `.emmyrc.json` to the root of the Path of building folder with the following content:

```json
{
"$schema": "https://raw.githubusercontent.com/EmmyLuaLs/emmylua-analyzer-rust/refs/heads/main/crates/emmylua_code_analysis/resources/schema.json",
"runtime": {
"version": "LuaJIT"
"version": "LuaJIT",
// this is not technically correct as LoadModule behaviour can
// differ from require, but it is useful for now
"requireLikeFunction": ["LoadModule"],
},
"workspace": {
"ignoreGlobs": [
"**/*_spec.lua",
"spec/**/*.lua",
"runtime/lua/sha1/lua53_ops.lua",
"**/src/Data/**/*.lua",
"**/src/TreeData/**/*.lua",
"**/src/Modules/ModParser.lua"
Expand All @@ -190,6 +226,43 @@ Files in `/Data` `/Export` and `/TreeData` can be massive and cause the EmmyLua
}
```

This file can be customised according to what you want. It is a good idea to ignore test files as these tend to add things to the global namespace, which will look confusing, and they are designed to be run by Busted. `lua53_ops.lua` produces errors and doesn't actually get imported when using LuaJIT. It can be useful to keep the data and mod parser files, but generally this will increase the time the LSP takes to index the project on startup.

### Excluding directories from Sumneko's language server

If you prefer to not use EmmyLua, the following configuration works well for Sumneko's VS Code extension:

```json
{
"Lua.workspace.ignoreDir": [
".vscode",
// these files add things to global that aren't there in normal
// operation
"spec/*",
"src/Export/*",
"src/HeadlessWrapper.lua",

// this has lua 5.3 code which produces errors, but doesn't actually run
"src/runtime/lua/sha1/*",
],
"Lua.diagnostics.disable": ["inject-field"],
// disables diagnostics even when you open one of the above
"Lua.diagnostics.ignoredFiles": "Disable",
"Lua.runtime.version": "LuaJIT",
"Lua.workspace.preloadFileSize": 1000,
// this is not technically correct as LoadModule behaviour can
// differ from require, but it is useful for now
"Lua.runtime.special": {
"LoadModule": "require"
},
"Lua.workspace.library": [
"src/_SimpleGraphic.def.lua"
],
}
```

The extension will automatically skip large files from being preloaded (controlled by `Lua.workspace.preloadFileSize`), so they don't have to be excluded. The configuration file can be found by pressing Ctrl-Shift-P and selecting `Preferences: Open Workspace Settings (JSON)`. If you wish to check test files, you can remove the "ignoredFiles" option and install the busted, LuaFileSystem, and luassert LuaLS addons through `Lua: Open Addon Manager`.

### PyCharm Community / IntelliJ Idea Community

1. Create a new "Debug Configuration" of type "Emmy Debugger(NEW)".
Expand Down
Loading
Loading