From ec90c943a163e99b408d9c072055cbf70a58da4e Mon Sep 17 00:00:00 2001 From: Daniel Fichtinger Date: Wed, 18 Dec 2024 18:25:04 -0500 Subject: [PATCH] AutoYADM commit: 2024-12-18 18:25:04 --- .config/nvim/lua/plugins/marks.lua | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.config/nvim/lua/plugins/marks.lua b/.config/nvim/lua/plugins/marks.lua index c1c27073..a1a333ed 100644 --- a/.config/nvim/lua/plugins/marks.lua +++ b/.config/nvim/lua/plugins/marks.lua @@ -2,7 +2,19 @@ return { "chentoast/marks.nvim", enabled = true, event = "VeryLazy", - opts = { - builtin_marks = { ".", "<", ">", "^" }, - }, + config = function() + local function fmt_prefix(prefix, mappings) + local out = {} + for k, v in pairs(mappings) do + out[k] = prefix .. v[1] + require("which-key").add({ out[k], desc = v[2] }) + end + return out + end + local opts = { + builtin_marks = { ".", "<", ">", "^" }, + mappings = {}, + } + require("marks").setup(opts) + end, }