From 47547f4be9b64fff366d03dff66f345c24e66b73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20La=C3=ADn?= Date: Mon, 6 Nov 2023 12:34:05 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9A=99=EF=B8=8F=20config(nvim):=20bindings?= =?UTF-8?q?=20for=20refactoring=20and=20image.nvim=20for=20image=20extra?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .config/nvim/lua/config/lazy.lua | 3 ++ .../lua/plugins/extras/coding/refactoring.lua | 2 +- .../nvim/lua/plugins/extras/util/image.lua | 30 +++++++++++++++++++ 3 files changed, 34 insertions(+), 1 deletion(-) diff --git a/.config/nvim/lua/config/lazy.lua b/.config/nvim/lua/config/lazy.lua index 8d3c8930..668fe51e 100644 --- a/.config/nvim/lua/config/lazy.lua +++ b/.config/nvim/lua/config/lazy.lua @@ -7,6 +7,9 @@ if not vim.loop.fs_stat(lazypath) then end vim.opt.rtp:prepend(vim.env.LAZY or lazypath) +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;" + require("lazy").setup({ spec = { -- add LazyVim and import its plugins diff --git a/.config/nvim/lua/plugins/extras/coding/refactoring.lua b/.config/nvim/lua/plugins/extras/coding/refactoring.lua index 071dd215..dce60c18 100644 --- a/.config/nvim/lua/plugins/extras/coding/refactoring.lua +++ b/.config/nvim/lua/plugins/extras/coding/refactoring.lua @@ -14,6 +14,6 @@ return { end, -- stylua: ignore keys = { - { "cR", function() require('telescope').extensions.refactoring.refactors() end, mode = { "n", "x" }, desc = "Refactor" }, + { "r", function() require('telescope').extensions.refactoring.refactors() end, mode = { "n", "x" }, desc = "Refactor" }, }, } diff --git a/.config/nvim/lua/plugins/extras/util/image.lua b/.config/nvim/lua/plugins/extras/util/image.lua index 65584cd1..88198470 100644 --- a/.config/nvim/lua/plugins/extras/util/image.lua +++ b/.config/nvim/lua/plugins/extras/util/image.lua @@ -2,8 +2,38 @@ return { { "edluffy/hologram.nvim", lazy = true, + enabled = false, opts = { auto_display = true, -- WIP automatic markdown image display, may be prone to breaking }, }, + { + "3rd/image.nvim", + event = "VeryLazy", + 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, + kitty_method = "normal", + }, + }, }