From 26d8fc3df7be4aa41cbae4e8a597734e65da7b42 Mon Sep 17 00:00:00 2001 From: Aditya Date: Mon, 4 Mar 2024 16:06:12 +0530 Subject: [PATCH] add bufferline --- config/bufferlines/bufferlines.nix | 107 +++++++++++++++++++++++++++++ config/default.nix | 1 + config/sets.nix | 2 +- 3 files changed, 109 insertions(+), 1 deletion(-) create mode 100644 config/bufferlines/bufferlines.nix diff --git a/config/bufferlines/bufferlines.nix b/config/bufferlines/bufferlines.nix new file mode 100644 index 0000000..48c81eb --- /dev/null +++ b/config/bufferlines/bufferlines.nix @@ -0,0 +1,107 @@ +{ + plugins = { + bufferline = { + enable = true; + separatorStyle = "thick"; # "slant", "padded_slant", "slope", "padded_slope", "thick", "thin" + offsets = [ + { + filetype = "neo-tree"; + text = "Neo-tree"; + highlight = "Directory"; + text_align = "left"; + } + ]; + }; + }; + + keymaps = [ + { + mode = "n"; + key = ""; + action = "BufferLineCycleNext"; + options = { + desc = "Cycle to next buffer"; + }; + } + { + mode = "n"; + key = ""; + action = "BufferLineCyclePrev"; + options = { + desc = "Cycle to previous buffer"; + }; + } + { + mode = "n"; + key = ""; + action = "BufferLineCycleNext"; + options = { + desc = "Cycle to next buffer"; + }; + } + { + mode = "n"; + key = ""; + action = "BufferLineCyclePrev"; + options = { + desc = "Cycle to previous buffer"; + }; + } + { + mode = "n"; + key = "bd"; + action = "bdelete"; + options = { + desc = "Delete buffer"; + }; + } + { + mode = "n"; + key = "bb"; + action = "e #"; + options = { + desc = "Switch to other buffer"; + }; + } + { + mode = "n"; + key = "br"; + action = "BufferLineCloseRight"; + options = { + desc = "Delete buffers to the right"; + }; + } + { + mode = "n"; + key = "bl"; + action = "BufferLineCloseLeft"; + options = { + desc = "Delete buffers to the left"; + }; + } + { + mode = "n"; + key = "bo"; + action = "BufferLneCloseOthers"; + options = { + desc = "Delete other buffers"; + }; + } + { + mode = "n"; + key = "bp"; + action = "BufferLineTogglePin"; + options = { + desc = "Toggle pin"; + }; + } + { + mode = "n"; + key = "bP"; + action = "BufferLineGroupClose ungrouped"; + options = { + desc = "Delete non-pinned buffers"; + }; + } + ]; +} diff --git a/config/default.nix b/config/default.nix index afad99b..7c0b1e0 100644 --- a/config/default.nix +++ b/config/default.nix @@ -1,5 +1,6 @@ { imports = [ + ./bufferlines/bufferlines.nix ./sets.nix ./dap/dap.nix ./keymaps.nix diff --git a/config/sets.nix b/config/sets.nix index 623fe0c..e8bd959 100644 --- a/config/sets.nix +++ b/config/sets.nix @@ -97,7 +97,7 @@ cmdheight = 2; # Showmode - showmode = true; # TODO change to false + showmode = false; # TODO change to false # Maximum number of items to show in popup menu (0 - use available screen space) pumheight = 0;