summaryrefslogtreecommitdiff
path: root/script/library.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-07-01 16:31:18 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-07-01 16:31:18 +0800
commit3011a124fe961bb623fa627abfd64030f128b4c1 (patch)
treedb3715606e005dd5a444356c58cb3e36f488179a /script/library.lua
parent329e2d7dfa0268a6288086f1a2e3581d5b31cfc6 (diff)
downloadlua-language-server-3011a124fe961bb623fa627abfd64030f128b4c1.zip
cleanup
Diffstat (limited to 'script/library.lua')
-rw-r--r--script/library.lua12
1 files changed, 6 insertions, 6 deletions
diff --git a/script/library.lua b/script/library.lua
index 80622f73..c4308289 100644
--- a/script/library.lua
+++ b/script/library.lua
@@ -10,7 +10,7 @@ local define = require "proto.define"
local m = {}
local function getDocFormater()
- local version = config.config.runtime.version
+ local version = config.Lua.runtime.version
if client.isVSCode() then
if version == 'Lua 5.1' then
return 'HOVER_NATIVE_DOCUMENT_LUA51'
@@ -94,11 +94,11 @@ local function compileSingleMetaDoc(script, metaLang, status)
middleBuf[#middleBuf+1] = ('PUSH [===[%s]===]'):format(script:sub(last))
local middleScript = table.concat(middleBuf, '\n')
local version, jit
- if config.config.runtime.version == 'LuaJIT' then
+ if config.Lua.runtime.version == 'LuaJIT' then
version = 5.1
jit = true
else
- version = tonumber(config.config.runtime.version:sub(-3))
+ version = tonumber(config.Lua.runtime.version:sub(-3))
jit = false
end
@@ -194,8 +194,8 @@ end
local function compileMetaDoc()
local langID = lang.id
- local version = config.config.runtime.version
- local metaPath = fs.path(METAPATH) / config.config.runtime.meta:gsub('%$%{(.-)%}', {
+ local version = config.Lua.runtime.version
+ local metaPath = fs.path(METAPATH) / config.Lua.runtime.meta:gsub('%$%{(.-)%}', {
version = version,
language = langID,
})
@@ -212,7 +212,7 @@ local function compileMetaDoc()
local out = fsu.dummyFS()
local templateDir = ROOT / 'meta' / 'template'
for libName, status in pairs(define.BuiltIn) do
- status = config.config.runtime.builtin[libName] or status
+ status = config.Lua.runtime.builtin[libName] or status
if status == 'disable' then
goto CONTINUE
end