diff options
Diffstat (limited to 'script/core/reference.lua')
-rw-r--r-- | script/core/reference.lua | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/script/core/reference.lua b/script/core/reference.lua index c1d99ed9..b338e9ec 100644 --- a/script/core/reference.lua +++ b/script/core/reference.lua @@ -55,7 +55,10 @@ local accept = { } ---@async -return function (uri, position) +---@param uri uri +---@param position integer +---@param includeDeclaration boolean +return function (uri, position, includeDeclaration) local ast = files.getState(uri) if not ast then return nil @@ -82,6 +85,9 @@ return function (uri, position) if src.type == 'self' then goto CONTINUE end + if not includeDeclaration and guide.isSet(src) then + goto CONTINUE + end src = src.field or src.method or src if src.type == 'getindex' or src.type == 'setindex' |