From da43d801df94ed8dce217499afb83aedb1ed24d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Mon, 18 May 2020 14:58:13 +0800 Subject: =?UTF-8?q?=E5=8C=BA=E5=88=86=E4=B8=80=E4=B8=8Blocalfunction?= =?UTF-8?q?=E7=9A=84=E7=9D=80=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script/method/textDocument/semanticTokens.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'script/method') diff --git a/script/method/textDocument/semanticTokens.lua b/script/method/textDocument/semanticTokens.lua index 99cdce18..90abfbb8 100644 --- a/script/method/textDocument/semanticTokens.lua +++ b/script/method/textDocument/semanticTokens.lua @@ -67,6 +67,17 @@ local Care = { or source[1] == 'self' then return end + local value = source:bindValue() + local func = value:getFunction() + if func and func:getSource().name == source then + sources[#sources+1] = { + start = source.start, + finish = source.finish, + type = TokenTypes.interface, + modifieres = TokenModifiers.declaration, + } + return + end sources[#sources+1] = { start = source.start, finish = source.finish, -- cgit v1.2.3