summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-07-08 16:01:45 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-07-08 16:01:45 +0800
commit97d0a4dda6556944c3dd47f2ebd78100a313ae44 (patch)
treeda301ef5f50d7441e8985cdaa2726dbb790908dc /script
parent77a276abe8281ac3b9892ecbc5d21c66c22801c7 (diff)
downloadlua-language-server-97d0a4dda6556944c3dd47f2ebd78100a313ae44.zip
fix dont goto alias
Diffstat (limited to 'script')
-rw-r--r--script/core/definition.lua11
1 files changed, 7 insertions, 4 deletions
diff --git a/script/core/definition.lua b/script/core/definition.lua
index 593f8f34..e4eadf8c 100644
--- a/script/core/definition.lua
+++ b/script/core/definition.lua
@@ -152,11 +152,14 @@ return function (uri, offset)
end
src = src.field or src.method or src.index or src
if src.type == 'doc.class.name'
- and source.type ~= 'doc.type.name'
- and source.type ~= 'doc.extends.name'
- and source.type ~= 'doc.see.name' then
- goto CONTINUE
+ or src.type == 'doc.alias.name' then
+ if source.type ~= 'doc.type.name'
+ and source.type ~= 'doc.extends.name'
+ and source.type ~= 'doc.see.name' then
+ goto CONTINUE
+ end
end
+
results[#results+1] = {
target = src,
uri = files.getOriginUri(root.uri),