mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
barbar: init plugin
This commit is contained in:
parent
70791a75fa
commit
e975ef9e3b
2 changed files with 59 additions and 0 deletions
|
@ -20,6 +20,7 @@
|
|||
./utils/endwise.nix
|
||||
./utils/telescope.nix
|
||||
./utils/nvim-autopairs.nix
|
||||
./utils/barbar.nix
|
||||
|
||||
./languages/treesitter.nix
|
||||
./languages/nix.nix
|
||||
|
|
58
plugins/utils/barbar.nix
Normal file
58
plugins/utils/barbar.nix
Normal file
|
@ -0,0 +1,58 @@
|
|||
{ lib, pkgs, config, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.programs.nixvim.plugins.barbar;
|
||||
in
|
||||
{
|
||||
options.programs.nixvim.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.programs.nixvim = mkIf cfg.enable {
|
||||
extraPlugins = with pkgs.vimPlugins; [
|
||||
barbar-nvim nvim-web-devicons
|
||||
];
|
||||
|
||||
# maps = genMaps cfg.keys;
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue