diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-04-14 23:52:30 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-04-14 23:52:30 +0800 |
commit | 951fb08508cb341e3190be53199cc337b44788cf (patch) | |
tree | 512d39d916a7af6de6d9b416e2cdcba9ceff1a84 /script | |
parent | a37234ba6672641918bb279a89fde7b28ba9b122 (diff) | |
download | lua-language-server-951fb08508cb341e3190be53199cc337b44788cf.zip |
fix goto `type definition`
Diffstat (limited to 'script')
-rw-r--r-- | script/core/type-definition.lua | 8 |
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, |