summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-11-18 18:44:00 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-11-18 18:44:00 +0800
commit061a23fc153a46c61673c5e46f9bbab46e1b22cf (patch)
treecb7a80567eb43e714bbcc568ff44f81d38983b69 /script
parent4d1a132100b8f4de26d2af6f69e2d98972ab59ea (diff)
parent1319f05cd4de50d7b01a297f39c4ad5a839ff7be (diff)
downloadlua-language-server-061a23fc153a46c61673c5e46f9bbab46e1b22cf.zip
Merge branch 'B2.4.9'
Diffstat (limited to 'script')
-rw-r--r--script/config/config.lua1
-rw-r--r--script/core/noder.lua17
2 files changed, 13 insertions, 5 deletions
diff --git a/script/config/config.lua b/script/config/config.lua
index 969e570a..2f923d89 100644
--- a/script/config/config.lua
+++ b/script/config/config.lua
@@ -205,6 +205,7 @@ local Template = {
['Lua.IntelliSense.traceLocalSet'] = Type.Boolean >> false,
['Lua.IntelliSense.traceReturn'] = Type.Boolean >> false,
['Lua.IntelliSense.traceBeSetted'] = Type.Boolean >> false,
+ ['Lua.IntelliSense.traceFieldInject'] = Type.Boolean >> false,
['Lua.telemetry.enable'] = Type.Or(Type.Boolean >> false, Type.Nil),
['files.associations'] = Type.Hash(Type.String, Type.String),
['files.exclude'] = Type.Hash(Type.String, Type.Boolean),
diff --git a/script/core/noder.lua b/script/core/noder.lua
index ee5c4975..12dcc3c7 100644
--- a/script/core/noder.lua
+++ b/script/core/noder.lua
@@ -482,9 +482,11 @@ local function getNodeKey(source)
if methodNode then
return getNodeKey(methodNode)
end
- local localValueID = getLocalValueID(source)
- if localValueID then
- return localValueID
+ if config.get 'Lua.IntelliSense.traceFieldInject' then
+ local localValueID = getLocalValueID(source)
+ if localValueID then
+ return localValueID
+ end
end
local key, node = getKey(source)
if key and guide.isGlobal(source) then
@@ -1025,8 +1027,13 @@ compileNodeMap = util.switch()
end
if source.bindSources then
for _, src in ipairs(source.bindSources) do
- pushForward(noders, getID(src), id)
- pushForward(noders, id, getID(src))
+ if src.type == 'local'
+ or src.type == 'tablefield'
+ or src.type == 'tableindex'
+ or src.type == 'setglobal' then
+ pushForward(noders, getID(src), id)
+ pushForward(noders, id, getID(src))
+ end
end
end
for _, field in ipairs(source.fields) do