|
1 | 1 | return {
|
2 |
| - "leath-dub/snipe.nvim", |
3 |
| - config = function() |
4 |
| - local snipe = require("snipe") |
5 |
| - snipe.config = { |
6 |
| - ui = { |
7 |
| - max_width = -1, -- -1 means dynamic width |
8 |
| - -- Where to place the ui window |
9 |
| - -- Can be any of "topleft", "bottomleft", "topright", "bottomright", "center", "cursor" (sets under the current cursor pos) |
10 |
| - position = "topleft", |
11 |
| - }, |
12 |
| - hints = { |
13 |
| - -- Charaters to use for hints (NOTE: make sure they don't collide with the navigation keymaps) |
14 |
| - dictionary = "sadflewcmpghio", |
15 |
| - }, |
16 |
| - navigate = { |
17 |
| - -- When the list is too long it is split into pages |
18 |
| - -- `[next|prev]_page` options allow you to navigate |
19 |
| - -- this list |
20 |
| - next_page = "J", |
21 |
| - prev_page = "K", |
22 |
| - |
23 |
| - -- You can also just use normal navigation to go to the item you want |
24 |
| - -- this option just sets the keybind for selecting the item under the |
25 |
| - -- cursor |
26 |
| - under_cursor = "<cr>", |
27 |
| - |
28 |
| - -- In case you changed your mind, provide a keybind that lets you |
29 |
| - -- cancel the snipe and close the window. |
30 |
| - cancel_snipe = "<esc>", |
31 |
| - }, |
32 |
| - } |
33 |
| - snipe.setup() |
34 |
| - end |
| 2 | + "leath-dub/snipe.nvim", |
| 3 | + config = function() |
| 4 | + local snipe = require("snipe") |
| 5 | + snipe.config = { |
| 6 | + ui = { |
| 7 | + max_height = -1, -- -1 means dynamic height |
| 8 | + -- Where to place the ui window |
| 9 | + -- Can be any of "topleft", "bottomleft", "topright", "bottomright", "center", "cursor" (sets under the current cursor pos) |
| 10 | + position = "topleft", |
| 11 | + -- Override options passed to `nvim_open_win` |
| 12 | + -- Be careful with this as snipe will not validate |
| 13 | + -- anything you override here. See `:h nvim_open_win` |
| 14 | + -- for config options |
| 15 | + open_win_override = { |
| 16 | + -- title = "My Window Title", |
| 17 | + border = "single", -- use "rounded" for rounded border |
| 18 | + }, |
| 19 | + |
| 20 | + -- Preselect the currently open buffer |
| 21 | + preselect_current = true, |
| 22 | + |
| 23 | + -- Set a function to preselect the currently open buffer |
| 24 | + -- E.g, `preselect = require("snipe").preselect_by_classifier("#")` to |
| 25 | + -- preselect alternate buffer (see :h ls and look at the "Indicators") |
| 26 | + preselect = nil, -- function (bs: Buffer[] [see lua/snipe/buffer.lua]) -> int (index) |
| 27 | + |
| 28 | + -- Changes how the items are aligned: e.g. "<tag> foo " vs "<tag> foo" |
| 29 | + -- Can be "left", "right" or "file-first" |
| 30 | + -- NOTE: "file-first" buts the file name first and then the directory name |
| 31 | + text_align = "left", |
| 32 | + }, |
| 33 | + hints = { |
| 34 | + -- Charaters to use for hints (NOTE: make sure they don't collide with the navigation keymaps) |
| 35 | + dictionary = "sadflewcmpghio", |
| 36 | + }, |
| 37 | + navigate = { |
| 38 | + -- When the list is too long it is split into pages |
| 39 | + -- `[next|prev]_page` options allow you to navigate |
| 40 | + -- this list |
| 41 | + next_page = "J", |
| 42 | + prev_page = "K", |
| 43 | + |
| 44 | + -- You can also just use normal navigation to go to the item you want |
| 45 | + -- this option just sets the keybind for selecting the item under the |
| 46 | + -- cursor |
| 47 | + under_cursor = "<cr>", |
| 48 | + |
| 49 | + -- In case you changed your mind, provide a keybind that lets you |
| 50 | + -- cancel the snipe and close the window. |
| 51 | + cancel_snipe = "<esc>", |
| 52 | + |
| 53 | + -- Close the buffer under the cursor |
| 54 | + -- Remove "j" and "k" from your dictionary to navigate easier to delete |
| 55 | + -- NOTE: Make sure you don't use the character below on your dictionary |
| 56 | + close_buffer = "D", |
| 57 | + |
| 58 | + -- Open buffer in vertical split |
| 59 | + open_vsplit = "V", |
| 60 | + |
| 61 | + -- Open buffer in split, based on `vim.opt.splitbelow` |
| 62 | + open_split = "H", |
| 63 | + |
| 64 | + -- Change tag manually |
| 65 | + change_tag = "C", |
| 66 | + }, |
| 67 | + -- The default sort used for the buffers |
| 68 | + -- Can be any of "last", (sort buffers by last accessed) "default" (sort buffers by its number) |
| 69 | + sort = "default" |
| 70 | + } |
| 71 | + snipe.setup() |
| 72 | + end |
35 | 73 | }
|
0 commit comments