summaryrefslogtreecommitdiff
path: root/script-beta/vm/getLibrary.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-11-16 14:18:48 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-11-16 14:18:48 +0800
commit45b8a1d0cb6e0a7fc160a4fc0a4a47469bbac1d4 (patch)
tree3109b50ca330517383958a444867a673de40f7ac /script-beta/vm/getLibrary.lua
parent7e97893e92f694b65f58630cba04d0732ca75e23 (diff)
downloadlua-language-server-45b8a1d0cb6e0a7fc160a4fc0a4a47469bbac1d4.zip
支持将自定义函数识别为special
Diffstat (limited to 'script-beta/vm/getLibrary.lua')
-rw-r--r--script-beta/vm/getLibrary.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/script-beta/vm/getLibrary.lua b/script-beta/vm/getLibrary.lua
index 86f1ae58..eaeeafa3 100644
--- a/script-beta/vm/getLibrary.lua
+++ b/script-beta/vm/getLibrary.lua
@@ -60,6 +60,12 @@ function vm.getLibraryName(source, deep)
if lib then
return lib.name
end
+ local defs = vm.getDefs(source, deep)
+ for _, def in ipairs(defs) do
+ if def.special then
+ return def.special
+ end
+ end
return nil
end