From fd7601367c78dc8fa7d9d1c67a54b847f41b46c3 Mon Sep 17 00:00:00 2001 From: Pranav Rao <56097527+pranavrao145@users.noreply.github.com> Date: Wed, 24 Nov 2021 18:29:46 -0500 Subject: [PATCH 1/2] docs(navigation): added documentation for nav_next and nav_prev functions --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 396dbf4..7caa0bc 100644 --- a/README.md +++ b/README.md @@ -58,10 +58,14 @@ This will mark the file and add it to the end of the mark list. #### Navigate to file To navigate to any of the marked files simply call the navigation function with -which index. +which index. There are also functions you can call to navigate to the next or +previous marks in the marks list. ```lua :lua require("harpoon.ui").nav_file(3) -- This will navigate to file 3 + +:lua require("harpoon.ui").nav_next() -- This will navigate to the next mark +:lua require("harpoon.ui").nav_prev() -- This will navigate to the previous mark ``` #### Manipulating current marks From 906f30dacbcc97e12ebdec73ae0a0b9bcf36a8f4 Mon Sep 17 00:00:00 2001 From: Lateef Alabi-Oki Date: Fri, 26 Nov 2021 05:45:46 -0500 Subject: [PATCH 2/2] use sorter and previewer from telescope settings --- lua/telescope/_extensions/marks.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lua/telescope/_extensions/marks.lua b/lua/telescope/_extensions/marks.lua index f450037..bc70029 100644 --- a/lua/telescope/_extensions/marks.lua +++ b/lua/telescope/_extensions/marks.lua @@ -5,6 +5,7 @@ local finders = require("telescope.finders") local pickers = require("telescope.pickers") local previewers = require("telescope.previewers") local sorters = require("telescope.sorters") +local conf = require("telescope.config").values local harpoon = require("harpoon") local harpoon_mark = require("harpoon.mark") @@ -98,8 +99,8 @@ return function(opts) pickers.new(opts, { prompt_title = "harpoon marks", finder = generate_new_finder(), - sorter = sorters.get_fuzzy_file(), - previewer = previewers.vim_buffer_cat.new({}), + sorter = conf.generic_sorter(opts), + previewer = conf.grep_previewer(opts), attach_mappings = function(_, map) map("i", "", delete_harpoon_mark) map("n", "", delete_harpoon_mark)