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.42k stars 91 forks source link

[FR] Support more filetypes with telescope-media-files integrtion #301

Closed iturdikulov closed 8 months ago

iturdikulov commented 9 months ago

Please confirm

Is your feature request related to a problem? Please describe. I'm using telescope-media-files to preview images, some file types are not listed it telescope list (webp, svg), which supported by telescope-media-files. Is possible to configure these filetypes?

Describe the solution you'd like Support more file-types by default? https://github.com/renerocksai/telekasten.nvim/compare/main...Inom-Turdikulov:telekasten.nvim:main

lambtho12 commented 9 months ago

Yes sure. If it is supported by media-files, we can add it without problem. Can you do a PR and check if the docs need to be updated as well ?

iturdikulov commented 9 months ago

I think main issue here is these extensions are hard-coded, and required some deep logic changes. For example here (preview image function): https://github.com/renerocksai/telekasten.nvim/blob/8c2b3889eb31009ae510a43384d1957b37654176/lua/telekasten.lua#L1396. Here exist option filter_extensions which probably not used/initialized correctly (I tried to use it, not worked). In that way user can use own filters.

Maybe I'll try to create proper solution (currently I use simple solution, to override extensions list which is fine for me) and create PR if it will work.

lambtho12 commented 9 months ago

I think main issue here is these extensions are hard-coded, and required some deep logic changes

Why some deep logic changes? Just adding the other image filetypes to the list as you did should work. If the previewer used cannot read them, it is not a big deal. At least they will be present in the telescope picker anyway.