diff options
author | Matthieu Coudron <mattator@gmail.com> | 2020-05-02 18:42:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-02 18:42:10 +0200 |
commit | d13c1642ae9c966b7e32779b7aacb7b2eb1f1cee (patch) | |
tree | d1189cff93386843de4839fa4438e1a760b33625 /runtime/lua/vim/lsp/util.lua | |
parent | 5951ed5d74fe80a4b6aea993d8c23000670b3f85 (diff) | |
parent | 3eae7d52c526ae72324145a8cc096856022cc42d (diff) | |
download | rneovim-d13c1642ae9c966b7e32779b7aacb7b2eb1f1cee.tar.gz rneovim-d13c1642ae9c966b7e32779b7aacb7b2eb1f1cee.tar.bz2 rneovim-d13c1642ae9c966b7e32779b7aacb7b2eb1f1cee.zip |
Merge pull request #12228 from h-michael/fix-docsyms-to-items
lsp: fix lsp.util.symbols_to_items with DocumentSymbol has children
Diffstat (limited to 'runtime/lua/vim/lsp/util.lua')
-rw-r--r-- | runtime/lua/vim/lsp/util.lua | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/runtime/lua/vim/lsp/util.lua b/runtime/lua/vim/lsp/util.lua index 9f1275b43c..e77b9f199c 100644 --- a/runtime/lua/vim/lsp/util.lua +++ b/runtime/lua/vim/lsp/util.lua @@ -961,10 +961,8 @@ function M.symbols_to_items(symbols, bufnr) text = '['..kind..'] '..symbol.name }) if symbol.children then - for _, child in ipairs(symbol) do - for _, v in ipairs(_symbols_to_items(child, _items, _bufnr)) do - vim.list_extend(_items, v) - end + for _, v in ipairs(_symbols_to_items(symbol.children, _items, _bufnr)) do + vim.list_extend(_items, v) end end end |