mirror of
https://github.com/neovim/neovim.git
synced 2025-10-26 12:27:24 +00:00
Merge pull request #12228 from h-michael/fix-docsyms-to-items
lsp: fix lsp.util.symbols_to_items with DocumentSymbol has children
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user