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

Plugin ResolveRequire wrong description of URI? #48

Open
Bilal2453 opened this issue Nov 20, 2024 · 1 comment
Open

Plugin ResolveRequire wrong description of URI? #48

Bilal2453 opened this issue Nov 20, 2024 · 1 comment

Comments

@Bilal2453
Copy link

---@param  uri  string # The URI of file

Over the plugins page it seems to me like ResolveRequire first parameter is the current file the require is being typed at.

But in reality it seems to be the workspace URI, not the file. I am not sure if this is a bug and it should actually be the file URI, because actually I do need that and can't figure out how I would do it!

image

@Bilal2453
Copy link
Author

Bilal2453 commented Nov 20, 2024

Seems like a documentation problem, the URI passed seems reasonable
https://github.com/LuaLS/lua-language-server/blob/master/script/workspace/require-path.lua#L175-L188

PS: I was able to get the URI of the current file with a bit of help from debug.getlocal. which queries back this code https://github.com/LuaLS/lua-language-server/blob/master/script/workspace/require-path.lua#L244-L250
image

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

1 participant