diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2018-12-24 11:40:10 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2018-12-24 11:40:10 +0800 |
commit | 878e33a5d363b5471d26096691d4203d33d15b40 (patch) | |
tree | c77039010bdf0902a12ae7bacb4ab828cf68cfdf /server/test | |
parent | 0f55f1535df9bfc6314dad7d339f5ebeeced1f5d (diff) | |
download | lua-language-server-878e33a5d363b5471d26096691d4203d33d15b40.zip |
return的匿名函数在hover中不显示名字
Diffstat (limited to 'server/test')
-rw-r--r-- | server/test/crossfile/hover.lua | 42 |
1 files changed, 41 insertions, 1 deletions
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 <?"a"?>', }, 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' + <?x?>() + ]] + }, + 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' + <?f?>() + ]] + }, + hover = { + label = 'function (a: any, b: any)', + } +} |