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
I love this project, but I've encountered a minor annoyance and can't find any guidance on this issue online, so I can only assume this behavior hasn't been implemented yet.
I'm using mlua embedded in a Rust application for plugin support. In general, luau-lsp works excellent with the following .vscode/settings.json:
{"luau-lsp.platform.type": "standard","luau-lsp.sourcemap.enabled": false,"luau-lsp.types.definitionFiles": [// path to file with new globals]}
mlua, wonderfully, supports a StdLib structure to opt in or out of various globals by default. This is generally fine, and things can be selectively torn apart and re-implemented when initializing a Lua VM. But! To my knowledge, it's impossible to tell luau-lsp what globals don't exist. While I recognize this is a niche problem, it would be incredibly helpful if there was at least some way to achieve this behavior. (After all, disabling getfenv and setfenv isn't that much of a stretch for embedded Luau outside of Roblox, among other things.)
The text was updated successfully, but these errors were encountered:
We might be able to hack around this and accept a list of luau-lsp.types.disabledGlobals (similar to luau-lang/luau#1538), then still register all globals but delete the ones we don't care about after they were already registered from frontend.globalScope. For global variables / functions, this should be OK, but this would be problematic for global types due to dangling references (but luckily there are no global types defined right now, so we don't have to worry about that just yet!)
I love this project, but I've encountered a minor annoyance and can't find any guidance on this issue online, so I can only assume this behavior hasn't been implemented yet.
I'm using mlua embedded in a Rust application for plugin support. In general,
luau-lsp
works excellent with the following.vscode/settings.json
:mlua
, wonderfully, supports a StdLib structure to opt in or out of various globals by default. This is generally fine, and things can be selectively torn apart and re-implemented when initializing a Lua VM. But! To my knowledge, it's impossible to tellluau-lsp
what globals don't exist. While I recognize this is a niche problem, it would be incredibly helpful if there was at least some way to achieve this behavior. (After all, disablinggetfenv
andsetfenv
isn't that much of a stretch for embedded Luau outside of Roblox, among other things.)The text was updated successfully, but these errors were encountered: