summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-04-14 23:52:30 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-04-14 23:52:30 +0800
commit951fb08508cb341e3190be53199cc337b44788cf (patch)
tree512d39d916a7af6de6d9b416e2cdcba9ceff1a84 /script
parenta37234ba6672641918bb279a89fde7b28ba9b122 (diff)
downloadlua-language-server-951fb08508cb341e3190be53199cc337b44788cf.zip
fix goto `type definition`
Diffstat (limited to 'script')
-rw-r--r--script/core/type-definition.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/script/core/type-definition.lua b/script/core/type-definition.lua
index e045f9b2..92f81997 100644
--- a/script/core/type-definition.lua
+++ b/script/core/type-definition.lua
@@ -139,12 +139,18 @@ return function (uri, offset)
goto CONTINUE
end
src = src.field or src.method or src.index or src
+ if src.type == 'doc.class' then
+ src = src.class
+ end
+ if src.type == 'doc.alias' then
+ src = src.alias
+ end
if src.type == 'doc.class.name'
or src.type == 'doc.alias.name'
or src.type == 'doc.type.function'
or src.type == 'doc.type.array'
or src.type == 'doc.type.table'
- or src.type == 'doc.type.ltable' then
+ or src.type == 'function' then
results[#results+1] = {
target = src,
uri = root.uri,