-
Notifications
You must be signed in to change notification settings - Fork 107
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
Add plugin previewer
#459
Add plugin previewer
#459
Conversation
Mmmh as it is, this plugin is a bit problematic as it overrides the CommandView in every case, so it'll try previewing anything the CommandView is showing. A better solution would be to provide your own function to open files. I think it could use As a note, you don't really need to specify |
Thank you for your feedback! It is really nice to have someone testing it,
as I never encountered issues but is because I never use the tree view and
never create a new file from lite . I will fix it as you suggested!
…On Fri, Jul 19, 2024, 10:54 PM Guldoman ***@***.***> wrote:
Mmmh as it is, this plugin is a bit problematic as it overrides the
CommandView in every case, so it'll try previewing anything the CommandView
is showing.
It even causes a crash in some cases, for example when trying to create a
new file from the context menu of the TreeView (only if you try doing that
with one of the first directories for some reason).
A better solution would be to provide your own function to open files. I
think it could use suggest directly to change files.
You could also provide a wrapper function that will have to be passed to
suggest, for people/plugins that want to integrate your preview.
As a note, you don't really need to specify . as path in the manifest.
—
Reply to this email directly, view it on GitHub
<#459 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACDRTTFAVTUH4MEDO7FWM3ZNF4HVAVCNFSM6AAAAABLCSBEHOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBQGA4DSMZVGA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I fixed the issue by creating a new method called
The problem that
Done |
I think this is fine for now, but it makes me think we should have an additional callback in
I think this is also reasonable. I like it. |
Of note, this will crash on certain binary files on Discussion on discord was that this is probably OK; rather than handling it in this plugin, there are numerous ways to treat opening a binary file, including plugins that throw up confirmation screens, so I think this is fine. Merging. |
As a note, this is pointing to an old commit, so it should be updated if needed. I would also suggest adding more ignored filetypes (for example zip), or at least checking the file content for non-unicode characters. |
* Update manifest.json * Update manifest.json * Update manifest.json
Simple plugin that allow to preview file and buffers before before opening them.