modules: start breaking down core modules; simplify tree structure

This commit is contained in:
raf 2024-02-17 04:02:15 +03:00
commit 370913e827
No known key found for this signature in database
GPG key ID: 02D1DD3FA08B6B29
242 changed files with 178 additions and 124 deletions

View file

@ -3,33 +3,43 @@
lib,
check ? true,
}: let
inherit (lib) mkDefault;
plugins = builtins.map (p: ./plugins + "/${p}") [
"completion"
"theme"
"statusline"
"tabline"
"filetree"
"visuals"
"lsp"
"treesitter"
"autopairs"
"snippets"
"git"
"minimap"
"dashboard"
"utility"
"rich-presence"
"notes"
"terminal"
"ui"
"assistant"
"session"
"comments"
"projects"
"languages"
"debugger"
];
core = builtins.map (p: ./core + "/${p}") [
"build"
"mappings"
"warnings"
];
modules = [
./completion
./theme
./core
./basic
./statusline
./tabline
./filetree
./visuals
./lsp
./treesitter
./autopairs
./snippets
./git
./minimap
./dashboard
./utility
./rich-presence
./notes
./terminal
./ui
./assistant
./session
./comments
./projects
./languages
./debugger
./neovim
];
pkgsModule = {config, ...}: {
@ -38,11 +48,11 @@
inherit check;
args = {
baseModules = modules;
pkgsPath = lib.mkDefault pkgs.path;
pkgs = lib.mkDefault pkgs;
pkgsPath = mkDefault pkgs.path;
pkgs = mkDefault pkgs;
};
};
};
};
in
modules ++ [pkgsModule]
[pkgsModule] ++ (lib.concatLists [core modules plugins])