Skip to content

Commit

Permalink
feat(image-nvim): use luarocks.nvim for "magick" rock (#835)
Browse files Browse the repository at this point in the history
  • Loading branch information
FraI3mega committed Apr 7, 2024
1 parent 9572bea commit 6a58f1d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
13 changes: 5 additions & 8 deletions lua/astrocommunity/media/image-nvim/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,8 @@ It can also render image files as images when opened.

These are things you have to setup on your own

* ImageMagick - **mandatory**
* magick LuaRock - **mandatory** (luarocks --local --lua-version=5.1 install magick)
- Magick LuaRock requires Lua 5.1
* Kitty >= 28.0 - for the kitty backend
* ueberzugpp - for the ueberzug backend
* curl - for remote images

**This plugin is configured to be used with kitty terminal and lua 5.1**
- Kitty >= 28.0 - for the kitty backend
- ueberzugpp - for the ueberzug backend
- curl - for remote images

**This plugin is configured to be used with kitty terminal**
10 changes: 7 additions & 3 deletions lua/astrocommunity/media/image-nvim/init.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
package.path = package.path .. ";" .. vim.fn.expand "$HOME" .. "/.luarocks/share/lua/5.1/?/init.lua;"
package.path = package.path .. ";" .. vim.fn.expand "$HOME" .. "/.luarocks/share/lua/5.1/?.lua;"

return {
"3rd/image.nvim",
event = "VeryLazy",
Expand All @@ -15,6 +12,13 @@ return {
}
end,
},
{
"vhyrro/luarocks.nvim",
priority = 1000, -- this plugin needs to run before anything else
opts = {
rocks = { "magick" },
},
},
},
opts = {
backend = "kitty",
Expand Down

0 comments on commit 6a58f1d

Please sign in to comment.