diff options
Diffstat (limited to 'script/library.lua')
-rw-r--r-- | script/library.lua | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/script/library.lua b/script/library.lua index 81242a91..ef62ceab 100644 --- a/script/library.lua +++ b/script/library.lua @@ -15,7 +15,7 @@ local encoder = require 'encoder' local m = {} local function getDocFormater() - local version = config.get 'Lua.runtime.version' + local version = config.get(nil, 'Lua.runtime.version') if client.isVSCode() then if version == 'Lua 5.1' then return 'HOVER_NATIVE_DOCUMENT_LUA51' @@ -99,11 +99,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.get 'Lua.runtime.version' == 'LuaJIT' then + if config.get(nil, 'Lua.runtime.version') == 'LuaJIT' then version = 5.1 jit = true else - version = tonumber(config.get 'Lua.runtime.version':sub(-3)) + version = tonumber(config.get(nil, 'Lua.runtime.version'):sub(-3)) jit = false end @@ -202,9 +202,9 @@ local function initBuiltIn() return end local langID = lang.id - local version = config.get 'Lua.runtime.version' - local encoding = config.get 'Lua.runtime.fileEncoding' - local metaPath = fs.path(METAPATH) / config.get 'Lua.runtime.meta':gsub('%$%{(.-)%}', { + local version = config.get(nil, 'Lua.runtime.version') + local encoding = config.get(nil, 'Lua.runtime.fileEncoding') + local metaPath = fs.path(METAPATH) / config.get(nil, 'Lua.runtime.meta'):gsub('%$%{(.-)%}', { version = version, language = langID, encoding = encoding, @@ -227,7 +227,7 @@ local function initBuiltIn() local out = fsu.dummyFS() local templateDir = ROOT / 'meta' / 'template' for libName, status in pairs(define.BuiltIn) do - status = config.get 'Lua.runtime.builtin'[libName] or status + status = config.get(nil, 'Lua.runtime.builtin')[libName] or status if status == 'disable' then goto CONTINUE end @@ -308,7 +308,7 @@ end local function load3rdConfig() local configs = {} load3rdConfigInDir(innerThirdDir, configs, true) - local thirdDirs = config.get 'Lua.workspace.userThirdParty' + local thirdDirs = config.get(nil, 'Lua.workspace.userThirdParty') for _, thirdDir in ipairs(thirdDirs) do load3rdConfigInDir(fs.path(thirdDir), configs) end @@ -450,7 +450,7 @@ local function check3rd(uri) if hasAsked then return end - if not config.get 'Lua.workspace.checkThirdParty' then + if not config.get(nil, 'Lua.workspace.checkThirdParty') then return end if thirdConfigs == nil then |