Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

non-file: URIs in library/userThirdParty settings don't work #3064

Open
justarandomgeek opened this issue Feb 8, 2025 · 1 comment
Open

Comments

@justarandomgeek
Copy link

justarandomgeek commented Feb 8, 2025

my extension generates a LuaLS userThirdParty bundle dynamically from Factorio's doc files (from the local game install, generally). I'm working on trying to switch to using a virtual FS provider for these files instead of cluttering up real workspace-associated folders with them. I've registered as the provider for fmtk: uris, and i can open all the files for the generated bundle in vscode in editor tabs, but LuaLS won't load them as libraries.

I set

"Lua.workspace.userThirdParty": [
        "fmtk:/luals"
    ],

in my settings.json, instead of setting the generated folder path as i had done previously, but LuaLS seems to have completely ignored it.

I also tried

    "Lua.workspace.library": [
        "fmtk:/luals/factorio/library"
    ],

but that also seems to ignore anything that isn't a plain file path.

@PennyJim
Copy link
Contributor

PennyJim commented Feb 8, 2025

https://github.com/LuaLS/lua-language-server/blob/master/script/fs-utility.lua
https://github.com/LuaLS/lua-language-server/blob/master/script/filewatch.lua
https://github.com/LuaLS/lua-language-server/blob/master/script/utility.lua

With some cursory searching, these seem to be the main problematic files. I'm sure other files are, at their core, problematic in regards to dealing with URI's, but a foundational change like this will have knock-on effects everywhere.

As a side note, why are there two places with near identical loadFile functions? the one in fs-utility has an input path check, while the utility has a nil-check for the contents...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants