add snipe.nvim for jumping buffers on gb

This commit is contained in:
Noah Masur 2024-08-11 21:55:14 -04:00
parent 883dc15b3d
commit 6866ca5fee
No known key found for this signature in database
4 changed files with 27 additions and 1 deletions

17
flake.lock generated
View File

@ -603,6 +603,7 @@
"nvim-treesitter-src": "nvim-treesitter-src",
"ren": "ren",
"rep": "rep",
"snipe-nvim-src": "snipe-nvim-src",
"stu": "stu",
"telescope-nvim-src": "telescope-nvim-src",
"telescope-project-nvim-src": "telescope-project-nvim-src",
@ -620,6 +621,22 @@
"zenyd-mpv-scripts": "zenyd-mpv-scripts"
}
},
"snipe-nvim-src": {
"flake": false,
"locked": {
"lastModified": 1722790509,
"narHash": "sha256-DhJ2ss0p64mpaVo9rri72pEoaWbOOL05klM9AydnqJk=",
"owner": "leath-dub",
"repo": "snipe.nvim",
"rev": "854a47c970413405361487c13e2b1e9aa9a3696e",
"type": "github"
},
"original": {
"owner": "leath-dub",
"repo": "snipe.nvim",
"type": "github"
}
},
"stu": {
"flake": false,
"locked": {

View File

@ -135,6 +135,10 @@
url = "github:rachartier/tiny-inline-diagnostic.nvim";
flake = false;
};
snipe-nvim-src = {
url = "github:leath-dub/snipe.nvim";
flake = false;
};
# Tree-Sitter Grammars
tree-sitter-bash = {

View File

@ -6,6 +6,7 @@
plugins = [
pkgs.vimPlugins.bufferline-nvim
pkgs.vimPlugins.vim-bbye # Better closing of buffers
pkgs.vimPlugins.snipe-nvim # Jump between open buffers
];
setup.bufferline = {
options = {
@ -15,6 +16,7 @@
offsets = [ { filetype = "NvimTree"; } ];
};
};
setup.snipe = { };
lua = ''
-- Move buffers
vim.keymap.set("n", "L", ":BufferLineCycleNext<CR>", { silent = true })
@ -22,5 +24,7 @@
-- Kill buffer
vim.keymap.set("n", "<Leader>x", " :Bdelete<CR>", { silent = true })
'';
-- Jump to buffer
vim.keymap.set("n", "gb", require("snipe").open_buffer_menu, { silent = true }) '';
}

View File

@ -40,5 +40,6 @@ in
hmts-nvim = plugin "hmts-nvim" inputs.hmts-nvim-src;
markview-nvim = plugin "markview-nvim" inputs.markview-nvim-src;
tiny-inline-diagnostic-nvim = plugin "tiny-inline-diagnostic-nvim" inputs.tiny-inline-diagnostic-nvim-src;
snipe-nvim = plugin "snipe-nvim" inputs.snipe-nvim-src;
};
}