nvim-tree / nvim-tree.lua

A file explorer tree for neovim written in lua
Other
7.19k stars 609 forks source link

Full And Sanitized Node Documentation #2668

Open stefgodin opened 8 months ago

stefgodin commented 8 months ago

Is this a question? No

Can this functionality be implemented utilizing API? Not a functionality per say.

Is your feature request related to a problem? Please describe. Many functions of the API retrieves nodes such as get_node_under_cursor(). There doesn't seem to be any documentation about the structure of a node except in the sort API section. But there are some missing fields in the doc.

Describe the solution you'd like It would be nice to have a small section of the documentation dedicated to the content of a node. This would make it officially part of the API.

Describe alternatives you've considered Check the node builder source code but that does not prevent invisible breaking changes to the node API.

Additional context This issue is raised after a short post on reddit.

I don't know if this qualifies as a feature request, feel free to move it around.

nvim-tree is an awesome plugin and you did a really good job.

alex-courtis commented 8 months ago

We do have https://github.com/nvim-tree/nvim-tree.lua/blob/6a99f5af78b5dd531d49ec0a5158dd0f9a7c992b/lua/nvim-tree/node.lua to document all the contents of various nodes, however that's not super informative.

Proposal: