mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-22 13:20:44 +00:00
tabline/bufferline: add back bindings
This commit is contained in:
parent
c96181e739
commit
83b7632297
1 changed files with 13 additions and 1 deletions
|
@ -9,7 +9,6 @@
|
||||||
inherit (lib.nvim.lua) toLuaObject;
|
inherit (lib.nvim.lua) toLuaObject;
|
||||||
|
|
||||||
cfg = config.vim.tabline.nvimBufferline;
|
cfg = config.vim.tabline.nvimBufferline;
|
||||||
|
|
||||||
self = import ./nvim-bufferline.nix {inherit lib;};
|
self = import ./nvim-bufferline.nix {inherit lib;};
|
||||||
inherit (self.options.vim.tabline.nvimBufferline) mappings;
|
inherit (self.options.vim.tabline.nvimBufferline) mappings;
|
||||||
in {
|
in {
|
||||||
|
@ -20,6 +19,19 @@ in {
|
||||||
"bufdelete-nvim"
|
"bufdelete-nvim"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
maps.normal = mkMerge [
|
||||||
|
(mkLuaBinding cfg.mappings.closeCurrent "require(\"bufdelete\").bufdelete" mappings.closeCurrent.description)
|
||||||
|
(mkBinding cfg.mappings.cycleNext ":BufferLineCycleNext<CR>" mappings.cycleNext.description)
|
||||||
|
(mkBinding cfg.mappings.cycleNext ":BufferLineCycleNext<CR>" mappings.cycleNext.description)
|
||||||
|
(mkBinding cfg.mappings.cyclePrevious ":BufferLineCyclePrev<CR>" mappings.cyclePrevious.description)
|
||||||
|
(mkBinding cfg.mappings.pick ":BufferLinePick<CR>" mappings.pick.description)
|
||||||
|
(mkBinding cfg.mappings.sortByExtension ":BufferLineSortByExtension<CR>" mappings.sortByExtension.description)
|
||||||
|
(mkBinding cfg.mappings.sortByDirectory ":BufferLineSortByDirectory<CR>" mappings.sortByDirectory.description)
|
||||||
|
(mkLuaBinding cfg.mappings.sortById "function() require(\"bufferline\").sort_buffers_by(function (buf_a, buf_b) return buf_a.id < buf_b.id end) end" mappings.sortById.description)
|
||||||
|
(mkBinding cfg.mappings.moveNext ":BufferLineMoveNext<CR>" mappings.moveNext.description)
|
||||||
|
(mkBinding cfg.mappings.movePrevious ":BufferLineMovePrev<CR>" mappings.movePrevious.description)
|
||||||
|
];
|
||||||
|
|
||||||
binds.whichKey.register = pushDownDefault {
|
binds.whichKey.register = pushDownDefault {
|
||||||
"<leader>b" = "+Buffer";
|
"<leader>b" = "+Buffer";
|
||||||
"<leader>bm" = "BufferLineMove";
|
"<leader>bm" = "BufferLineMove";
|
||||||
|
|
Loading…
Reference in a new issue