nvim-telekasten / telekasten.nvim

A Neovim (lua) plugin for working with a markdown zettelkasten / wiki and mixing it with a journal, based on telescope.nvim
MIT License
1.38k stars 86 forks source link

Add custom media_extensions support #306

Closed iturdikulov closed 7 months ago

iturdikulov commented 7 months ago

Customize insert image and preview image files list.

Proposed change

Type of change

Additional information

This is useful to add optional filetypes into filtered list (for example telescope-media-files optionally supporting svg preview). With this solution user can control which media files he want to see in telescope windows.

Checklist

lambtho12 commented 7 months ago

Is there a reason to expose this as an option? This seems a bit unnecessary and cumbersome. Why not just expanding the hard-coded list to add the most common image extensions?

iturdikulov commented 7 months ago

Yes, main here few reasons (at least for me):

Telekasten browser_media is used to generate media files list and for example my preview plugin is not supporting svg files and I just don't want to see them here (lets assume I have a lot of svg files). Or for example I want to preview some rare file-type like .tiff, but it's not in a supported files list. Here a lot of combinations.

I think chafa (which used by telescope-media-files plugin) support a lot file-types (probably anything which imagemagic support, magick identify -list format gives 302 file formats) and managing this file-types from configuration can be useful. image

lambtho12 commented 7 months ago

Thanks for explaining your implementation. I am fine with having it as an option then. Just address the review so the doc matches the default config and I will merge.

lambtho12 commented 7 months ago

Thank you ! Feel free to tackle any other opened issue :smile: We definitely need more contributors.