From b51f1ae28924a752258e7607fbc3210f9b18eaac Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Thu, 22 Jul 2021 00:08:36 +0200 Subject: Updates based on Chris's lunarvim --- .config/nvim/lua/core/bufferline.lua | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .config/nvim/lua/core/bufferline.lua (limited to '.config/nvim/lua/core/bufferline.lua') diff --git a/.config/nvim/lua/core/bufferline.lua b/.config/nvim/lua/core/bufferline.lua new file mode 100644 index 0000000..d4e4b4f --- /dev/null +++ b/.config/nvim/lua/core/bufferline.lua @@ -0,0 +1,28 @@ +vim.api.nvim_set_keymap("n", "", ":BufferClose", { noremap = true, silent = true }) +vim.api.nvim_set_keymap("n", "", ":BufferNext", { noremap = true, silent = true }) +vim.api.nvim_set_keymap("n", "", ":BufferPrevious", { noremap = true, silent = true }) +vim.api.nvim_set_keymap("n", "c", ":BufferClose", { noremap = true, silent = true }) + +O.plugin.which_key.mappings["b"] = { + name = "Buffers", + j = { "BufferPick", "jump to buffer" }, + f = { "Telescope buffers", "Find buffer" }, + w = { "BufferWipeout", "wipeout buffer" }, + e = { + "BufferCloseAllButCurrent", + "close all but current buffer", + }, + h = { "BufferCloseBuffersLeft", "close all buffers to the left" }, + l = { + "BufferCloseBuffersRight", + "close all BufferLines to the right", + }, + D = { + "BufferOrderByDirectory", + "sort BufferLines automatically by directory", + }, + L = { + "BufferOrderByLanguage", + "sort BufferLines automatically by language", + }, +} -- cgit v1.2.3-70-g09d2