From ee88655c01a3907e398759747f71896084ac03c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20La=C3=ADn?= Date: Wed, 3 Apr 2024 09:59:43 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(nvim):=20use=20add=20instead?= =?UTF-8?q?=20of=20append=20in=20harpoon=20extra?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit append is now deprecated --- .../plugins/extras/editor/marks/harpoon-extended.lua | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.config/nvim/lua/plugins/extras/editor/marks/harpoon-extended.lua b/.config/nvim/lua/plugins/extras/editor/marks/harpoon-extended.lua index 869f1e50..8aa373ff 100644 --- a/.config/nvim/lua/plugins/extras/editor/marks/harpoon-extended.lua +++ b/.config/nvim/lua/plugins/extras/editor/marks/harpoon-extended.lua @@ -5,7 +5,7 @@ for i = 1, 9 do table.insert(keys, { "m" .. i, function() require("harpoon"):list():select(i) end, desc = "File " .. i }) end -table.insert(keys, { "ma", function() require("harpoon"):list():append() end, desc = "Add Mark" }) +table.insert(keys, { "ma", function() require("harpoon"):list():add() end, desc = "Add Mark" }) table.insert(keys, { "mm", function() require("harpoon").ui:toggle_quick_menu(require("harpoon"):list()) end, desc = "Marks" }) table.insert(keys, { "mt", "Telescope harpoon marks", desc = "Marks (Telescope)" }) table.insert(keys, { "mc", function() require("harpoon"):list():clear() end, desc = "Clear all Marks" }) @@ -24,11 +24,17 @@ return { dependencies = { "nvim-lua/plenary.nvim", }, - --stylua: ignore keys = keys, config = function() local harpoon = require("harpoon") - harpoon:setup({}) + harpoon:setup({ + menu = { + width = vim.api.nvim_win_get_width(0) - 4, + }, + settings = { + save_on_toggle = true, + }, + }) harpoon:extend({ UI_CREATE = function(cx)