diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2018-12-25 15:13:10 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2018-12-25 15:13:10 +0800 |
commit | f4c3c59ab9c95581c267ee8b4775af40091efab9 (patch) | |
tree | 3843055b8f03954ee291db289b9f2686e10236d4 | |
parent | 69d1ec4687f6b26347d1889edba8c8c9de3d1a71 (diff) | |
download | lua-language-server-f4c3c59ab9c95581c267ee8b4775af40091efab9.zip |
修正报错
-rw-r--r-- | server/src/matcher/hover.lua | 4 |
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) |