diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-09-06 16:23:24 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-09-06 16:23:24 +0800 |
commit | 7047393031801c91c8d0cf78a77c91e5a6f64114 (patch) | |
tree | ba35a333e65183b4b04ec412b7722b76bec2eadf /test | |
parent | f7f0929f8b7c8997a6e390f8e738b9634efc5f29 (diff) | |
download | lua-language-server-7047393031801c91c8d0cf78a77c91e5a6f64114.zip |
improve document-symbol
Diffstat (limited to 'test')
-rw-r--r-- | test/document_symbol/init.lua | 50 |
1 files changed, 35 insertions, 15 deletions
diff --git a/test/document_symbol/init.lua b/test/document_symbol/init.lua index 17728efc..66babc9b 100644 --- a/test/document_symbol/init.lua +++ b/test/document_symbol/init.lua @@ -105,8 +105,8 @@ end ]] { [1] = { - name = '', - detail = 'return function ()', + name = 'return', + detail = 'function ()', kind = define.SymbolKind.Function, range = {7, 10003}, selectionRange = {7, 15}, @@ -565,11 +565,21 @@ local t = f({ valueRange = {10, 20002}, children = { [1] = { - name = 'k', - detail = '1', - kind = define.SymbolKind.Number, - range = {10004, 10009}, - selectionRange = {10004, 10005}, + name = 'f ->', + detail = '{k}', + kind = define.SymbolKind.Object, + range = {12, 20001}, + selectionRange = {12, 20001}, + valueRange = {12, 20001}, + children = { + [1] = { + name = 'k', + detail = '1', + kind = define.SymbolKind.Number, + range = {10004, 10009}, + selectionRange = {10004, 10005}, + } + } } } } @@ -632,12 +642,22 @@ local a = f { valueRange = {10, 30001}, children = { [1] = { - name = 'x', - detail = 'function ()', - kind = define.SymbolKind.Function, - range = {10004, 20007}, - selectionRange = {10004, 10005}, - valueRange = {10008, 20007}, + name = 'f ->', + detail = '{x}', + kind = define.SymbolKind.Object, + range = {12, 30001}, + selectionRange = {12, 30001}, + valueRange = {12, 30001}, + children = { + [1] = { + name = 'x', + detail = 'function ()', + kind = define.SymbolKind.Function, + range = {10004, 20007}, + selectionRange = {10004, 10005}, + valueRange = {10008, 20007}, + } + } } } } @@ -650,8 +670,8 @@ end) ]] { [1] = { - name = '', - detail = 'table.sort -> function (a, b)', + name = 'table.sort ->', + detail = 'function (a, b)', kind = define.SymbolKind.Function, range = {14, 20003}, selectionRange = {14, 22}, |