From affe302e2134608ec9073874d5522ae5e42972f3 Mon Sep 17 00:00:00 2001 From: Louie Shprung Date: Tue, 3 Jan 2023 16:33:09 -0800 Subject: Add JABS for buffer switching --- init.lua | 1 + lua/user/jabs.lua | 27 +++++++++++++++++++++++++++ lua/user/keymaps.lua | 9 +++++---- lua/user/plugins.lua | 3 +++ 4 files changed, 36 insertions(+), 4 deletions(-) create mode 100644 lua/user/jabs.lua diff --git a/init.lua b/init.lua index 037eaf4..1e6641d 100644 --- a/init.lua +++ b/init.lua @@ -2,6 +2,7 @@ require "user.options" --basic options require "user.keymaps" --custom keybinds require "user.plugins" --plugin setup require "user.colorscheme" --set colorscheme +require "user.jabs" --buffers require "user.cmp" --autocompletion require "user.lsp" --language server protocol require "user.treesitter" --treesitter diff --git a/lua/user/jabs.lua b/lua/user/jabs.lua new file mode 100644 index 0000000..136796d --- /dev/null +++ b/lua/user/jabs.lua @@ -0,0 +1,27 @@ +require 'jabs'.setup { + -- Options for the main window + position = {'left', 'bottom'}, + + -- Default symbols + symbols = { + current = "C", + split = "S", + alternate = "A", + hidden = "H", + locked = "L", + ro = "R", + edited = "E", + terminal = "T", + default_file = "D", + terminal_symbol = ">_" + }, + + -- Keymaps + keymap = { + close = "X", + h_split = "h", + v_split = "v" + }, + + use_devicons = false +} diff --git a/lua/user/keymaps.lua b/lua/user/keymaps.lua index 4da531c..adb6470 100644 --- a/lua/user/keymaps.lua +++ b/lua/user/keymaps.lua @@ -87,11 +87,12 @@ keymap("t", "", "l", term_opts) ]] -- Buffer Options -keymap("n", "bd", ":b#:bd#", opts) --Close buffer without closing window +keymap("n", "bd", ":b#:bd#", opts) --Close buffer without closing window ('b'uffer 'd'elete) +keymap("n", "bl", ":JABSOpen", opts) --Open buffer switcher ('b'uffer 'l'ist) -- Toggle GUI colors -keymap("n", "g", ":set termguicolors!:TSToggle highlight", opts) +keymap("n", "g", ":set termguicolors!:TSToggle highlight", opts) -- ('g'ui) -- Workspace Options -keymap("n", "wsh", ":split", opts) --Horizontal split workspace -keymap("n", "wsv", ":vs", opts) --Vertical split workspace +keymap("n", "wsh", ":split", opts) --Horizontal split workspace ('s'plit 'h'orizontal) +keymap("n", "wsv", ":vs", opts) --Vertical split workspace ('s'plit 'v'ertical) diff --git a/lua/user/plugins.lua b/lua/user/plugins.lua index b13b028..ad9ba8e 100644 --- a/lua/user/plugins.lua +++ b/lua/user/plugins.lua @@ -14,6 +14,9 @@ return packer.startup(function(use) -- Colorschemes --use "lunarvim/colorschemes" -- Additional colorschemes + -- Buffers + use 'matbme/JABS.nvim' + -- cmp plugins use "hrsh7th/nvim-cmp" -- The completion plugin use "hrsh7th/cmp-buffer" -- Buffer completions -- cgit