Skip to content

Commit

Permalink
feat: use python instead of bash
Browse files Browse the repository at this point in the history
  • Loading branch information
dharmx committed Dec 27, 2022
1 parent eca135f commit ba396de
Show file tree
Hide file tree
Showing 9 changed files with 188 additions and 340 deletions.
29 changes: 0 additions & 29 deletions .editorconfig

This file was deleted.

79 changes: 79 additions & 0 deletions .github/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
<div align="center">

# telescope-media-files.nvim

Preview IMAGES, PDF, EPUB, VIDEO, and FONTS from Neovim using Telescope.

</div>

> NOTE: This plugin is only supported in Linux.
## PACKER

```lua
use({
"nvim-telescope/telescope-media-files.nvim",
config = function()
require("telescope").load_extension("media_files")
end,
requires = {
"nvim-lua/plenary.nvim",
"nvim-telescope/telescope.nvim",
}
})
```

## SETUP

``` lua
require("telescope").load_extension("media_files")
```

## CONFIG

This extension should be configured using `extensions` field inside Telescope.

```lua
require("telescope").setup({
extensions = {
media_files = {
geometry = {
x = -2,
y = -2,
width = 1,
height = 1,
},
find_command = {
"rg",
"--files",
"--glob",
[[*.{]] .. "png,jpg,gif,mp4,webm,pdf" .. [[}]],
".",
},
on_confirm = function(filepath)
vim.fn.setreg(vim.v.register, filepath)
vim.notify("The image path has been copied!")
end,
},
})
```

## COMMANDS

```viml
:Telescope media_files
"Using lua function
lua require('telescope').extensions.media_files.media_files()
```

## Prerequisites

- [Überzug](https://github.com/seebye/ueberzug) (required for image support)
- [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 [vifmimg](https://github.com/cirala/vifmimg).
4 changes: 0 additions & 4 deletions .prettierrc.toml

This file was deleted.

5 changes: 4 additions & 1 deletion .stylua.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@ line_endings = "Unix"
indent_type = "Spaces"
indent_width = 2
quote_style = "AutoPreferDouble"
no_call_parentheses = true
call_parentheses = "Always"
collapse_simple_statement = "Never"

# vim:ft=toml
File renamed without changes.
75 changes: 0 additions & 75 deletions README.md

This file was deleted.

Loading

0 comments on commit ba396de

Please sign in to comment.