diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2020-11-19 16:55:03 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2020-11-19 16:55:03 +0800 |
commit | 7841e0365ce44419114f10927ccdf34ef0f62604 (patch) | |
tree | d17234a6226d77298907c8b7f03699aca3c19f74 /script-beta/core | |
parent | 719c434de917b7ee77173a2a265ed31581f61bb9 (diff) | |
download | lua-language-server-7841e0365ce44419114f10927ccdf34ef0f62604.zip |
自动完成的一个特殊处理
Diffstat (limited to 'script-beta/core')
-rw-r--r-- | script-beta/core/completion.lua | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/script-beta/core/completion.lua b/script-beta/core/completion.lua index 8b866afd..42164171 100644 --- a/script-beta/core/completion.lua +++ b/script-beta/core/completion.lua @@ -431,6 +431,8 @@ local function checkFieldOfRefs(refs, ast, word, start, offset, parent, oop, res end if #vm.getGlobals(key) <= 1 then goto CONTINUE + else + src = vm.getGlobalSets(key)[1] or src end end local name = key:sub(3) @@ -442,13 +444,7 @@ local function checkFieldOfRefs(refs, ast, word, start, offset, parent, oop, res end local last = fields[name] if not last then - -- TODO - if guide.isGlobal(src) then - --fields[name] = vm.getGlobalSets(key)[1] or src - fields[name] = src - else - fields[name] = src - end + fields[name] = src goto CONTINUE end if src.type == 'tablefield' |