-
-
Notifications
You must be signed in to change notification settings - Fork 384
Description
Describe the bug
According to https://luajit.org/extensions.html, LuaJIT's loadfile
supports the Lua 5.2 version of it which is documented as: loadfile(filename [,mode [,env]])
. Currently, the language server does not seem to recognize the additional 2 parameters after filename
.
I also have my vscode workspace settings.json file setup with:
{
"Lua.runtime.version":"LuaJIT"
}
I think this is the case for some of the other extensions included as well (i.e. for loadstring
, math.log
, string.rep
, etc)
To Reproduce
Steps to reproduce the behavior:
- Create new workspace with vscode settings
Lua.runtime.version
set toLuaJIT
- Try to use
loadfile
with 3 parameters (filename, mode, env)
Expected behavior.
Hover shows the valid parameters and doesn't make the text more transparent, and ideally links to the Lua 5.2 documentation for the LuaJIT extensions specifically.
Environment (please complete the following information):
VSCode:
Version: 1.58.2 (system setup)
Commit: c3f126316369cd610563c75b1b1725e0679adfb3
Date: 2021-07-14T22:10:15.214Z
Electron: 12.0.13
Chrome: 89.0.4389.128
Node.js: 14.16.0
V8: 8.9.255.25-electron.0
OS: Windows_NT x64 10.0.19042
Extension version: v2.3.2
(Not remote)
Additional context
LuaJIT's API is taken mostly from Lua 5.1 but includes some extensions for supporting Lua 5.2 specific API. All of it does not seem to be recognized by the extension at the moment.
Provide logs
No bug/error so I don't believe log is relevant.