From 878e33a5d363b5471d26096691d4203d33d15b40 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, 24 Dec 2018 11:40:10 +0800 Subject: =?UTF-8?q?return=E7=9A=84=E5=8C=BF=E5=90=8D=E5=87=BD=E6=95=B0?= =?UTF-8?q?=E5=9C=A8hover=E4=B8=AD=E4=B8=8D=E6=98=BE=E7=A4=BA=E5=90=8D?= =?UTF-8?q?=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/test/crossfile/hover.lua | 42 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) (limited to 'server/test') diff --git a/server/test/crossfile/hover.lua b/server/test/crossfile/hover.lua index 0fbb59e6..59ad4fe1 100644 --- a/server/test/crossfile/hover.lua +++ b/server/test/crossfile/hover.lua @@ -88,7 +88,47 @@ TEST { content = 'require ', }, hover = { - label = '', description = [[[a.lua](file:///C%3A/Users/sunyi/.vscode/extensions/sumneko.lua-language-server/server/a.lua)]], } } + +TEST { + { + path = 'a.lua', + content = [[ + local function f(a, b) + end + return f + ]], + }, + { + path = 'b.lua', + content = [[ + local x = require 'a' + () + ]] + }, + hover = { + label = 'function f(a: any, b: any)', + } +} + +TEST { + { + path = 'a.lua', + content = [[ + return function (a, b) + end + ]], + }, + { + path = 'b.lua', + content = [[ + local f = require 'a' + () + ]] + }, + hover = { + label = 'function (a: any, b: any)', + } +} -- cgit v1.2.3