diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-12-17 15:37:16 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-12-17 15:37:16 +0800 |
commit | afcbe82612a1fa4ac05d03fe557472d52ce2984a (patch) | |
tree | d9589a0d35be926b0c18ecf5780f07dc72c6b33d /script-beta/core/definition.lua | |
parent | 5e3b44234899bf57f2688d48ef617357ef706669 (diff) | |
download | lua-language-server-afcbe82612a1fa4ac05d03fe557472d52ce2984a.zip |
过测试
Diffstat (limited to 'script-beta/core/definition.lua')
-rw-r--r-- | script-beta/core/definition.lua | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/script-beta/core/definition.lua b/script-beta/core/definition.lua index 77bef643..8afdc2ba 100644 --- a/script-beta/core/definition.lua +++ b/script-beta/core/definition.lua @@ -22,8 +22,7 @@ local function findDef(source, callback) return end if info.mode == 'declare' - or info.mode == 'set' - or info.mode == 'return' then + or info.mode == 'set' then local src = info.source local root = guide.getRoot(src) local uri = root.uri @@ -42,6 +41,14 @@ local function findDef(source, callback) callback(src, uri) end end + if info.mode == 'value' then + local src = info.source + local root = guide.getRoot(src) + local uri = root.uri + if src.parent.type == 'return' then + callback(src, uri) + end + end end) end |