summaryrefslogtreecommitdiff
path: root/server/src
diff options
context:
space:
mode:
Diffstat (limited to 'server/src')
-rw-r--r--server/src/core/signature.lua21
1 files changed, 21 insertions, 0 deletions
diff --git a/server/src/core/signature.lua b/server/src/core/signature.lua
index 1e629308..ca20f054 100644
--- a/server/src/core/signature.lua
+++ b/server/src/core/signature.lua
@@ -67,6 +67,22 @@ local function getHover(call, pos)
end
end
+local function isInFunctionOrTable(call, pos)
+ local func, args = call:bindCall()
+ if not func then
+ return false
+ end
+ local select = getSelect(args, pos)
+ local arg = args[select]
+ if not arg then
+ return false
+ end
+ if arg.type == 'function' or arg.type == 'table' then
+ return true
+ end
+ return false
+end
+
return function (vm, pos)
local source = findSource(vm, pos) or findSource(vm, pos-1)
if not source or source.type == 'string' then
@@ -77,6 +93,11 @@ return function (vm, pos)
return nil
end
+ local nearCall = calls[1]
+ if isInFunctionOrTable(nearCall, pos) then
+ return nil
+ end
+
local hovers = {}
for _, call in ipairs(calls) do
hovers[#hovers+1] = getHover(call, pos)