refactor(plugins/astrocore): move some settings out of plugin

This commit is contained in:
Nicolas Goudry 2024-06-07 22:51:48 +02:00
parent 2b6a512de0
commit 1677fceed9
No known key found for this signature in database
GPG key ID: 5FC434D9FFD1DF44
15 changed files with 720 additions and 778 deletions

View file

@ -2,11 +2,9 @@
{ helpers, icons, lib, pkgs, ... }:
let
autocmds = import ./autocmds.nix;
diagnostics = import ./diagnostics.nix { inherit icons; };
features = import ./features.nix;
mappings = import ./mappings.nix;
options = import ./options.nix { inherit lib; };
options = import ./options.nix;
rooter = import ./rooter.nix;
sessions = import ./sessions.nix;
in
@ -20,7 +18,7 @@ in
require("astrocore").setup({
diagnostics = ${helpers.toLuaObject diagnostics},
features = ${helpers.toLuaObject features},
options = ${helpers.toLuaObject options.astrocore},
options = ${helpers.toLuaObject options},
rooter = ${helpers.toLuaObject rooter},
sessions = ${helpers.toLuaObject sessions},
on_keys = {
@ -36,12 +34,4 @@ in
})
'';
};
rootOpts = {
inherit (autocmds) autoGroups autoCmd;
inherit (mappings) keymaps;
inherit (options) opts;
plugins.which-key.registrations = mappings.mapSections;
};
}