mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-12-02 09:27:18 +00:00
NotAShelf
954470581e
this is pretty much WIP and contains a bunch of bugs that I haven't tackled yet.
36 lines
937 B
Nix
36 lines
937 B
Nix
{
|
|
config,
|
|
lib,
|
|
...
|
|
}: let
|
|
inherit (lib.modules) mkIf mkMerge;
|
|
inherit (lib.nvim.binds) mkLuaBinding mkBinding pushDownDefault;
|
|
inherit (lib.nvim.dag) entryAnywhere;
|
|
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 {
|
|
config = mkIf cfg.enable {
|
|
vim = {
|
|
startPlugins = [
|
|
(assert config.vim.visuals.nvimWebDevicons.enable; "nvim-bufferline-lua")
|
|
"bufdelete-nvim"
|
|
];
|
|
|
|
binds.whichKey.register = pushDownDefault {
|
|
"<leader>b" = "+Buffer";
|
|
"<leader>bm" = "BufferLineMove";
|
|
"<leader>bs" = "BufferLineSort";
|
|
"<leader>bsi" = "BufferLineSortById";
|
|
};
|
|
|
|
luaConfigRC.nvimBufferline = entryAnywhere ''
|
|
require("bufferline").setup({options = ${toLuaObject cfg.setupOpts}})
|
|
'';
|
|
};
|
|
};
|
|
}
|