mirror of
https://github.com/neovim/neovim.git
synced 2024-12-25 05:35:10 -07:00
fix(lsp): improve symbols_to_items performance (#16197)
* use table.insert instead of list_extend to avoid validation overhead Co-authored-by: Gianmarco Fantinuoli <fanto-dev@hotmail.com>
This commit is contained in:
parent
69e4cb7116
commit
5ad15c9fa1
@ -1722,7 +1722,9 @@ function M.symbols_to_items(symbols, bufnr)
|
|||||||
})
|
})
|
||||||
if symbol.children then
|
if symbol.children then
|
||||||
for _, v in ipairs(_symbols_to_items(symbol.children, _items, _bufnr)) do
|
for _, v in ipairs(_symbols_to_items(symbol.children, _items, _bufnr)) do
|
||||||
vim.list_extend(_items, v)
|
for _, s in ipairs(v) do
|
||||||
|
table.insert(_items, s)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user