2023-07-26 07:27:57 +00:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}: let
|
2024-03-16 13:25:30 +00:00
|
|
|
inherit (lib.options) mkOption mkEnableOption;
|
2024-09-13 16:34:21 +00:00
|
|
|
inherit (lib.nvim.types) borderType;
|
2023-07-26 07:27:57 +00:00
|
|
|
|
|
|
|
cfg = config.vim.ui.borders;
|
2023-07-23 15:26:38 +00:00
|
|
|
in {
|
|
|
|
options.vim.ui.borders = {
|
2023-07-26 07:27:57 +00:00
|
|
|
enable = mkEnableOption "visible borders for most windows";
|
|
|
|
|
|
|
|
globalStyle = mkOption {
|
2024-09-13 16:34:21 +00:00
|
|
|
type = borderType;
|
2023-07-26 07:27:57 +00:00
|
|
|
default = "rounded";
|
|
|
|
description = ''
|
2024-03-15 12:01:46 +00:00
|
|
|
The global border style to use.
|
2024-09-13 16:34:21 +00:00
|
|
|
|
|
|
|
If a list is given, it should have a length of eight or any divisor of
|
|
|
|
eight. The array will specify the eight chars building up the border in
|
|
|
|
a clockwise fashion starting with the top-left corner. You can specify
|
|
|
|
a different highlight group for each character by passing a
|
|
|
|
[char, "YourHighlightGroup"] instead
|
2023-07-26 07:27:57 +00:00
|
|
|
'';
|
2024-09-13 16:34:21 +00:00
|
|
|
example = ["╔" "═" "╗" "║" "╝" "═" "╚" "║"];
|
2023-07-25 19:16:20 +00:00
|
|
|
};
|
2023-07-23 15:26:38 +00:00
|
|
|
|
2023-07-26 07:27:57 +00:00
|
|
|
plugins = let
|
|
|
|
mkPluginStyleOption = name: {
|
2023-10-21 17:15:36 +00:00
|
|
|
enable = mkEnableOption "borders for the ${name} plugin" // {default = cfg.enable;};
|
2023-07-26 07:27:57 +00:00
|
|
|
|
|
|
|
style = mkOption {
|
2024-09-13 16:34:21 +00:00
|
|
|
type = borderType;
|
2023-07-26 07:27:57 +00:00
|
|
|
default = cfg.globalStyle;
|
2024-03-16 13:25:30 +00:00
|
|
|
description = "The border style to use for the ${name} plugin";
|
2023-07-26 07:27:57 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
in {
|
|
|
|
# despite not having it listed in example configuration, which-key does support the rounded type
|
2024-03-16 13:25:30 +00:00
|
|
|
# additionally, it supports a "shadow" type that is similar to none but is of higher contrast
|
2023-07-26 07:27:57 +00:00
|
|
|
which-key = mkPluginStyleOption "which-key";
|
|
|
|
lspsaga = mkPluginStyleOption "lspsaga";
|
|
|
|
nvim-cmp = mkPluginStyleOption "nvim-cmp";
|
|
|
|
lsp-signature = mkPluginStyleOption "lsp-signature";
|
2024-09-20 15:51:11 +00:00
|
|
|
fastaction = mkPluginStyleOption "fastaction";
|
2023-07-26 07:27:57 +00:00
|
|
|
};
|
2023-07-23 15:26:38 +00:00
|
|
|
};
|
|
|
|
}
|