/
barbar.nix
58 lines (49 loc) · 1.63 KB
/
barbar.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
{ lib, pkgs, config, ... }:
with lib;
let
cfg = config.plugins.barbar;
in
{
options.plugins.barbar = {
enable = mkEnableOption "Enable barbar.nvim";
animations = mkOption {
type = types.nullOr types.bool;
default = null;
description = "Enable animations";
};
autoHide = mkOption {
type = types.nullOr types.bool;
default = null;
description = "Auto-hide the tab bar when there is only one buffer";
};
closeable = mkOption {
type = types.nullOr types.bool;
default = null;
description = "Enable the close button";
};
icons = mkOption {
type = with types; nullOr (oneOf [bool (enum ["numbers both"])]);
default = null;
description = "Enable/disable icons";
};
iconCustomColors = mkOption {
type = with types; nullOr (oneOf [bool str]);
default = null;
description = "Sets the icon highlight group";
};
# Keybinds concept:
# keys = {
# previousBuffer = mkBindDef "normal" "Previous buffer" { action = ":BufferPrevious<CR>"; silent = true; } "<A-,>";
# nextBuffer = mkBindDef "normal" "Next buffer" { action = ":BufferNext<CR>"; silent = true; } "<A-.>";
# movePrevious = mkBindDef "normal" "Re-order to previous" { action = ":BufferMovePrevious<CR>"; silent = true; } "<A-<>";
# moveNext = mkBindDef "normal" "Re-order to next" { action = ":BufferMoveNext<CR>"; silent = true; } "<A->>";
# # TODO all the other ones.....
# };
};
config = mkIf cfg.enable {
extraPlugins = with pkgs.vimPlugins; [
barbar-nvim nvim-web-devicons
];
# maps = genMaps cfg.keys;
};
}