speedie-nvim/.config/nvim/lua/image_config.lua

28 lines
824 B
Lua
Raw Normal View History

2024-01-30 16:16:38 +01:00
--[[
speedie's neovim configuration
-- https://git.speedie.site/speedie/speedie-nvim --
]]--
if EnableImageSupport == true then
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;"
local imageBackend = "kitty"
if ImageBackend == "ueberzug" then
2024-02-29 18:27:18 +01:00
imageBackend = "ueberzug"
2024-01-30 16:16:38 +01:00
else
2024-02-29 18:27:18 +01:00
imageBackend = "kitty"
2024-01-30 16:16:38 +01:00
end
require('image').setup({
integrations = {
markdown = {
resolve_image_path = function(document_path, image_path, fallback)
return fallback(document_path, image_path)
end,
}
},
backend = imageBackend,
})
end