From 046c754215b0ec5c31618a878d2bfaf718db3eac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20La=C3=ADn?= Date: Sat, 10 Feb 2024 01:38:57 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9A=99=EF=B8=8F=20config(nvim):=20add=20some?= =?UTF-8?q?=20new=20options=20to=20the=20image=20extra=20as=20well=20as=20?= =?UTF-8?q?deleting=20the=20hologram=20plugin=20spec=20from=20it?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .config/nvim/lua/plugins/extras/ui/image.lua | 74 +++++++++----------- 1 file changed, 33 insertions(+), 41 deletions(-) diff --git a/.config/nvim/lua/plugins/extras/ui/image.lua b/.config/nvim/lua/plugins/extras/ui/image.lua index b3960dfd..7248dcb8 100644 --- a/.config/nvim/lua/plugins/extras/ui/image.lua +++ b/.config/nvim/lua/plugins/extras/ui/image.lua @@ -1,46 +1,38 @@ return { - { - "edluffy/hologram.nvim", -- TODO: Need to investigate this - enabled = false, - opts = { - auto_display = true, -- WIP automatic markdown image display, may be prone to breaking - }, - }, - { - "3rd/image.nvim", - event = "LazyFile", - init = 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;" - end, - dependencies = { "nvim-treesitter/nvim-treesitter" }, - opts = { - backend = "kitty", - integrations = { - markdown = { - enabled = true, - clear_in_insert_mode = false, - download_remote_images = true, - only_render_image_at_cursor = true, - 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" }, - }, + "3rd/image.nvim", + event = "LazyFile", + init = 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;" + end, + dependencies = { "nvim-treesitter/nvim-treesitter" }, + opts = { + backend = "kitty", + integrations = { + markdown = { + enabled = true, + clear_in_insert_mode = false, + download_remote_images = true, + only_render_image_at_cursor = false, + 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 = false, + 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 }, }