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

34 lines
960 B
Nix
Raw Normal View History

{ config, lib, pkgs, inputs, ... }:
let
inherit (lib) mkEnableOption mkIf readFile;
in
{
home-manager.users.moritz.programs.nixvim = {
extraPlugins = [
(pkgs.vimUtils.buildVimPlugin {
pname = "avante.nvim";
src = inputs.avante-nvim;
version = lib.my.mkVersionInput inputs.avante-nvim;
})
pkgs.vimPlugins.nui-nvim
];
extraConfigLuaPost = ''
require("avante").setup({
provider = "openai",
auto_suggestions_provider = "openai",
openai = {
api_key_name = "cmd:cat /run/agenix/openai"
}
})
'';
plugins.copilot-lua.enable = true;
plugins.copilot-lua.suggestion.enabled = false;
plugins.copilot-lua.panel.enabled = false;
plugins.dressing.enable = true;
performance.combinePlugins.standalonePlugins = [ "copilot.lua" ];
};
age.secrets."openai".file = ../../../../secrets/openai.age;
age.secrets."openai".owner = "moritz";
}