From f3ab80b59814849bb2240ac2a17e6a4a3672a36f Mon Sep 17 00:00:00 2001 From: Oliver Ladner Date: Thu, 5 Sep 2024 10:29:21 +0200 Subject: [PATCH] feat: add snipe.nvim --- README.md | 1 + lua/weeheavy/plugins/snipe.lua | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 lua/weeheavy/plugins/snipe.lua diff --git a/README.md b/README.md index d2525b0..81b1831 100644 --- a/README.md +++ b/README.md @@ -89,6 +89,7 @@ This is more accurate than `nvim --startuptime`. | **copilot.lua** | The better github.com/github/copilot.vim | | | **copilot-cmp** | transforms zbirenbaum/copilot.lua into a cmp source. | | | **nvim-lint** | Narrow-scope linter plugin to use via Neovim diagnostic framework | | +| **snipe.nvim** | Buffer navigation | | ## Looks diff --git a/lua/weeheavy/plugins/snipe.lua b/lua/weeheavy/plugins/snipe.lua new file mode 100644 index 0000000..497cf7f --- /dev/null +++ b/lua/weeheavy/plugins/snipe.lua @@ -0,0 +1,32 @@ +-- Buffer navigation +-- https://github.com/leath-dub/snipe.nvim +return { + "leath-dub/snipe.nvim", + opts = {}, + keys = { + { + "", + function() + require("snipe").open_buffer_menu() + end, + desc = "Open Snipe buffer menu", + }, + }, + config = function() + local snipe = require("snipe") + snipe.setup({ + hints = { + -- Charaters to use for hints + -- make sure they don't collide with the navigation keymaps + dictionary = "saflewcmpghio", + }, + navigate = { + cancel_snipe = "q", + -- Close the buffer under the cursor + -- PR not merged yet: https://github.com/leath-dub/snipe.nvim/pull/13 + -- NOTE: Make sure you don't use the character below on your dictionary + close_buffer = "d", + }, + }) + end, +}