summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2018-12-25 15:13:10 +0800
committer最萌小汐 <sumneko@hotmail.com>2018-12-25 15:13:10 +0800
commitf4c3c59ab9c95581c267ee8b4775af40091efab9 (patch)
tree3843055b8f03954ee291db289b9f2686e10236d4
parent69d1ec4687f6b26347d1889edba8c8c9de3d1a71 (diff)
downloadlua-language-server-f4c3c59ab9c95581c267ee8b4775af40091efab9.zip
修正报错
-rw-r--r--server/src/matcher/hover.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/server/src/matcher/hover.lua b/server/src/matcher/hover.lua
index 7b157892..a6a83ed5 100644
--- a/server/src/matcher/hover.lua
+++ b/server/src/matcher/hover.lua
@@ -401,6 +401,10 @@ return function (result, source, lsp, select)
return getStringHover(result, lsp)
end
+ if result.type ~= 'local' or result.type ~= 'field' then
+ return
+ end
+
local lib, fullKey, oo = findLib(result)
local valueType = lib and lib.type or result.value.type or 'nil'
local name = fullKey or buildValueName(result, source)