modules/ui: switch to explicit lib calls

This commit is contained in:
raf 2024-03-16 16:25:30 +03:00
commit a7531186a8
No known key found for this signature in database
GPG key ID: 02D1DD3FA08B6B29
25 changed files with 251 additions and 272 deletions

View file

@ -3,7 +3,8 @@
lib,
...
}: let
inherit (lib) mkOption mkEnableOption types;
inherit (lib.options) mkOption mkEnableOption;
inherit (lib.types) enum;
cfg = config.vim.ui.borders;
@ -13,10 +14,10 @@ in {
enable = mkEnableOption "visible borders for most windows";
globalStyle = mkOption {
type = types.enum defaultStyles;
type = enum defaultStyles;
default = "rounded";
description = ''
global border style to use
The global border style to use
'';
};
@ -26,14 +27,14 @@ in {
enable = mkEnableOption "borders for the ${name} plugin" // {default = cfg.enable;};
style = mkOption {
type = types.enum (defaultStyles ++ lib.optionals (name != "which-key") ["shadow"]);
type = enum (defaultStyles ++ lib.optionals (name != "which-key") ["shadow"]);
default = cfg.globalStyle;
description = "border style to use for the ${name} plugin";
description = "The 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
# additionally, 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";

View file

@ -1,4 +1,4 @@
_: {
{
imports = [
./borders.nix
];