feat: More auto-unfold options
Option to auto unfold when there is only N root nodes in outline. Defaults to 1, meaning if there is only one 'root' parent, it should always be unfolded. This is useful if the entire file is a single function or a single 'return'. The old auto_unfold_hover option **still works as expected**.
This commit is contained in:
@@ -79,7 +79,7 @@ end
|
||||
function M.parse(response, bufnr)
|
||||
local sorted = lsp_utils.sort_symbols(response)
|
||||
|
||||
return parse_result(sorted, nil, nil, nil, bufnr)
|
||||
return parse_result(sorted, nil, nil, { is_root = true, child_count = #sorted }, bufnr)
|
||||
end
|
||||
|
||||
---Iterator that traverses the tree parent first before children, returning each node.
|
||||
|
||||
Reference in New Issue
Block a user