2023-07-26 09:27:57 +02:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}: let
|
|
|
|
inherit (lib) mkOption mkEnableOption types;
|
|
|
|
|
|
|
|
cfg = config.vim.ui.borders;
|
|
|
|
|
|
|
|
defaultStyles = ["none" "single" "double" "rounded"];
|
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 {
|
|
|
|
type = types.enum defaultStyles;
|
|
|
|
default = "rounded";
|
|
|
|
description = ''
|
|
|
|
global border style to use
|
|
|
|
'';
|
2023-07-25 21:16:20 +02:00
|
|
|
};
|
2023-07-23 17:26:38 +02:00
|
|
|
|
|
|
|
# TODO: make per-plugin borders configurable
|
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 {
|
|
|
|
type = types.enum (defaultStyles ++ lib.optionals (name != "which-key") ["shadow"]);
|
|
|
|
default = cfg.globalStyle;
|
|
|
|
description = "border style to use for the ${name} plugin";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
in {
|
|
|
|
# despite not having it listed in example configuration, which-key does support the rounded type
|
|
|
|
# additionall, it supports a "shadow" type that is similar to none but is of higher contrast
|
|
|
|
which-key = mkPluginStyleOption "which-key";
|
|
|
|
lspsaga = mkPluginStyleOption "lspsaga";
|
|
|
|
nvim-cmp = mkPluginStyleOption "nvim-cmp";
|
|
|
|
lsp-signature = mkPluginStyleOption "lsp-signature";
|
2023-07-30 18:13:05 +02:00
|
|
|
code-action-menu = mkPluginStyleOption "code-actions-menu";
|
2023-07-26 09:27:57 +02:00
|
|
|
};
|
2023-07-23 17:26:38 +02:00
|
|
|
};
|
|
|
|
}
|