nvim-tree / nvim-tree/nvim-tree.lua
Node Privacy
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 8.6k
- Forks
- 639
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 2
Description
Nodes should not be exposed to the user. They are internal representations and should not be mutated by the user.
api.tree.get_nodes and sort_by return/are passed cloned partial nodes.
api.tree.get_node_under_cursor returns the internal node. API functions that take {node} expect a real node.
Proposal:
- add a node identifier like a UUID
- all API returns a cloned node containing UUID
- existing api that takes
{node}maps to the internal node via identifier
1 may could achieved via absolute_path, similar to sort_by.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing api.tree.get_nodes, sort_by, get_node_under_cursor, and APIs that accept {node}; compare cloned partial nodes with internal nodes. Done means returned nodes are not internal representations, while APIs accepting {node} can still resolve the corresponding internal node through its identifier.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua, neovim
- Domain
- tooling
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100