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

add: placeholder for ${addons} for paths #2866

Merged
merged 2 commits into from
Sep 24, 2024

Conversation

carsakiller
Copy link
Collaborator

@carsakiller carsakiller commented Sep 24, 2024

Finally doing what was promised long ago and adding an ${addons} variable/placeholder for paths so that people can specify, for example, ${addons}/busted/module/library and it will resolve to the installation location for the addon manager.

There are a lot of different platforms, which I could not all test myself. I have tested a few though:

  • Windows
  • WSL
  • Linux
  • Linux over SSH remote
  • MacOS

The proper solution is probably to change the installation location for addons from the addon manager to go to ~/.luals/addons rather than wherever VS Code has decided to throw them. It would then hopefully be much easier to find them and would be less dependent on VS Code. Something to keep in mind for the new addon manager, but unlikely to be implemented soon.

@carsakiller carsakiller added enhancement New feature or request feat/addon Related to addons labels Sep 24, 2024
@carsakiller
Copy link
Collaborator Author

@sewbacca, @fesily, @forestbelton, I could use some help testing this if any of you are running VS Code on Linux/MacOS. You should be able to just replace scripts/files.lua in your local language server with the updated one from this PR.

@carsakiller carsakiller marked this pull request as ready for review September 24, 2024 04:38
@forestbelton
Copy link

Thank you for super quick turnaround on this, it is very appreciated! I'm using VS Code with WSL, and I was able to confirm that everything works when copying the new file in ✅

Screenshots

Updating .vscode/settings.json

Globals are resolved correctly

If the library path failed to resolve, the extension would have warned about undefined globals.

@sumneko sumneko merged commit 792f46f into LuaLS:master Sep 24, 2024
11 checks passed
@carsakiller carsakiller deleted the addon-path-placeholder branch September 24, 2024 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feat/addon Related to addons
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants