mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 08:35:43 +02:00
bufferline: refactor - added package and extraOptions options. (#126)
This commit is contained in:
parent
11da3bfbc1
commit
d2f714c40e
1 changed files with 14 additions and 3 deletions
|
@ -26,6 +26,11 @@ in
|
||||||
options = {
|
options = {
|
||||||
plugins.bufferline = {
|
plugins.bufferline = {
|
||||||
enable = mkEnableOption "Enable bufferline";
|
enable = mkEnableOption "Enable bufferline";
|
||||||
|
package = mkOption {
|
||||||
|
type = types.package;
|
||||||
|
description = "Plugin to use for bufferline";
|
||||||
|
default = pkgs.vimPlugins.bufferline-nvim;
|
||||||
|
};
|
||||||
numbers = mkOption {
|
numbers = mkOption {
|
||||||
type = types.nullOr types.lines;
|
type = types.nullOr types.lines;
|
||||||
description = "A lua function customizing the styling of numbers.";
|
description = "A lua function customizing the styling of numbers.";
|
||||||
|
@ -109,7 +114,7 @@ in
|
||||||
default = null;
|
default = null;
|
||||||
};
|
};
|
||||||
diagnosticsIndicator = mkOption {
|
diagnosticsIndicator = mkOption {
|
||||||
type = types.nullOr types.lines;
|
type = types.nullOr helpers.rawType;
|
||||||
default = null;
|
default = null;
|
||||||
};
|
};
|
||||||
customFilter = mkOption {
|
customFilter = mkOption {
|
||||||
|
@ -218,6 +223,12 @@ in
|
||||||
};
|
};
|
||||||
}));
|
}));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
extraOptions = mkOption {
|
||||||
|
type = types.attrs;
|
||||||
|
default = { };
|
||||||
|
description = "Extra options, will override others if defined";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -253,7 +264,7 @@ in
|
||||||
enforce_regular_tabs = cfg.enforceRegularTabs;
|
enforce_regular_tabs = cfg.enforceRegularTabs;
|
||||||
always_show_bufferline = cfg.alwaysShowBufferline;
|
always_show_bufferline = cfg.alwaysShowBufferline;
|
||||||
sort_by = cfg.sortBy;
|
sort_by = cfg.sortBy;
|
||||||
};
|
} // cfg.extraOptions;
|
||||||
highlights = if builtins.isNull cfg.highlights then null else with cfg.highlights; {
|
highlights = if builtins.isNull cfg.highlights then null else with cfg.highlights; {
|
||||||
fill = fill;
|
fill = fill;
|
||||||
background = background;
|
background = background;
|
||||||
|
@ -319,7 +330,7 @@ in
|
||||||
in
|
in
|
||||||
mkIf cfg.enable {
|
mkIf cfg.enable {
|
||||||
extraPlugins = with pkgs.vimPlugins; [
|
extraPlugins = with pkgs.vimPlugins; [
|
||||||
bufferline-nvim
|
cfg.package
|
||||||
nvim-web-devicons
|
nvim-web-devicons
|
||||||
];
|
];
|
||||||
options.termguicolors = true;
|
options.termguicolors = true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue