mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-05 23:04:31 +02:00
plugins/bufferline: add missing highlight groups
This commit is contained in:
parent
c8051ab345
commit
288e46e2d8
1 changed files with 69 additions and 46 deletions
|
@ -26,7 +26,10 @@ with lib; let
|
||||||
|
|
||||||
tab = "tab";
|
tab = "tab";
|
||||||
tab_selected = "tabSelected";
|
tab_selected = "tabSelected";
|
||||||
|
tab_separator = "tabSeparator";
|
||||||
|
tab_separator_selected = "tabSeparatorSelected";
|
||||||
tab_close = "tabClose";
|
tab_close = "tabClose";
|
||||||
|
|
||||||
close_button = "closeButton";
|
close_button = "closeButton";
|
||||||
close_button_visible = "closeButtonVisible";
|
close_button_visible = "closeButtonVisible";
|
||||||
close_button_selected = "closeButtonSelected";
|
close_button_selected = "closeButtonSelected";
|
||||||
|
@ -34,10 +37,22 @@ with lib; let
|
||||||
buffer_visible = "bufferVisible";
|
buffer_visible = "bufferVisible";
|
||||||
buffer_selected = "bufferSelected";
|
buffer_selected = "bufferSelected";
|
||||||
|
|
||||||
|
numbers = "numbers";
|
||||||
|
numbers_visible = "numbersVisible";
|
||||||
|
numbers_selected = "numbersSelected";
|
||||||
|
|
||||||
diagnostic = "diagnostic";
|
diagnostic = "diagnostic";
|
||||||
diagnostic_visible = "diagnosticVisible";
|
diagnostic_visible = "diagnosticVisible";
|
||||||
diagnostic_selected = "diagnosticSelected";
|
diagnostic_selected = "diagnosticSelected";
|
||||||
|
|
||||||
|
hint = "hint";
|
||||||
|
hint_visible = "hintVisible";
|
||||||
|
hint_selected = "hintSelected";
|
||||||
|
|
||||||
|
hint_diagnostic = "hintDiagnostic";
|
||||||
|
hint_diagnostic_visible = "hintDiagnosticVisible";
|
||||||
|
hint_diagnostic_selected = "hintDiagnosticSelected";
|
||||||
|
|
||||||
info = "info";
|
info = "info";
|
||||||
info_visible = "infoVisible";
|
info_visible = "infoVisible";
|
||||||
info_selected = "infoSelected";
|
info_selected = "infoSelected";
|
||||||
|
@ -74,11 +89,16 @@ with lib; let
|
||||||
separator_visible = "separatorVisible";
|
separator_visible = "separatorVisible";
|
||||||
separator_selected = "separatorSelected";
|
separator_selected = "separatorSelected";
|
||||||
|
|
||||||
|
indicator_visible = "indicatorVisible";
|
||||||
indicator_selected = "indicatorSelected";
|
indicator_selected = "indicatorSelected";
|
||||||
|
|
||||||
pick = "pick";
|
pick = "pick";
|
||||||
pick_visible = "pickVisible";
|
pick_visible = "pickVisible";
|
||||||
pick_selected = "pickSelected";
|
pick_selected = "pickSelected";
|
||||||
|
|
||||||
|
offset_separator = "offsetSeparator";
|
||||||
|
|
||||||
|
trunc_marker = "trunkMarker";
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
options = {
|
options = {
|
||||||
|
@ -252,73 +272,76 @@ in {
|
||||||
```
|
```
|
||||||
'';
|
'';
|
||||||
|
|
||||||
highlights = genAttrs (attrValues highlightOptions) (name: highlightOption);
|
highlights =
|
||||||
|
genAttrs
|
||||||
|
(attrValues highlightOptions)
|
||||||
|
(name: highlightOption);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = let
|
config = let
|
||||||
setupOptions = {
|
setupOptions = with cfg; {
|
||||||
options =
|
options =
|
||||||
{
|
{
|
||||||
inherit
|
inherit
|
||||||
(cfg)
|
|
||||||
mode
|
mode
|
||||||
themable
|
themable
|
||||||
numbers
|
numbers
|
||||||
;
|
;
|
||||||
buffer_close_icon = cfg.bufferCloseIcon;
|
buffer_close_icon = bufferCloseIcon;
|
||||||
modified_icon = cfg.modifiedIcon;
|
modified_icon = modifiedIcon;
|
||||||
close_icon = cfg.closeIcon;
|
close_icon = closeIcon;
|
||||||
close_command = cfg.closeCommand;
|
close_command = closeCommand;
|
||||||
left_mouse_command = cfg.leftMouseCommand;
|
left_mouse_command = leftMouseCommand;
|
||||||
right_mouse_command = cfg.rightMouseCommand;
|
right_mouse_command = rightMouseCommand;
|
||||||
middle_mouse_command = cfg.middleMouseCommand;
|
middle_mouse_command = middleMouseCommand;
|
||||||
inherit (cfg) indicator;
|
inherit indicator;
|
||||||
left_trunc_marker = cfg.leftTruncMarker;
|
left_trunc_marker = leftTruncMarker;
|
||||||
right_trunc_marker = cfg.rightTruncMarker;
|
right_trunc_marker = rightTruncMarker;
|
||||||
separator_style = cfg.separatorStyle;
|
separator_style = separatorStyle;
|
||||||
name_formatter =
|
name_formatter =
|
||||||
helpers.ifNonNull' cfg.nameFormatter
|
helpers.ifNonNull' nameFormatter
|
||||||
(helpers.mkRaw cfg.nameFormatter);
|
(helpers.mkRaw nameFormatter);
|
||||||
truncate_names = cfg.truncateNames;
|
truncate_names = truncateNames;
|
||||||
tab_size = cfg.tabSize;
|
tab_size = tabSize;
|
||||||
max_name_length = cfg.maxNameLength;
|
max_name_length = maxNameLength;
|
||||||
color_icons = cfg.colorIcons;
|
color_icons = colorIcons;
|
||||||
show_buffer_icons = cfg.showBufferIcons;
|
show_buffer_icons = showBufferIcons;
|
||||||
show_buffer_close_icons = cfg.showBufferCloseIcons;
|
show_buffer_close_icons = showBufferCloseIcons;
|
||||||
get_element_icon =
|
get_element_icon =
|
||||||
helpers.ifNonNull' cfg.getElementIcon
|
helpers.ifNonNull' getElementIcon
|
||||||
(helpers.mkRaw cfg.getElementIcon);
|
(helpers.mkRaw getElementIcon);
|
||||||
show_close_icon = cfg.showCloseIcon;
|
show_close_icon = showCloseIcon;
|
||||||
show_tab_indicators = cfg.showTabIndicators;
|
show_tab_indicators = showTabIndicators;
|
||||||
show_duplicate_prefix = cfg.showDuplicatePrefix;
|
show_duplicate_prefix = showDuplicatePrefix;
|
||||||
enforce_regular_tabs = cfg.enforceRegularTabs;
|
enforce_regular_tabs = enforceRegularTabs;
|
||||||
always_show_bufferline = cfg.alwaysShowBufferline;
|
always_show_bufferline = alwaysShowBufferline;
|
||||||
persist_buffer_sort = cfg.persistBufferSort;
|
persist_buffer_sort = persistBufferSort;
|
||||||
max_prefix_length = cfg.maxPrefixLength;
|
max_prefix_length = maxPrefixLength;
|
||||||
sort_by = cfg.sortBy;
|
sort_by = sortBy;
|
||||||
inherit (cfg) diagnostics;
|
inherit diagnostics;
|
||||||
diagnostics_indicator =
|
diagnostics_indicator =
|
||||||
helpers.ifNonNull' cfg.diagnosticsIndicator
|
helpers.ifNonNull' diagnosticsIndicator
|
||||||
(helpers.mkRaw cfg.diagnosticsIndicator);
|
(helpers.mkRaw diagnosticsIndicator);
|
||||||
diagnostics_update_in_insert = cfg.diagnosticsUpdateInInsert;
|
diagnostics_update_in_insert = diagnosticsUpdateInInsert;
|
||||||
inherit (cfg) offsets;
|
inherit offsets;
|
||||||
groups = helpers.ifNonNull' cfg.groups {
|
groups = helpers.ifNonNull' groups {
|
||||||
inherit (cfg.groups) items;
|
inherit (groups) items;
|
||||||
options = helpers.ifNonNull' cfg.groups.options {
|
options = helpers.ifNonNull' groups.options {
|
||||||
toggle_hidden_on_enter = cfg.groups.options.toggleHiddenOnEnter;
|
toggle_hidden_on_enter = groups.options.toggleHiddenOnEnter;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
inherit (cfg) hover;
|
inherit hover;
|
||||||
inherit (cfg) debug;
|
inherit debug;
|
||||||
custom_filter =
|
custom_filter =
|
||||||
helpers.ifNonNull' cfg.customFilter
|
helpers.ifNonNull' customFilter
|
||||||
(helpers.mkRaw cfg.customFilter);
|
(helpers.mkRaw customFilter);
|
||||||
}
|
}
|
||||||
// cfg.extraOptions;
|
// cfg.extraOptions;
|
||||||
|
|
||||||
highlights =
|
highlights =
|
||||||
mapAttrs (
|
mapAttrs
|
||||||
|
(
|
||||||
pluginOptionName: nixvimOptionName: {
|
pluginOptionName: nixvimOptionName: {
|
||||||
inherit
|
inherit
|
||||||
(cfg.highlights.${nixvimOptionName})
|
(cfg.highlights.${nixvimOptionName})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue