refactor(nvim): reinclude image.nvim

Reverst 6d163b9 'refactor(nvim): remove image.nvim'
This commit is contained in:
Price Hiller 2023-10-04 20:39:05 -05:00
parent c420edde26
commit 847f5e2ee9
Signed by: Price
SSH Key Fingerprint: SHA256:Y4S9ZzYphRn1W1kbJerJFO6GGsfu9O70VaBSxJO7dF8

View File

@ -0,0 +1,22 @@
return {
{
"3rd/image.nvim",
build = function()
---@type vim.SystemCompleted
local out = vim.system({ "luarocks", "--lua-version", "5.1", "--local", "install", "magick" }):wait()
if out.code ~= 0 then
error(
string.format(
"Failed to install `magick` luarock for image.nvim!\n---STDOUT---\n%s\n\n---STDERR---\n\n%s", out.stdout,
out.stderr), vim.log.levels.ERROR)
end
end,
ft = { "markdown", "norg" },
config = function()
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;"
require("image").setup({})
vim.cmd.edit()
end,
},
}