feat: add lazy loading to nvim
This commit is contained in:
parent
6ebfb3d109
commit
752dfc55e8
64 changed files with 68 additions and 1265 deletions
36
modules/programs/nvim/plugins/avante.nix
Normal file
36
modules/programs/nvim/plugins/avante.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
inherit (lib) mkIf;
|
||||
|
||||
cfg = config.my.ai;
|
||||
in
|
||||
{
|
||||
config = mkIf cfg.enable {
|
||||
home-manager.users.moritz.programs.nixvim.plugins = {
|
||||
render-markdown = {
|
||||
enable = true;
|
||||
settings.file_types = [ "markdown" "Avante" ];
|
||||
};
|
||||
nui.enable = true;
|
||||
dressing.enable = true;
|
||||
avante = {
|
||||
enable = true;
|
||||
settings = {
|
||||
provider = "openai";
|
||||
openai = {
|
||||
model = "gpt-4o";
|
||||
api_key_name = "cmd:cat /run/agenix/openai";
|
||||
};
|
||||
};
|
||||
lazyLoad.settings.event = [ "DeferredUIEnter" ];
|
||||
};
|
||||
};
|
||||
age.secrets = {
|
||||
"openai".file = ../../../../secrets/openai.age;
|
||||
"openai".owner = "moritz";
|
||||
anthropic.file = ../../../../secrets/anthropic.age;
|
||||
anthropic.owner = "moritz";
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue