mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2024-11-08 03:25:58 +01:00
Compare commits
2 commits
4b4a8039e5
...
a1785d546c
Author | SHA1 | Date | |
---|---|---|---|
|
a1785d546c | ||
38355d2dfe |
2 changed files with 14 additions and 117 deletions
|
@ -77,7 +77,8 @@ in rec {
|
||||||
else "[${toLuaObject n}] = " + (toLuaObject v))
|
else "[${toLuaObject n}] = " + (toLuaObject v))
|
||||||
(filterAttrs
|
(filterAttrs
|
||||||
(
|
(
|
||||||
_: v: (toLuaObject v != "{}")
|
_: v:
|
||||||
|
(v != null) && (toLuaObject v != "{}")
|
||||||
)
|
)
|
||||||
args)))
|
args)))
|
||||||
+ "}"
|
+ "}"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{lib, ...}: let
|
{lib, ...}: let
|
||||||
inherit (lib.options) mkOption mkEnableOption literalExpression;
|
inherit (lib.options) mkOption mkEnableOption literalExpression;
|
||||||
inherit (lib.types) enum bool either nullOr str int listOf;
|
inherit (lib.types) enum bool either nullOr str int;
|
||||||
inherit (lib.nvim.binds) mkMappingOption;
|
inherit (lib.nvim.binds) mkMappingOption;
|
||||||
inherit (lib.nvim.types) mkPluginSetupOption luaInline;
|
inherit (lib.nvim.types) mkPluginSetupOption luaInline;
|
||||||
in {
|
in {
|
||||||
|
@ -57,33 +57,27 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
right_mouse_command = mkOption {
|
right_mouse_command = mkOption {
|
||||||
type = nullOr (either str luaInline);
|
type = either str luaInline;
|
||||||
default = "vertical sbuffer %d";
|
default = lib.generators.mkLuaInline "vertical sbuffer %d";
|
||||||
description = "Command to run when right clicking a buffer";
|
description = "Command to run when right clicking a buffer";
|
||||||
};
|
};
|
||||||
|
|
||||||
middle_mouse_command = mkOption {
|
middle_mouse_command = mkOption {
|
||||||
type = nullOr (either str luaInline);
|
type = either str luaInline;
|
||||||
default = null;
|
default = null;
|
||||||
description = "Command to run when middle clicking a buffer";
|
description = "Command to run when middle clicking a buffer";
|
||||||
};
|
};
|
||||||
|
|
||||||
indicator = {
|
indicator = {
|
||||||
icon = mkOption {
|
icon = mkOption {
|
||||||
type = nullOr str;
|
type = str;
|
||||||
default = null;
|
default = "▎";
|
||||||
description = ''
|
description = "Enable icon for indicator";
|
||||||
The indicatotor icon to use for current buffer.
|
|
||||||
|
|
||||||
::: {.warning}
|
|
||||||
This **must** be ommitted while style is not `icon`
|
|
||||||
:::
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
style = mkOption {
|
style = mkOption {
|
||||||
type = enum ["icon" "underline" "none"];
|
type = enum ["icon" "underline" "none"];
|
||||||
default = "underline";
|
default = "icon";
|
||||||
description = "Style for indicator";
|
description = "Style for indicator";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -233,104 +227,6 @@ in {
|
||||||
default = true;
|
default = true;
|
||||||
description = "Whether or not to add filetype icon highlights";
|
description = "Whether or not to add filetype icon highlights";
|
||||||
};
|
};
|
||||||
|
|
||||||
show_buffer_icons = mkOption {
|
|
||||||
type = bool;
|
|
||||||
default = true;
|
|
||||||
description = "Whether or not to show buffer icons";
|
|
||||||
};
|
|
||||||
|
|
||||||
show_buffer_close_icons = mkOption {
|
|
||||||
type = bool;
|
|
||||||
default = true;
|
|
||||||
description = "Whether or not to show buffer close icons";
|
|
||||||
};
|
|
||||||
|
|
||||||
show_close_icon = mkOption {
|
|
||||||
type = bool;
|
|
||||||
default = true;
|
|
||||||
description = "Whether or not to show close icon";
|
|
||||||
};
|
|
||||||
|
|
||||||
show_tab_indicators = mkOption {
|
|
||||||
type = bool;
|
|
||||||
default = true;
|
|
||||||
description = "Whether or not to show tab indicators";
|
|
||||||
};
|
|
||||||
|
|
||||||
show_duplicate_prefix = mkOption {
|
|
||||||
type = bool;
|
|
||||||
default = true;
|
|
||||||
description = "Whether or not to show duplicate prefix";
|
|
||||||
};
|
|
||||||
|
|
||||||
duplicates_across_groups = mkOption {
|
|
||||||
type = bool;
|
|
||||||
default = true;
|
|
||||||
description = "Whether to consider duplicate paths in different groups as duplicates";
|
|
||||||
};
|
|
||||||
|
|
||||||
persist_buffer_sort = mkOption {
|
|
||||||
type = bool;
|
|
||||||
default = true;
|
|
||||||
description = "Whether or not custom sorted buffers should persist";
|
|
||||||
};
|
|
||||||
|
|
||||||
move_wraps_at_ends = mkOption {
|
|
||||||
type = bool;
|
|
||||||
default = false;
|
|
||||||
description = "Whether or not the move command \"wraps\" at the first or last position";
|
|
||||||
};
|
|
||||||
|
|
||||||
seperator_style = mkOption {
|
|
||||||
type = either (enum ["thick" "thin" "slope" "slant"]) (listOf str);
|
|
||||||
default = [" " " "];
|
|
||||||
description = ''
|
|
||||||
Style of the buffer separator.
|
|
||||||
|
|
||||||
Can be either one of the suspported values, or a list containing
|
|
||||||
**at most** two elements for `focused` and `unfocused` respectively.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
enforce_regular_tabs = mkOption {
|
|
||||||
type = bool;
|
|
||||||
default = false;
|
|
||||||
description = "Whether to enforce regular tabs";
|
|
||||||
};
|
|
||||||
|
|
||||||
always_show_bufferline = mkOption {
|
|
||||||
type = bool;
|
|
||||||
default = true;
|
|
||||||
description = "Whether to always show bufferline";
|
|
||||||
};
|
|
||||||
|
|
||||||
auto_toggle_bufferline = mkOption {
|
|
||||||
type = bool;
|
|
||||||
default = false;
|
|
||||||
description = "Whether to auto toggle bufferline";
|
|
||||||
};
|
|
||||||
|
|
||||||
hover = {
|
|
||||||
enabled = mkEnableOption "hover" // {default = true;};
|
|
||||||
delay = mkOption {
|
|
||||||
type = int;
|
|
||||||
default = 200;
|
|
||||||
description = "Delay for hover, in ms";
|
|
||||||
};
|
|
||||||
|
|
||||||
reveal = mkOption {
|
|
||||||
type = listOf str;
|
|
||||||
default = ["close"];
|
|
||||||
description = "Reveal hover window";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
sort_by = mkOption {
|
|
||||||
type = either (enum ["insert_after_current" "insert_at_end" "id" "extension" "relative_directory" "directory" "tabs"]) luaInline;
|
|
||||||
default = "extension";
|
|
||||||
description = "Method to sort buffers by. Must be one of the supported valuees, or an inline Lua value.";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue