Use mkPluginSetupOption for plugin config

This commit is contained in:
Kalle Jepsen 2024-03-24 14:22:03 +01:00
commit 77436fd51c
2 changed files with 10 additions and 5 deletions

View file

@ -6,6 +6,7 @@
inherit (lib.modules) mkIf mkMerge;
inherit (lib.nvim.dag) entryAnywhere;
inherit (lib) addDescriptionsToMappings mkSetBinding;
inherit (lib.nvim.lua) toLuaObject;
cfg = config.vim.assistant.chatgpt;
@ -33,8 +34,7 @@ in {
"chatgpt"
];
luaConfigRC.chagpt = entryAnywhere ''
require("chatgpt").setup({
})
require("chatgpt").setup(${toLuaObject cfg.setupOpts})
'';
maps.normal = mkMerge [
(mkSetBinding mappings.chatGpt "<cmd>ChatGPT<CR>")