summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-11-18 17:18:27 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-11-18 17:18:27 +0800
commit4a6afbfd9d1ebaac825da84e9e884d27c18344e3 (patch)
tree6d53ed32a25399c75f36a9a2f8baf83422e39127 /script
parentbe7784375a1da83ded98af98ae87d36b2b7f4aa2 (diff)
downloadlua-language-server-4a6afbfd9d1ebaac825da84e9e884d27c18344e3.zip
`traceGlobalInject`
Diffstat (limited to 'script')
-rw-r--r--script/config/config.lua1
-rw-r--r--script/core/noder.lua8
2 files changed, 6 insertions, 3 deletions
diff --git a/script/config/config.lua b/script/config/config.lua
index bd73a77f..0f35ce6c 100644
--- a/script/config/config.lua
+++ b/script/config/config.lua
@@ -203,6 +203,7 @@ local Template = {
['Lua.IntelliSense.traceLocalSet'] = Type.Boolean >> false,
['Lua.IntelliSense.traceReturn'] = Type.Boolean >> false,
['Lua.IntelliSense.traceBeSetted'] = Type.Boolean >> false,
+ ['Lua.IntelliSense.traceGlobalInject'] = 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 b9d28fca..f6483408 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.traceGlobalInject' then
+ local localValueID = getLocalValueID(source)
+ if localValueID then
+ return localValueID
+ end
end
local key, node = getKey(source)
if key and guide.isGlobal(source) then