From c57cb1995153cd13cc62386d2bd66c84762f7d81 Mon Sep 17 00:00:00 2001 From: Hugh Carroll Date: Sun, 17 Dec 2023 07:14:34 +0000 Subject: [PATCH] Some explanation on how to configure splits & tabs. --- README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/README.md b/README.md index 167fe1b..92b67c6 100644 --- a/README.md +++ b/README.md @@ -192,6 +192,27 @@ settings = { }, ``` +### Extend +The 'extend' functionality can be used to add keymaps for opening files in splits & tabs. + +```lua +harpoon:extend({ + UI_CREATE = function(cx) + vim.keymap.set("n", "", function() + harpoon.ui:select_menu_item({ vsplit = true }) + end, { buffer = cx.bufnr }) + + vim.keymap.set("n", "", function() + harpoon.ui:select_menu_item({ split = true }) + end, { buffer = cx.bufnr }) + + vim.keymap.set("n", "", function() + harpoon.ui:select_menu_item({ tabedit = true }) + end, { buffer = cx.bufnr }) + end, +}) +``` + ### Highlight Groups TODO: Fill in the idea that we will emit out window information