nvim-neo-tree / neo-tree.nvim

Neovim plugin to manage the file system and other tree like structures.
MIT License
3.7k stars 218 forks source link

FEATURE: Favorite list folder #1487

Open mr-scrpt opened 4 months ago

mr-scrpt commented 4 months ago

Did you check the docs?

Is your feature request related to a problem? Please describe.

In a project, there are often key directories that you would like to have quick access to. For example, my project uses the FSD methodology, where the project structure is predefined

For example I am working with a file in the entities layer, let entities be user, inside this directory I have a controller directory and in it the file user.controller.ts. So I am in src/entities/user/controller/user.controller.ts and I need to open the features folder to see what I have there - now I have to open the neo tree and manually navigate to the right directory or use the search which often has a lot of unnecessary results.

Regardless of architecture and methodologies, projects often have popular catalogs that I would also like to have quick access to.

Describe the solution you'd like.

I would like to have a favorites mechanism to which you can add directories, for example as it is done in the harpoon plugin or something similar While in neo tree on any of the directories you can press a key combination that will add the directory to favorites, it can be a separate tab in neo tree. Then, when working with files we can call the list of favorite directories, select the one we are interested in, then neo tree will go to the selected directory and we will see all the contents. It's possible to improve this behavior - to make it like harpoon - move to the added directory by hotkey. To open neo tree in a favorite directory we can press <leader>ega, <leader>egs, <leader>egd, <leader>egf- and so on. Where A,S,D,F - corresponds to the serial number in the favorite directory.

Describe alternatives you've considered.

No response

Additional Context

No response

pysan3 commented 4 months ago

Unfortunately with the current state of neo-tree there is no way to persist some memory to the next process (meaning that neo-tree will forget what was saved when you relaunch neovim).

However, there are plans to add persistency so that neo-tree can relaunch itself to its old state with the auto-session plugins and this feature may also be implemented together.

IMHO I think your idea is pretty interesting and I'll stick it into my (very long) TODO list :)

I will add the gauging interest tag to this FR and see if more people are interested as well for now.