mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-10-26 17:26:49 +00:00
modules/ui: switch to explicit lib calls
This commit is contained in:
parent
81b9a8a95c
commit
a7531186a8
25 changed files with 251 additions and 272 deletions
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
_: {
|
||||
{
|
||||
imports = [
|
||||
./borders.nix
|
||||
];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue