modules/plugins: move plugins/ui to neovim/global/ui

This commit is contained in:
raf 2024-05-01 21:46:42 +03:00
parent f0f2c08e9f
commit 0e84e4ebed
No known key found for this signature in database
GPG key ID: 02D1DD3FA08B6B29
5 changed files with 22 additions and 21 deletions

View file

@ -10,6 +10,7 @@
# Contains configuration for core neovim features
# such as spellchecking, mappings, and the init script (init.vim).
neovim = map (p: ./neovim + "/${p}") [
"global"
"init"
"mappings"
];

View file

@ -0,0 +1,6 @@
{lib}: {
imports = lib.concatLists [
# Configuration options for Neovim UI
(lib.filesystem.listFilesRecursive ./ui)
];
}

View file

@ -4,6 +4,7 @@
...
}: let
inherit (lib.options) mkOption mkEnableOption;
inherit (lib.attrsets) mapAttrs;
inherit (lib.lists) optionals;
inherit (lib.types) enum;
@ -22,7 +23,6 @@ in {
'';
};
# TODO: make per-plugin borders configurable
plugins = let
mkPluginStyleOption = name: {
enable = mkEnableOption "borders for the ${name} plugin" // {default = cfg.enable;};
@ -33,7 +33,8 @@ in {
description = "The border style to use for the ${name} plugin";
};
};
in {
in
mapAttrs (_: mkPluginStyleOption) {
# despite not having it listed in example configuration, which-key does support the rounded type
# additionally, it supports a "shadow" type that is similar to none but is of higher contrast
which-key = mkPluginStyleOption "which-key";

View file

@ -1,5 +0,0 @@
{
imports = [
./borders.nix
];
}

View file

@ -1,12 +1,10 @@
{
imports = [
./noice
./modes
./notifications
./smartcolumn
./breadcumbs
./colorizer
./illuminate
./breadcrumbs
./borders
./noice
./notifications
./smartcolumn
];
}