diff options
author | sumneko <sumneko@hotmail.com> | 2019-04-09 14:20:16 +0800 |
---|---|---|
committer | sumneko <sumneko@hotmail.com> | 2019-04-09 14:20:16 +0800 |
commit | 3858df0c6ff9811d112757efbf2de31e06b77dc8 (patch) | |
tree | 7d581838e504684f8e99202fe9d8d401fa0a6591 /server/src/core/library.lua | |
parent | 264e332acd1dbfb91c3f6633f6b48f3e4119f832 (diff) | |
download | lua-language-server-3858df0c6ff9811d112757efbf2de31e06b77dc8.zip |
默认不加载自定义库中的全局变量
Diffstat (limited to 'server/src/core/library.lua')
-rw-r--r-- | server/src/core/library.lua | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/server/src/core/library.lua b/server/src/core/library.lua index d9ac969a..be1d74b8 100644 --- a/server/src/core/library.lua +++ b/server/src/core/library.lua @@ -117,7 +117,13 @@ local function insertCustom(tbl, key, value, libName) end local function isEnableGlobal(libName) - return libName:sub(1, 1) == '@' + if config.config.runtime.library[libName] then + return true + end + if libName:sub(1, 1) == '@' then + return true + end + return false end local function mergeSource(alllibs, name, lib, libName) |