summaryrefslogtreecommitdiff
path: root/server/src
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-03-15 14:12:44 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-03-15 14:12:44 +0800
commit6efd53aed4ab9eb413df1ba3f6cc8ae65c7aaca5 (patch)
tree76427352fca5f7bf4b8b9e5760caffc68a59647f /server/src
parenta4bff71503fcf5d5a1bff8dc3ce209050afea86c (diff)
downloadlua-language-server-6efd53aed4ab9eb413df1ba3f6cc8ae65c7aaca5.zip
在字符串内部不提示参数
Diffstat (limited to 'server/src')
-rw-r--r--server/src/core/signature.lua5
1 files changed, 5 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