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

failed to fetch types after require #33

Open
virusdefender opened this issue Feb 18, 2021 · 1 comment
Open

failed to fetch types after require #33

virusdefender opened this issue Feb 18, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@virusdefender
Copy link

virusdefender commented Feb 18, 2021

input require("os") and then press ., the plugin will output some error messages

[Error - 5:03:20 PM] Request textDocument/completion failed.
  Message: Request textDocument/completion failed with message: Cannot read property '0' of undefined
  Code: -32603
@pdesaulniers pdesaulniers added the bug Something isn't working label Feb 18, 2021
@pdesaulniers
Copy link
Member

pdesaulniers commented Feb 18, 2021

The crash should be fixed in 9154e2b. With that said, the plugin still cannot resolve the type in this scenario... I think tl types needs to be modified in order to support this use-case.

As a workaround for now, you can assign os to a local variable first:

local os = require("os")
os.--[[ Suggestions here --]]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants