2024-09-15 15:31:39 +02:00
|
|
|
{ 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
|
2024-09-15 15:31:39 +02:00
|
|
|
];
|
|
|
|
extraConfigLuaPost = ''
|
2024-10-08 09:42:32 +02:00
|
|
|
require("render-markdown").setup({ file_types = {"markdown", "Avante"} })
|
|
|
|
|
|
|
|
require("avante_lib").load()
|
2024-09-15 15:31:39 +02:00
|
|
|
require("avante").setup({
|
|
|
|
provider = "openai",
|
|
|
|
auto_suggestions_provider = "openai",
|
2024-10-08 09:42:32 +02:00
|
|
|
behaviour = {
|
2024-10-11 11:41:19 +02:00
|
|
|
-- auto_suggestions = true,
|
2024-10-08 09:42:32 +02:00
|
|
|
},
|
2024-09-15 15:31:39 +02:00
|
|
|
openai = {
|
2024-10-08 09:42:32 +02:00
|
|
|
model = "gpt-4o",
|
2024-09-15 15:31:39 +02:00
|
|
|
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;
|
2024-09-15 15:31:39 +02:00
|
|
|
plugins.dressing.enable = true;
|
2024-10-08 09:42:32 +02:00
|
|
|
# performance.combinePlugins.standalonePlugins = [ "copilot.lua" ];
|
2024-09-15 15:31:39 +02:00
|
|
|
};
|
|
|
|
age.secrets."openai".file = ../../../../secrets/openai.age;
|
|
|
|
age.secrets."openai".owner = "moritz";
|
|
|
|
}
|