Skip to content

Commit

Permalink
added updated configs to snipe.nv
Browse files Browse the repository at this point in the history
  • Loading branch information
lipeeeee committed Dec 5, 2024
1 parent 1d41d92 commit 3d89529
Showing 1 changed file with 71 additions and 33 deletions.
104 changes: 71 additions & 33 deletions lua/lipe/plugins/core/snipe.lua
Original file line number Diff line number Diff line change
@@ -1,35 +1,73 @@
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
"leath-dub/snipe.nvim",
config = function()
local snipe = require("snipe")
snipe.config = {
ui = {
max_height = -1, -- -1 means dynamic height
-- Where to place the ui window
-- Can be any of "topleft", "bottomleft", "topright", "bottomright", "center", "cursor" (sets under the current cursor pos)
position = "topleft",
-- Override options passed to `nvim_open_win`
-- Be careful with this as snipe will not validate
-- anything you override here. See `:h nvim_open_win`
-- for config options
open_win_override = {
-- title = "My Window Title",
border = "single", -- use "rounded" for rounded border
},

-- Preselect the currently open buffer
preselect_current = true,

-- Set a function to preselect the currently open buffer
-- E.g, `preselect = require("snipe").preselect_by_classifier("#")` to
-- preselect alternate buffer (see :h ls and look at the "Indicators")
preselect = nil, -- function (bs: Buffer[] [see lua/snipe/buffer.lua]) -> int (index)

-- Changes how the items are aligned: e.g. "<tag> foo " vs "<tag> foo"
-- Can be "left", "right" or "file-first"
-- NOTE: "file-first" buts the file name first and then the directory name
text_align = "left",
},
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>",

-- Close the buffer under the cursor
-- Remove "j" and "k" from your dictionary to navigate easier to delete
-- NOTE: Make sure you don't use the character below on your dictionary
close_buffer = "D",

-- Open buffer in vertical split
open_vsplit = "V",

-- Open buffer in split, based on `vim.opt.splitbelow`
open_split = "H",

-- Change tag manually
change_tag = "C",
},
-- The default sort used for the buffers
-- Can be any of "last", (sort buffers by last accessed) "default" (sort buffers by its number)
sort = "default"
}
snipe.setup()
end
}

0 comments on commit 3d89529

Please sign in to comment.