From 951fb08508cb341e3190be53199cc337b44788cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Thu, 14 Apr 2022 23:52:30 +0800 Subject: fix goto `type definition` --- script/core/type-definition.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'script') 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, -- cgit v1.2.3