From 83b76322973d3affc0495f6b49435d8c66ebcd88 Mon Sep 17 00:00:00 2001 From: diniamo Date: Fri, 14 Jun 2024 11:20:10 +0200 Subject: [PATCH] tabline/bufferline: add back bindings --- modules/plugins/tabline/nvim-bufferline/config.nix | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/modules/plugins/tabline/nvim-bufferline/config.nix b/modules/plugins/tabline/nvim-bufferline/config.nix index c52fb49..aaacd33 100644 --- a/modules/plugins/tabline/nvim-bufferline/config.nix +++ b/modules/plugins/tabline/nvim-bufferline/config.nix @@ -9,7 +9,6 @@ inherit (lib.nvim.lua) toLuaObject; cfg = config.vim.tabline.nvimBufferline; - self = import ./nvim-bufferline.nix {inherit lib;}; inherit (self.options.vim.tabline.nvimBufferline) mappings; in { @@ -20,6 +19,19 @@ in { "bufdelete-nvim" ]; + maps.normal = mkMerge [ + (mkLuaBinding cfg.mappings.closeCurrent "require(\"bufdelete\").bufdelete" mappings.closeCurrent.description) + (mkBinding cfg.mappings.cycleNext ":BufferLineCycleNext" mappings.cycleNext.description) + (mkBinding cfg.mappings.cycleNext ":BufferLineCycleNext" mappings.cycleNext.description) + (mkBinding cfg.mappings.cyclePrevious ":BufferLineCyclePrev" mappings.cyclePrevious.description) + (mkBinding cfg.mappings.pick ":BufferLinePick" mappings.pick.description) + (mkBinding cfg.mappings.sortByExtension ":BufferLineSortByExtension" mappings.sortByExtension.description) + (mkBinding cfg.mappings.sortByDirectory ":BufferLineSortByDirectory" 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" mappings.moveNext.description) + (mkBinding cfg.mappings.movePrevious ":BufferLineMovePrev" mappings.movePrevious.description) + ]; + binds.whichKey.register = pushDownDefault { "b" = "+Buffer"; "bm" = "BufferLineMove";