diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2018-12-28 16:57:46 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2018-12-28 16:57:46 +0800 |
commit | ebdfb86387f51fd29ec37b6ca586a062b086f525 (patch) | |
tree | e7f84d82687c544f14ea484c067fa561f59672bf /server/test/document_symbol | |
parent | 08ad84a4f6c579a12e7a7e92d438f60c5c360044 (diff) | |
download | lua-language-server-ebdfb86387f51fd29ec37b6ca586a062b086f525.zip |
支持部分函数写法
Diffstat (limited to 'server/test/document_symbol')
-rw-r--r-- | server/test/document_symbol/init.lua | 36 |
1 files changed, 32 insertions, 4 deletions
diff --git a/server/test/document_symbol/init.lua b/server/test/document_symbol/init.lua index 746ec108..4f806bfe 100644 --- a/server/test/document_symbol/init.lua +++ b/server/test/document_symbol/init.lua @@ -84,16 +84,44 @@ end } } +TEST [[ +function f() +end +]] +{ + [1] = { + name = 'f', + detail = 'function f()', + kind = SymbolKind.Function, + range = {1, 16}, + selectionRange = {10, 10}, + } +} + +TEST [[ +return function () +end +]] +{ + [1] = { + name = '', + detail = 'function ()', + kind = SymbolKind.Function, + range = {8, 22}, + selectionRange = {8, 8}, + } +} + --TEST [[ ---return function () +--local f = function () --end --]] --{ -- [1] = { --- name = '', +-- name = 'f', -- detail = 'function f()', -- kind = SymbolKind.Function, --- range = {8, 22}, --- selectionRange = {8, 8}, +-- range = {11, 25}, +-- selectionRange = {11, 11}, -- } --} |