Files
neovim-config/lua/plugins/image.lua
T
rootiest 6f291c16e6 Add Image support
- Optional, only in compatible terminals
- change the value in .useimage to 'false' to disable
2024-07-18 11:51:22 -04:00

29 lines
666 B
Lua

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"
-- lazy snippet
return {
"3rd/image.nvim",
config = function()
require("image").setup()
end,
cond = function()
if vim.fn.filereadable(vim.fn.stdpath("config") .. "/.useimage") == 1 then
if
vim.fn.readfile(vim.fn.stdpath("config") .. "/.useimage")[1]
== "true"
then
local term = os.getenv("TERM") or ""
local kit = string.find(term, "kitty")
return kit ~= nil
end
end
end,
}