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

LuaJIT - extension for "loadfile" not recognized #620

Closed
Feez opened this issue Jul 24, 2021 · 0 comments
Closed

LuaJIT - extension for "loadfile" not recognized #620

Feez opened this issue Jul 24, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@Feez
Copy link

Feez commented Jul 24, 2021

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.

image

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:

  1. Create new workspace with vscode settings Lua.runtime.version set to LuaJIT
  2. 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.

@sumneko sumneko added the bug Something isn't working label Jul 26, 2021
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