summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md2
-rw-r--r--server/src/vm/vm.lua2
2 files changed, 2 insertions, 2 deletions
diff --git a/README.md b/README.md
index 819cf74a..95a5877d 100644
--- a/README.md
+++ b/README.md
@@ -64,7 +64,7 @@ Please [help me][en-US] improve the quality of `en-US`.
- [x] Lua 5.2
- [x] Lua 5.3
- [x] Lua 5.4
-- [ ] LuaJIT
+- [x] LuaJIT
If you find any mistakes, please [tell me][issues] or use [Pull Requests][@lua] to fix them directly.
diff --git a/server/src/vm/vm.lua b/server/src/vm/vm.lua
index 1f9f4e83..aafe7a10 100644
--- a/server/src/vm/vm.lua
+++ b/server/src/vm/vm.lua
@@ -1203,7 +1203,7 @@ local function compile(vm, ast, lsp, uri)
-- 创建初始环境
ast.uri = vm.uri
-- 根据运行版本决定环境实现方式
- if config.config.runtime.version == 'Lua 5.1' then
+ if config.config.runtime.version == 'Lua 5.1' or config.config.runtime.version == 'LuaJIT' then
vm.envType = 'fenv'
else
vm.envType = '_ENV'