diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2018-12-13 18:21:38 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2018-12-13 18:21:38 +0800 |
commit | feba963bee80199f155d7312d1416c02080f07f0 (patch) | |
tree | 3e3b43024d977467e70766214923019b85fa1974 /server/src | |
parent | bd54db4d15cfb1cc4f46936dcdaeec98d926bb27 (diff) | |
download | lua-language-server-feba963bee80199f155d7312d1416c02080f07f0.zip |
去掉field类型
Diffstat (limited to 'server/src')
-rw-r--r-- | server/src/matcher/hover.lua | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/server/src/matcher/hover.lua b/server/src/matcher/hover.lua index 71b7a6a0..ae2d8622 100644 --- a/server/src/matcher/hover.lua +++ b/server/src/matcher/hover.lua @@ -323,30 +323,11 @@ local function buildValueSimpleHover(result, source) if class then valueType = class end - - local resType = result.type - if resType == 'field' then - local field = result - local stack = 0 - while field.parent do - field = field.parent - stack = stack + 1 - end - if field.value.ENV then - if stack > 1 then - resType = 'global field' - else - resType = 'global' - end - else - resType = 'local field' - end - end return ([[ ```lua -%s: %s +%s ``` -]]):format(resType, valueType) +]]):format(valueType) end local function getValueHover(result, source) |