summaryrefslogtreecommitdiff
path: root/test-beta
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-10-23 15:45:34 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-10-23 15:45:34 +0800
commitbb337bbf6c62076de5425966ea41b3cbed6bb987 (patch)
treef7c4aa47e91464d19a78bfecf45ae979a4447aab /test-beta
parent465810453208d3af395bc43f4f27791237c5cfdc (diff)
downloadlua-language-server-bb337bbf6c62076de5425966ea41b3cbed6bb987.zip
匿名函数信息更加详细
Diffstat (limited to 'test-beta')
-rw-r--r--test-beta/document_symbol/init.lua19
1 files changed, 18 insertions, 1 deletions
diff --git a/test-beta/document_symbol/init.lua b/test-beta/document_symbol/init.lua
index 26928145..d9f1bec3 100644
--- a/test-beta/document_symbol/init.lua
+++ b/test-beta/document_symbol/init.lua
@@ -105,7 +105,7 @@ end
{
[1] = {
name = '',
- detail = 'function ()',
+ detail = 'return function ()',
kind = define.SymbolKind.Function,
range = {8, 22},
selectionRange = {8, 8},
@@ -611,3 +611,20 @@ local a = f {
}
}
}
+
+TEST [[
+table.sort(t, function (a, b)
+ return false
+end)
+]]
+{
+ [1] = {
+ name = '',
+ detail = 'table.sort -> function (a, b)',
+ kind = define.SymbolKind.Function,
+ range = {15, 50},
+ selectionRange = {15, 15},
+ valueRange = {15, 50},
+ children = EXISTS,
+ }
+}