2023-07-26 09:27:57 +02:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}: let
|
2024-03-16 14:25:30 +01:00
|
|
|
inherit (lib.options) mkOption mkEnableOption;
|
2024-09-13 18:34:21 +02:00
|
|
|
inherit (lib.nvim.types) borderType;
|
2023-07-26 09:27:57 +02:00
|
|
|
|
|
|
|
cfg = config.vim.ui.borders;
|
2023-07-23 17:26:38 +02:00
|
|
|
in {
|
|
|
|
options.vim.ui.borders = {
|
2023-07-26 09:27:57 +02:00
|
|
|
enable = mkEnableOption "visible borders for most windows";
|
|
|
|
|
|
|
|
globalStyle = mkOption {
|
2024-09-13 18:34:21 +02:00
|
|
|
type = borderType;
|
2023-07-26 09:27:57 +02:00
|
|
|
default = "rounded";
|
|
|
|
description = ''
|
2024-03-15 13:01:46 +01:00
|
|
|
The global border style to use.
|
2024-09-13 18:34:21 +02: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 09:27:57 +02:00
|
|
|
'';
|
2024-09-13 18:34:21 +02:00
|
|
|
example = ["╔" "═" "╗" "║" "╝" "═" "╚" "║"];
|
2023-07-25 21:16:20 +02:00
|
|
|
};
|
2023-07-23 17:26:38 +02:00
|
|
|
|
2023-07-26 09:27:57 +02:00
|
|
|
plugins = let
|
|
|
|
mkPluginStyleOption = name: {
|
2023-10-21 19:15:36 +02:00
|
|
|
enable = mkEnableOption "borders for the ${name} plugin" // {default = cfg.enable;};
|
2023-07-26 09:27:57 +02:00
|
|
|
|
|
|
|
style = mkOption {
|
2024-09-13 18:34:21 +02:00
|
|
|
type = borderType;
|
2023-07-26 09:27:57 +02:00
|
|
|
default = cfg.globalStyle;
|
2024-03-16 14:25:30 +01:00
|
|
|
description = "The border style to use for the ${name} plugin";
|
2023-07-26 09:27:57 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
in {
|
|
|
|
# despite not having it listed in example configuration, which-key does support the rounded type
|
2024-03-16 14:25:30 +01:00
|
|
|
# additionally, it supports a "shadow" type that is similar to none but is of higher contrast
|
2023-07-26 09:27:57 +02:00
|
|
|
which-key = mkPluginStyleOption "which-key";
|
|
|
|
lspsaga = mkPluginStyleOption "lspsaga";
|
|
|
|
nvim-cmp = mkPluginStyleOption "nvim-cmp";
|
|
|
|
lsp-signature = mkPluginStyleOption "lsp-signature";
|
2024-09-20 17:51:11 +02:00
|
|
|
fastaction = mkPluginStyleOption "fastaction";
|
2023-07-26 09:27:57 +02:00
|
|
|
};
|
2023-07-23 17:26:38 +02:00
|
|
|
};
|
|
|
|
}
|