Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collapsing on leaf node could act on its parent on some cases #90

Open
przepompownia opened this issue Jan 12, 2022 · 3 comments
Open

Comments

@przepompownia
Copy link

image
It's possible that is litee-specific issue.

Expected: if the current node is a leaf or a closed tree, I would like to collapse its parent (in the example, arctgx#grep#grep).

Actual: nothing happens. To close I have to go to the parent node.

@przepompownia przepompownia changed the title Jan 12, 2022
@ldelossa
Copy link
Owner

This can be done, but in "litee.nvim". moving the issue there.

@ldelossa ldelossa transferred this issue from ldelossa/litee-symboltree.nvim Jan 13, 2022
@ldelossa
Copy link
Owner

Currently, nodes do not keep a reference to their parent. If they did, this would become trivial.

@ldelossa
Copy link
Owner

Right now ever tree has a "depth_table", this is a table that looks like this:

{
0 = { root }
1 = { child1, child2, child3 }
2 = {child4, child5, child6 }
etc...
}

An immediately solution would be to grab the depth_table from the tree to find the parent node.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants