⚙️ config(nvim): add some new options to the image extra as well as deleting the hologram plugin spec from it

This commit is contained in:
Sergio Laín 2024-02-10 01:38:57 +01:00
parent cc52b91f5b
commit 046c754215
No known key found for this signature in database
GPG key ID: 14C9B8080681777B

View file

@ -1,46 +1,38 @@
return { return {
{ "3rd/image.nvim",
"edluffy/hologram.nvim", -- TODO: Need to investigate this event = "LazyFile",
enabled = false, init = function()
opts = { package.path = package.path .. ";" .. vim.fn.expand("$HOME") .. "/.luarocks/share/lua/5.1/?/init.lua;"
auto_display = true, -- WIP automatic markdown image display, may be prone to breaking package.path = package.path .. ";" .. vim.fn.expand("$HOME") .. "/.luarocks/share/lua/5.1/?.lua;"
}, end,
}, dependencies = { "nvim-treesitter/nvim-treesitter" },
{ opts = {
"3rd/image.nvim", backend = "kitty",
event = "LazyFile", integrations = {
init = function() markdown = {
package.path = package.path .. ";" .. vim.fn.expand("$HOME") .. "/.luarocks/share/lua/5.1/?/init.lua;" enabled = true,
package.path = package.path .. ";" .. vim.fn.expand("$HOME") .. "/.luarocks/share/lua/5.1/?.lua;" clear_in_insert_mode = false,
end, download_remote_images = true,
dependencies = { "nvim-treesitter/nvim-treesitter" }, only_render_image_at_cursor = false,
opts = { filetypes = { "markdown", "vimwiki" }, -- markdown extensions (ie. quarto) can go here
backend = "kitty", },
integrations = { neorg = {
markdown = { enabled = true,
enabled = true, clear_in_insert_mode = false,
clear_in_insert_mode = false, download_remote_images = true,
download_remote_images = true, only_render_image_at_cursor = false,
only_render_image_at_cursor = true, filetypes = { "norg" },
filetypes = { "markdown", "vimwiki" }, -- markdown extensions (ie. quarto) can go here
},
neorg = {
enabled = true,
clear_in_insert_mode = false,
download_remote_images = true,
only_render_image_at_cursor = true,
filetypes = { "norg" },
},
}, },
max_width = nil,
max_height = nil,
max_width_window_percentage = nil,
max_height_window_percentage = 50,
window_overlap_clear_enabled = true, -- toggles images when windows are overlapped
window_overlap_clear_ft_ignore = { "cmp_menu", "cmp_docs", "" },
editor_only_render_when_focused = true, -- auto show/hide images when the editor gains/looses focus
tmux_show_only_in_active_window = true, -- auto show/hide images in the correct Tmux window (needs visual-activity off)
hijack_file_patterns = { "*.png", "*.jpg", "*.jpeg", "*.gif", "*.webp" }, -- render image files as images when opened
}, },
max_width = nil,
max_height = nil,
max_width_window_percentage = nil,
max_height_window_percentage = 50,
kitty_method = "normal",
window_overlap_clear_enabled = true, -- toggles images when windows are overlapped
window_overlap_clear_ft_ignore = { "cmp_menu", "cmp_docs", "" },
editor_only_render_when_focused = false, -- auto show/hide images when the editor gains/looses focus
tmux_show_only_in_active_window = true, -- auto show/hide images in the correct Tmux window (needs visual-activity off)
hijack_file_patterns = { "*.png", "*.jpg", "*.jpeg", "*.gif", "*.webp" }, -- render image files as images when opened
}, },
} }