-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
Generic TreeDataProvider #3
Comments
Yes. I made fila.vim to provide such generic tree viewer. For example, I would like to make a git repository viewer for a particular commit. So what is your suggestion here? Do you want me to follow the TreeDataProvider API you've linked? Or do you mean that the current API is too difficult (have't documented yet). |
I briefly looked into the code, haven't dug into it much but I saw references to process and files and posted this comment. I haven't played with the api so I cannot comment on if it is difficult. My thought was if it would be possible to make it generic without any of those logic and support async by default (with callbacks and methods to modify the state for treeview). That way the core becomes very small and it only cares about rendering. It is the other plugins that can then hook into it. Also makes the maintenance very easy. For example I could create a tree view for remote git repos, code hierarchy (namespace>class>functions), date tree view and so on. Provide hooks such as The reason I used vscode's api is because it works very well and is well thought. Though there are some extra things we need to add to make it better in vim. Since vim doesn't have |
Actually, that what I'm trying here.
Currently, fila.vim rely on I haven't settled the API yet but the ideally plugin authors requires to follow the rules below to show tree via fila.vim (to create an external plugin of fila.vim)
|
Applied. Documentation is not yet available thought. |
I stumbled on this repo and seems like a really good idea. It is something I was planing to do in the future. I had even suggested something similar for vim to have vim/vim#3573 (comment)
It would be great if we have a generic plugin something like
tree.vim
which only cares about enabling other plugins to use the treeview. Similar to vs-code TreeDataProvider api - https://code.visualstudio.com/api/references/vscode-api#TreeDataProvider. Then can there be a plugin calledtree-file.vim
which only cares about file treeview. And it can be optimized for example starting a file watcher to make it more efficient. I would love to use it from vim-lsp so that we can have code tree view navigation.I have started something very similar for a ctrlp.vim alternative - https://github.com/prabirshrestha/quickpick.vim It is at a very early stage.
The text was updated successfully, but these errors were encountered: