Skip to content

Commit

Permalink
rare commit of new plugin addition(snipe)
Browse files Browse the repository at this point in the history
  • Loading branch information
lipeeeee committed Aug 3, 2024
1 parent fb74ff3 commit fe5ce98
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
36 changes: 36 additions & 0 deletions lua/lipe/plugins/core/snipe.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
return {
"leath-dub/snipe.nvim",
config = function ()
local snipe = require("snipe")

snipe.config = {
ui = {
max_width = -1, -- -1 means dynamic width
-- Where to place the ui window
-- Can be any of "topleft", "bottomleft", "topright", "bottomright", "center", "cursor" (sets under the current cursor pos)
position = "topleft",
},
hints = {
-- Charaters to use for hints (NOTE: make sure they don't collide with the navigation keymaps)
dictionary = "sadflewcmpghio",
},
navigate = {
-- When the list is too long it is split into pages
-- `[next|prev]_page` options allow you to navigate
-- this list
next_page = "J",
prev_page = "K",

-- You can also just use normal navigation to go to the item you want
-- this option just sets the keybind for selecting the item under the
-- cursor
under_cursor = "<cr>",

-- In case you changed your mind, provide a keybind that lets you
-- cancel the snipe and close the window.
cancel_snipe = "<esc>",
},
}
snipe.setup()
end
}
1 change: 1 addition & 0 deletions lua/lipe/preferences/keybinds.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ return {

-- Buffer actions
{ "<leader>b", group = "+Buffer" },
{ "<leader>bs", function () require("snipe").open_buffer_menu() end, desc = "Snipe buffer" },
{ "<leader>bd", _cmd("bd"), desc = "Delete current buffer" },
{ "<leader>bD", _cmd("%bd|e#"), desc = "Delete every other buffer" },
{ "<leader>bl", _cmd("Telescope buffers"), desc = "List Buffers" },
Expand Down

0 comments on commit fe5ce98

Please sign in to comment.