Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nvim-telescope/telescope-media-files.nvim
Telescope extension to preview media files using Ueberzug.
https://github.com/nvim-telescope/telescope-media-files.nvim
Last synced: 14 days ago
JSON representation
Telescope extension to preview media files using Ueberzug.
- Host: GitHub
- URL: https://github.com/nvim-telescope/telescope-media-files.nvim
- Owner: nvim-telescope
- License: mit
- Created: 2021-01-18T04:28:01.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2024-03-30T06:01:23.000Z (8 months ago)
- Last Synced: 2024-08-01T17:37:33.670Z (3 months ago)
- Language: Lua
- Size: 19.5 KB
- Stars: 455
- Watchers: 5
- Forks: 46
- Open Issues: 33
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Telescope-media-files.nvim
Preview images, pdf, epub, video, and fonts from Neovim using Telescope.![Demo](https://i.imgur.com/wEO04TK.gif)
## Install
```viml
Plug 'nvim-lua/popup.nvim'
Plug 'nvim-lua/plenary.nvim'
Plug 'nvim-telescope/telescope.nvim'
Plug 'nvim-telescope/telescope-media-files.nvim'```
## Setup``` lua
require('telescope').load_extension('media_files')```
## Configuration
This extension can be configured using `extensions` field inside Telescope
setup function.```lua
require'telescope'.setup {
extensions = {
media_files = {
-- filetypes whitelist
-- defaults to {"png", "jpg", "mp4", "webm", "pdf"}
filetypes = {"png", "webp", "jpg", "jpeg"},
-- find command (defaults to `fd`)
find_cmd = "rg"
}
},
}
```## Available commands
```viml
:Telescope media_files"Using lua function
lua require('telescope').extensions.media_files.media_files()
```When you press `` on a selected file, it will copy its relative path to the clipboard
## Prerequisites
* [Chafa](https://hpjansson.org/chafa/) (required for image support)
* [ImageMagick](https://imagemagick.org/index.php) (optional, for svg previews)
* [fd](https://github.com/sharkdp/fd) / [rg](https://github.com/BurntSushi/ripgrep) / [find](https://man7.org/linux/man-pages/man1/find.1.html) or fdfind in Ubuntu/Debian.
* [ffmpegthumbnailer](https://github.com/dirkvdb/ffmpegthumbnailer) (optional, for video preview support)
* [pdftoppm](https://linux.die.net/man/1/pdftoppm) (optional, for pdf preview support. Available in the AUR as **poppler** package.)
* [epub-thumbnailer](https://github.com/marianosimone/epub-thumbnailer) (optional, for epub preview support.)
* [fontpreview](https://github.com/sdushantha/fontpreview) (optional, for font preview support)credit to https://github.com/cirala/vifmimg