diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2020-11-20 21:44:57 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2020-11-20 21:44:57 +0800 |
commit | 4f2e91dad259b6559cec651b10718e1a19352fc3 (patch) | |
tree | 581b8bdc73440ded32db5cb0a1a191a02fa64372 /script-beta/vm/getGlobals.lua | |
parent | 9cd44e1b61fa8f002b211224e0141812a8fc97e6 (diff) | |
download | lua-language-server-4f2e91dad259b6559cec651b10718e1a19352fc3.zip |
use meta instead of library
Diffstat (limited to 'script-beta/vm/getGlobals.lua')
-rw-r--r-- | script-beta/vm/getGlobals.lua | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/script-beta/vm/getGlobals.lua b/script-beta/vm/getGlobals.lua index 4fe95ee9..83d6a5e6 100644 --- a/script-beta/vm/getGlobals.lua +++ b/script-beta/vm/getGlobals.lua @@ -1,7 +1,6 @@ local guide = require 'parser.guide' local vm = require 'vm.vm' local files = require 'files' -local library = require 'library' local util = require 'utility' local config = require 'config' @@ -67,19 +66,6 @@ local function getGlobalSetsOfFile(uri) return globals end -local function insertLibrary(results, name) - if name:sub(1, 2) == 's|' then - local libname = name:sub(3) - results[#results+1] = library.global[libname] - local asName = config.config.runtime.special[libname] - results[#results+1] = library.global[asName] - elseif name == '*' then - for _, lib in pairs(library.global) do - results[#results+1] = lib - end - end -end - local function getGlobals(name) local results = {} for uri in files.eachFile() do @@ -98,7 +84,6 @@ local function getGlobals(name) end end end - insertLibrary(results, name) return results end @@ -120,7 +105,6 @@ local function getGlobalSets(name) end end end - insertLibrary(results, name) return results end @@ -143,7 +127,6 @@ local function fastGetAnyGlobals() end end end - insertLibrary(results, '*') return results end @@ -159,7 +142,6 @@ local function fastGetAnyGlobalSets() end end end - insertLibrary(results, '*') return results end |