diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-11-18 18:44:00 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-11-18 18:44:00 +0800 |
commit | 061a23fc153a46c61673c5e46f9bbab46e1b22cf (patch) | |
tree | cb7a80567eb43e714bbcc568ff44f81d38983b69 /script/core | |
parent | 4d1a132100b8f4de26d2af6f69e2d98972ab59ea (diff) | |
parent | 1319f05cd4de50d7b01a297f39c4ad5a839ff7be (diff) | |
download | lua-language-server-061a23fc153a46c61673c5e46f9bbab46e1b22cf.zip |
Merge branch 'B2.4.9'
Diffstat (limited to 'script/core')
-rw-r--r-- | script/core/noder.lua | 17 |
1 files changed, 12 insertions, 5 deletions
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 |