treewide: don't import modules manually

Reduces maintenance burden.
This commit is contained in:
alfarel 2025-09-26 18:44:04 +00:00
commit ae1922f6da
No known key found for this signature in database
13 changed files with 27 additions and 34 deletions

View file

@ -1,6 +1,7 @@
{
config,
lib,
options,
...
}: let
inherit (lib.modules) mkIf mkMerge;
@ -10,8 +11,7 @@
cfg = config.vim.assistant.chatgpt;
self = import ./chatgpt.nix {inherit lib;};
mappingDefinitions = self.options.vim.assistant.chatgpt.mappings;
mappingDefinitions = options.vim.assistant.chatgpt.mappings;
mappings = addDescriptionsToMappings cfg.mappings mappingDefinitions;
maps = mkMerge [
(mkSetBinding mappings.editWithInstructions "<cmd>ChatGPTEditWithInstruction<CR>")