diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-11-29 16:54:15 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-11-29 16:54:15 +0800 |
commit | cbf18dc54d2d2315ae3bace888fc428550149c7a (patch) | |
tree | f5ea5167cac1f801e2bc897a22aaa8a42c7599a1 /script-beta/core/hover/name.lua | |
parent | 155ee2059dd18d805140b87901d01ff79257ed60 (diff) | |
download | lua-language-server-cbf18dc54d2d2315ae3bace888fc428550149c7a.zip |
支持二级调用
Diffstat (limited to 'script-beta/core/hover/name.lua')
-rw-r--r-- | script-beta/core/hover/name.lua | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/script-beta/core/hover/name.lua b/script-beta/core/hover/name.lua index 83c750c3..3d855ee5 100644 --- a/script-beta/core/hover/name.lua +++ b/script-beta/core/hover/name.lua @@ -27,12 +27,13 @@ local function asGlobal(source) return guide.getName(source) end +local function asLibrary(source) + return source.doc or source.name +end + local function buildName(source) - if source.doc then - return source.doc - end - if source.name then - return source.name + if source.library then + return asLibrary(source) or '' end if source.type == 'local' or source.type == 'getlocal' |