diff options
Diffstat (limited to 'server-beta/src/core/definition.lua')
-rw-r--r-- | server-beta/src/core/definition.lua | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/server-beta/src/core/definition.lua b/server-beta/src/core/definition.lua index 2f4a2da3..bd8124d2 100644 --- a/server-beta/src/core/definition.lua +++ b/server-beta/src/core/definition.lua @@ -3,16 +3,14 @@ local engineer = require 'core.engineer' return function (ast, text, offset) local results = {} - local searcher = engineer(ast) guide.eachSource(ast.ast, offset, function (source) - searcher:eachRef(source, function (src, mode) - if mode == 'set' or mode == 'local' then - results[#results+1] = { - uri = ast.uri, - source = source, - target = src, - } - end + local searcher = engineer(ast) + searcher:eachRef(source, 'def', function (src, mode) + results[#results+1] = { + uri = ast.uri, + source = source, + target = src, + } end) end) if #results == 0 then |