diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-01-27 14:54:36 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-01-27 14:54:36 +0800 |
commit | 9a9f04d6045bb4048605349f897e88decc5311ac (patch) | |
tree | 5e9aa7924e87163038cb2ee2d73c3ab7460b0ccf /script/core | |
parent | 06fa4b4a005464ad301a54bdf52e6d122821cb40 (diff) | |
download | lua-language-server-9a9f04d6045bb4048605349f897e88decc5311ac.zip |
update
Diffstat (limited to 'script/core')
-rw-r--r-- | script/core/completion.lua | 2 | ||||
-rw-r--r-- | script/core/hover/label.lua | 2 | ||||
-rw-r--r-- | script/core/hover/table.lua | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/script/core/completion.lua b/script/core/completion.lua index d884cb6c..f1bea2e7 100644 --- a/script/core/completion.lua +++ b/script/core/completion.lua @@ -553,7 +553,7 @@ local function checkFieldOfRefs(refs, ast, word, start, offset, parent, oop, res end local function checkField(ast, word, start, offset, parent, oop, results) - local refs = vm.getDefFields(parent, 0) + local refs = vm.getFields(parent, 0) checkFieldOfRefs(refs, ast, word, start, offset, parent, oop, results) end diff --git a/script/core/hover/label.lua b/script/core/hover/label.lua index ae0b2450..a82a09ea 100644 --- a/script/core/hover/label.lua +++ b/script/core/hover/label.lua @@ -49,7 +49,7 @@ local function asValue(source, title) local literal = vm.getInferLiteral(source, 0) local cont if not vm.hasInferType(source, 'string', 0) and not type:find('%[%]$') then - if #vm.getDefFields(source, 0) > 0 + if #vm.getFields(source, 0) > 0 or vm.hasInferType(source, 'table', 0) then cont = buildTable(source) end diff --git a/script/core/hover/table.lua b/script/core/hover/table.lua index 2ef26959..58e64951 100644 --- a/script/core/hover/table.lua +++ b/script/core/hover/table.lua @@ -211,7 +211,7 @@ return function (source) local clock = os.clock() local timeUp local mark = {} - local fields = vm.getDefFields(source, 0) + local fields = vm.getFields(source, 0) local keyCount = 0 local reachMax for _, src in ipairs(fields) do |