From 2e7e1ce219b43bb74f67875200dd4b68758ffd27 Mon Sep 17 00:00:00 2001 From: seth Date: Tue, 16 Jul 2024 19:04:27 -0400 Subject: back to nixvim again --- nixvim/plugins/bufferline.nix | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 nixvim/plugins/bufferline.nix (limited to 'nixvim/plugins/bufferline.nix') diff --git a/nixvim/plugins/bufferline.nix b/nixvim/plugins/bufferline.nix new file mode 100644 index 0000000..85dc127 --- /dev/null +++ b/nixvim/plugins/bufferline.nix @@ -0,0 +1,35 @@ +{ lib, ... }: +let + applyDefaultOpts = map ( + lib.recursiveUpdate { + mode = "n"; + options = { + noremap = true; + silent = true; + }; + } + ); +in +{ + keymaps = + applyDefaultOpts [ + { + action = "BufferLinePickClose"; + key = "q"; + } + ] + ++ map (i: { + action = "BufferLineGoToBuffer ${toString i}"; + key = "${toString i}"; + }) (lib.range 1 9); + + plugins.bufferline = { + enable = true; + + alwaysShowBufferline = false; + diagnostics = "nvim_lsp"; + mode = "buffers"; + numbers = "ordinal"; + separatorStyle = "slant"; + }; +} -- cgit v1.2.3