vscode-teal
vscode-teal copied to clipboard
failed to fetch types after `require`
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
The crash should be fixed in https://github.com/teal-language/vscode-teal/commit/9154e2ba9b9b7ee713996ca5cc4b5603a0e6332f. 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 --]]