diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2024-05-11 15:50:54 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2024-05-11 15:50:58 +0800 |
commit | d6a314f694dcc1303933bbf62e7a307e3d20245c (patch) | |
tree | 63a326defb856d63b39e71477d4c7a1bb32aef3d /script/core/implementation.lua | |
parent | eda74fd47141b3dc3273031dc558d8635065ecd9 (diff) | |
download | lua-language-server-d6a314f694dcc1303933bbf62e7a307e3d20245c.zip |
支持转到实现
Diffstat (limited to 'script/core/implementation.lua')
-rw-r--r-- | script/core/implementation.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/script/core/implementation.lua b/script/core/implementation.lua index da4d4c8b..e48e2f73 100644 --- a/script/core/implementation.lua +++ b/script/core/implementation.lua @@ -78,6 +78,7 @@ local function convertIndex(source) return source end +---@async return function (uri, offset) local ast = files.getState(uri) if not ast then @@ -91,9 +92,12 @@ return function (uri, offset) local results = {} - local defs = vm.getDefs(source) + local defs = vm.getRefs(source) for _, src in ipairs(defs) do + if not guide.isAssign(src) then + goto CONTINUE + end if src.type == 'global' then goto CONTINUE end |