You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+49Lines changed: 49 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -136,6 +136,8 @@ It is recommended to use it over the built-in Lua plugins.
136
136
Please note that EmmyLua is not available for other editors based on Visual Studio Code,
137
137
such as [VSCodium](https://vscodium.com) or [Eclipse Theia](https://theia-ide.org) but can be built from source if needed.
138
138
139
+
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.
140
+
139
141
### Visual Studio Code
140
142
141
143
1. Create a new <kbd>Debug Configuration</kbd> of type <kbd>EmmyLua New Debug</kbd>
@@ -168,6 +170,34 @@ such as [VSCodium](https://vscodium.com) or [Eclipse Theia](https://theia-ide.or
168
170
1. In VSCode click <kbd>Start Debugging</kbd> (the green icon) or press <kbd>F5</kbd>
169
171
1. The debugger should connect
170
172
173
+
You might also want to use actboy168 debugger. This is possible by using for example the following launch.json configuration:
174
+
175
+
```json
176
+
{
177
+
"version": "0.2.0",
178
+
"configurations": [
179
+
{
180
+
"name": "🍄attach",
181
+
"type": "lua",
182
+
"request": "attach",
183
+
"stopOnEntry": false,
184
+
"address": "127.0.0.1:12306",
185
+
"luaVersion": "luajit",
186
+
},
187
+
188
+
]
189
+
}
190
+
```
191
+
192
+
Then, similarly to the EmmyLua example:
193
+
194
+
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`.
195
+
2. Copy-paste the following code snippet into `launch:OnInit()`:
-- debugger:event("wait") -- Uncomment this line if you want PoB to wait until the debugger is attached.
199
+
```
200
+
171
201
172
202
#### Excluding directories from EmmyLua
173
203
@@ -195,6 +225,25 @@ Files in `/Data` `/Export` and `/TreeData` can be massive and cause the EmmyLua
195
225
196
226
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.
197
227
228
+
### Excluding directories from Sumneko's language server
229
+
230
+
If you prefer to not use EmmyLua, the following configuration works well for Sumneko's VS Code extension:
231
+
232
+
```json
233
+
{
234
+
"Lua.workspace.ignoreDir": [
235
+
".vscode",
236
+
"spec/*",
237
+
"src/runtime/lua/sha1/*",
238
+
"src/Export/*"
239
+
],
240
+
"Lua.diagnostics.disable": ["inject-field"],
241
+
"Lua.runtime.version": "LuaJIT"
242
+
}
243
+
```
244
+
245
+
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)`.
246
+
198
247
### PyCharm Community / IntelliJ Idea Community
199
248
200
249
1. Create a new "Debug Configuration" of type "Emmy Debugger(NEW)".
0 commit comments