summaryrefslogtreecommitdiff
path: root/script/core/diagnostics
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-06-10 20:02:20 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-06-10 20:02:20 +0800
commit9e6fa14b8ba6c1f9573a157f0282588222cbd525 (patch)
treebefa7151598750d932413acc312d84090457e5d6 /script/core/diagnostics
parent22845a130683157df65b2868765758767f6116ae (diff)
downloadlua-language-server-9e6fa14b8ba6c1f9573a157f0282588222cbd525.zip
cleanup
Diffstat (limited to 'script/core/diagnostics')
-rw-r--r--script/core/diagnostics/undefined-env-child.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/script/core/diagnostics/undefined-env-child.lua b/script/core/diagnostics/undefined-env-child.lua
index c97c3fe8..ea9d1c4c 100644
--- a/script/core/diagnostics/undefined-env-child.lua
+++ b/script/core/diagnostics/undefined-env-child.lua
@@ -2,6 +2,7 @@ local files = require 'files'
local searcher = require 'core.searcher'
local guide = require 'parser.guide'
local lang = require 'language'
+local vm = require "vm.vm"
return function (uri, callback)
local ast = files.getAst(uri)
@@ -13,7 +14,7 @@ return function (uri, callback)
if source.node.tag == '_ENV' then
return
end
- local defs = searcher.requestDefinition(source)
+ local defs = vm.getDefs(source)
if #defs > 0 then
return
end