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

docs: more extensions #247

Merged
merged 8 commits into from
Nov 27, 2024
Merged

docs: more extensions #247

merged 8 commits into from
Nov 27, 2024

Conversation

brianhuster
Copy link
Contributor

@brianhuster brianhuster commented Nov 15, 2024

This PR doesn't change much, it just make the function s:apply_icons() global by changing its name dirvish#apply_icons(). This allows users to have better control about when icons should be applied.

An example usage of this PR is vim-dirvish-git.lua

Related to [#246]

@justinmk
Copy link
Owner

can you explain (briefly) the use case a bit more? what is the order of operations that requires this?

@brianhuster
Copy link
Contributor Author

brianhuster commented Nov 21, 2024

There are some cases that will take much time to calculate the icons (such as getting Git status), where add_icons_fn() won't be suitable since it will make Dirvish much slower to start up (up to 4 seconds to add Git icons in large repo). I would like to have a bit control over when to add or update icons in such cases, so it won't block the editor. An example use is here vim-dirvish-git.lua

Of course I can use conceal to update icons, but I think it would be nice to expose some API to make it easier

@brianhuster
Copy link
Contributor Author

I have modified the Vimdoc and README file following your suggestion. Please check!

@brianhuster
Copy link
Contributor Author

I have decided to use virtual text instead for my plugin, so I don't need the function dirvish#apply_icons_fn anymore. Now, this PR is just about adding my plugins that extend vim-dirvish to its README.md, and a bit modification in the doc

@justinmk justinmk changed the title Allow users to apply icons using async function docs: more extensions Nov 27, 2024
@justinmk justinmk merged commit c87a8e1 into justinmk:master Nov 27, 2024
@justinmk
Copy link
Owner

justinmk commented Nov 27, 2024

@brianhuster I'll be interested to hear about any ideas or work you have that explores the idea of browsing other quasi-filesystems like SSH, zip, etc. Coming up with a pattern or interface for doing that with Dirvish would open the door for fully replacing netrw (in Nvim core).

@brianhuster
Copy link
Contributor Author

I found this plugin
https://github.com/miversen33/netman.nvim

It has support for SSH, Docker, as well as the file explorer Neotree by default, but it is also designed by be extensible to any other providers.

@brianhuster
Copy link
Contributor Author

For zip, I think this library is nice
https://github.com/brimworks/lua-zip

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

Successfully merging this pull request may close these issues.

2 participants