summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-11-16 16:28:40 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-11-16 16:28:40 +0800
commitc4fce3cec334a14f028ac7b14bf36036ea901f79 (patch)
treeee7b9944b624c3e9f5fcf9442c49240dc437b18e /script
parentd4ae212a31a29ab3a9ca6d0a473ff5d33c438124 (diff)
downloadlua-language-server-c4fce3cec334a14f028ac7b14bf36036ea901f79.zip
`Lua.IntelliSense.traceBeSetted`
Diffstat (limited to 'script')
-rw-r--r--script/core/noder.lua15
1 files changed, 12 insertions, 3 deletions
diff --git a/script/core/noder.lua b/script/core/noder.lua
index 0eddd948..54d2f9ca 100644
--- a/script/core/noder.lua
+++ b/script/core/noder.lua
@@ -746,15 +746,17 @@ local function bindValue(noders, source, id)
if not valueID then
return
end
+
+ local bindDocs = source.bindDocs
if source.type == 'getlocal'
or source.type == 'setlocal' then
if not config.get 'Lua.IntelliSense.traceLocalSet' then
return
end
- source = source.node
+ bindDocs = source.node.bindDocs
end
- if source.bindDocs and value.type ~= 'table' then
- for _, doc in ipairs(source.bindDocs) do
+ if bindDocs and value.type ~= 'table' then
+ for _, doc in ipairs(bindDocs) do
if doc.type == 'doc.class'
or doc.type == 'doc.type' then
return
@@ -763,6 +765,13 @@ local function bindValue(noders, source, id)
end
-- x = y : x -> y
pushForward(noders, id, valueID, INFO_REJECT_SET)
+ if not config.get 'Lua.IntelliSense.traceBeSetted'
+ and source.type ~= 'local'
+ and source.type ~= 'tablefield'
+ and source.type ~= 'tableindex'
+ and source.type ~= 'setglobal' then
+ return
+ end
-- 参数/call禁止反向查找赋值
local valueType = smatch(valueID, '^(.-:).')
if not valueType then