dotfiles/modules/programs/nvim/new_plugins/avante.nix

38 lines
1.0 KiB
Nix
Raw Normal View History

{ config, lib, pkgs, inputs, ... }:
let
inherit (lib) mkEnableOption mkIf readFile;
in
{
home-manager.users.moritz.programs.nixvim = {
2024-10-08 09:42:32 +02:00
extraPlugins = with pkgs.vimPlugins; [
nui-nvim
render-markdown-nvim
avante-nvim
];
extraConfigLuaPost = ''
2024-10-08 09:42:32 +02:00
require("render-markdown").setup({ file_types = {"markdown", "Avante"} })
require("avante_lib").load()
require("avante").setup({
provider = "openai",
auto_suggestions_provider = "openai",
2024-10-08 09:42:32 +02:00
behaviour = {
auto_suggestions = true,
},
openai = {
2024-10-08 09:42:32 +02:00
model = "gpt-4o",
api_key_name = "cmd:cat /run/agenix/openai"
}
})
'';
2024-10-08 09:42:32 +02:00
# plugins.copilot-lua.enable = true;
# plugins.copilot-lua.suggestion.enabled = false;
# plugins.copilot-lua.panel.enabled = false;
plugins.dressing.enable = true;
2024-10-08 09:42:32 +02:00
# performance.combinePlugins.standalonePlugins = [ "copilot.lua" ];
};
age.secrets."openai".file = ../../../../secrets/openai.age;
age.secrets."openai".owner = "moritz";
}