diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/src/core/signature.lua | 5 | ||||
-rw-r--r-- | server/test/signature/init.lua | 8 |
2 files changed, 13 insertions, 0 deletions
diff --git a/server/src/core/signature.lua b/server/src/core/signature.lua index 6cb3bca5..cafe2799 100644 --- a/server/src/core/signature.lua +++ b/server/src/core/signature.lua @@ -2,6 +2,7 @@ local getFunctionHover = require 'core.hover.function' local getFunctionHoverAsLib = require 'core.hover.lib_function' local findLib = require 'core.find_lib' local buildValueName = require 'core.hover.name' +local findSource = require 'core.find_source' local function findCall(vm, pos) local results = {} @@ -64,6 +65,10 @@ local function getHover(call, pos) end return function (vm, pos) + local source = findSource(vm, pos) + if source.type == 'string' then + return + end local calls = findCall(vm, pos) if not calls or #calls == 0 then return nil diff --git a/server/test/signature/init.lua b/server/test/signature/init.lua index acca3260..cf335f05 100644 --- a/server/test/signature/init.lua +++ b/server/test/signature/init.lua @@ -98,3 +98,11 @@ TEST [[ (''):sub(1)@ ]] (nil) + +TEST [[ +local function f(a, b, c) +end + +f(1, 'string@') +]] +(nil) |