diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-06-02 20:44:33 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-06-02 20:44:33 +0800 |
commit | 664b740fa40b22180f5055a543c465cb504290cd (patch) | |
tree | 27ae8dd233bae87740550e1f0c473486df36d138 /script/core | |
parent | fd7c1743952cb53a5e849217a202df5b7b82b3b6 (diff) | |
download | lua-language-server-664b740fa40b22180f5055a543c465cb504290cd.zip |
update
Diffstat (limited to 'script/core')
-rw-r--r-- | script/core/diagnostics/undefined-global.lua | 1 | ||||
-rw-r--r-- | script/core/infer.lua | 5 | ||||
-rw-r--r-- | script/core/searcher.lua | 1 |
3 files changed, 5 insertions, 2 deletions
diff --git a/script/core/diagnostics/undefined-global.lua b/script/core/diagnostics/undefined-global.lua index 439a1854..faf5f150 100644 --- a/script/core/diagnostics/undefined-global.lua +++ b/script/core/diagnostics/undefined-global.lua @@ -3,7 +3,6 @@ local vm = require 'vm' local lang = require 'language' local config = require 'config' local guide = require 'parser.guide' -local linker = require 'core.linker' local requireLike = { ['include'] = true, diff --git a/script/core/infer.lua b/script/core/infer.lua index c3e507cc..77236811 100644 --- a/script/core/infer.lua +++ b/script/core/infer.lua @@ -216,6 +216,7 @@ end local function cleanInfers(infers) local version = config.config.runtime.version local enableInteger = version == 'Lua 5.3' or version == 'Lua 5.4' + infers['unknown'] = nil if infers['any'] and infers['nil'] then infers['nil'] = nil end @@ -403,7 +404,9 @@ local function searchInfer(source, infers) local docName = m.getDocName(source) if docName then infers[docName] = true - infers[CLASS] = true + if docName ~= 'unknown' then + infers[CLASS] = true + end if docName == 'table' then infers[TABLE] = true end diff --git a/script/core/searcher.lua b/script/core/searcher.lua index 121e90c6..2b8eed41 100644 --- a/script/core/searcher.lua +++ b/script/core/searcher.lua @@ -9,6 +9,7 @@ local NONE = {'NONE'} local LAST = {'LAST'} local ignoredIDs = { + ['dn:unknown'] = true, ['dn:nil'] = true, ['dn:any'] = true, ['dn:boolean'] = true, |