mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2024-11-08 00:05:57 +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))
|
||||
(filterAttrs
|
||||
(
|
||||
_: v: (toLuaObject v != "{}")
|
||||
_: v:
|
||||
(v != null) && (toLuaObject v != "{}")
|
||||
)
|
||||
args)))
|
||||
+ "}"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{lib, ...}: let
|
||||
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.types) mkPluginSetupOption luaInline;
|
||||
in {
|
||||
|
@ -57,40 +57,34 @@ in {
|
|||
};
|
||||
|
||||
right_mouse_command = mkOption {
|
||||
type = nullOr (either str luaInline);
|
||||
default = "vertical sbuffer %d";
|
||||
type = either str luaInline;
|
||||
default = lib.generators.mkLuaInline "vertical sbuffer %d";
|
||||
description = "Command to run when right clicking a buffer";
|
||||
};
|
||||
|
||||
middle_mouse_command = mkOption {
|
||||
type = nullOr (either str luaInline);
|
||||
type = either str luaInline;
|
||||
default = null;
|
||||
description = "Command to run when middle clicking a buffer";
|
||||
};
|
||||
|
||||
indicator = {
|
||||
icon = mkOption {
|
||||
type = nullOr str;
|
||||
default = null;
|
||||
description = ''
|
||||
The indicatotor icon to use for current buffer.
|
||||
|
||||
::: {.warning}
|
||||
This **must** be ommitted while style is not `icon`
|
||||
:::
|
||||
'';
|
||||
type = str;
|
||||
default = "▎";
|
||||
description = "Enable icon for indicator";
|
||||
};
|
||||
|
||||
style = mkOption {
|
||||
type = enum ["icon" "underline" "none"];
|
||||
default = "underline";
|
||||
default = "icon";
|
||||
description = "Style for indicator";
|
||||
};
|
||||
};
|
||||
|
||||
buffer_close_icon = mkOption {
|
||||
type = str;
|
||||
default = " ";
|
||||
default = "";
|
||||
description = "Icon for close button";
|
||||
};
|
||||
|
||||
|
@ -102,7 +96,7 @@ in {
|
|||
|
||||
close_icon = mkOption {
|
||||
type = str;
|
||||
default = " ";
|
||||
default = "";
|
||||
description = "Icon for close button";
|
||||
};
|
||||
|
||||
|
@ -175,8 +169,8 @@ in {
|
|||
function(count, level, diagnostics_dict, context)
|
||||
local s = " "
|
||||
for e, n in pairs(diagnostics_dict) do
|
||||
local sym = e == "error" and " "
|
||||
or (e == "warning" and " " or " " )
|
||||
local sym = e == "error" and " "
|
||||
or (e == "warning" and " " or "" )
|
||||
s = s .. n .. sym
|
||||
end
|
||||
return s
|
||||
|
@ -233,104 +227,6 @@ in {
|
|||
default = true;
|
||||
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