summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-12-05 20:52:34 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-12-05 20:52:34 +0800
commit5aace85b14473a161e9c64a410b06bf90d563762 (patch)
tree14fb0c91af7796595d2159162c8021cb20b49512 /test
parentbab7c96347957948d59a85ebb3e3288c8273e3bb (diff)
downloadlua-language-server-5aace85b14473a161e9c64a410b06bf90d563762.zip
hover function by keyword `function`
Diffstat (limited to 'test')
-rw-r--r--test/hover/init.lua6
-rw-r--r--test/references/init.lua8
2 files changed, 10 insertions, 4 deletions
diff --git a/test/hover/init.lua b/test/hover/init.lua
index ff94524d..7c0100ca 100644
--- a/test/hover/init.lua
+++ b/test/hover/init.lua
@@ -26,6 +26,12 @@ end
"function x(a: any, b: any)"
TEST [[
+local <?function?> x(a, b)
+end
+]]
+"function x(a: any, b: any)"
+
+TEST [[
local function x(a, b)
end
<?x?>()
diff --git a/test/references/init.lua b/test/references/init.lua
index 22afc8ac..23a99475 100644
--- a/test/references/init.lua
+++ b/test/references/init.lua
@@ -129,8 +129,8 @@ end
TEST [[
local function f()
- return <?function ()
- end?>
+ return <~<!function~> ()
+ end!>
end
local <!f2!> = f()
@@ -138,8 +138,8 @@ local <!f2!> = f()
TEST [[
local function f()
- return nil, <?function ()
- end?>
+ return nil, <~<!function~> ()
+ end!>
end
local _, <!f2!> = f()