✨ Add Image support
- Optional, only in compatible terminals - change the value in .useimage to 'false' to disable
This commit is contained in:
@@ -99,6 +99,10 @@ used to configure user options.
|
||||
This file defines whether the WakaTime plugin is enabled.
|
||||
The options are `true` or `false`.
|
||||
|
||||
- `.useimage` : **Enables Image plugin**
|
||||
This file defines whether the Image plugin is enabled.
|
||||
The options are `true` or `false`.
|
||||
|
||||
## Features
|
||||
|
||||
- Comfortable keybindings and IDE-like features
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
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,
|
||||
}
|
||||
Reference in New Issue
Block a user