mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-11-09 15:05:30 +00:00
assistant/avante-nvim: init module
Avante.nvim AI Assistant
This commit is contained in:
parent
d3a0e7029a
commit
dd29532dd1
7 changed files with 85 additions and 0 deletions
|
|
@ -248,6 +248,7 @@ isMaximal: {
|
|||
cmp.enable = isMaximal;
|
||||
};
|
||||
codecompanion-nvim.enable = false;
|
||||
avante-nvim.enable = true;
|
||||
};
|
||||
|
||||
session = {
|
||||
|
|
|
|||
|
|
@ -407,3 +407,8 @@
|
|||
- Add [img-clip.nvim] plugin in `vim.utility.images.img-clip` with `enable` and
|
||||
`setupOpts`
|
||||
- Add `vim.utility.images.img-clip.enable = isMaximal` in configuration.nix
|
||||
|
||||
[Munsio](https://github.com/munsio):
|
||||
|
||||
- Add [avante.nvim](https://github.com/yetone/avante.nvim) plugin another AI
|
||||
Assistant.
|
||||
|
|
|
|||
25
modules/plugins/assistant/avante/avante-nvim.nix
Normal file
25
modules/plugins/assistant/avante/avante-nvim.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{lib, ...}: let
|
||||
inherit (lib.options) mkOption mkEnableOption;
|
||||
inherit (lib.types) str nullOr;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption luaInline;
|
||||
in {
|
||||
options.vim.assistant = {
|
||||
avante-nvim = {
|
||||
enable = mkEnableOption "complementary neovim plugin for avante.nvim";
|
||||
|
||||
setupOpts = mkPluginSetupOption "avante-nvim" {
|
||||
provider = mkOption {
|
||||
type = nullOr str;
|
||||
default = null;
|
||||
description = "Provider used for Chat.";
|
||||
};
|
||||
|
||||
vendors = mkOption {
|
||||
type = nullOr luaInline;
|
||||
default = null;
|
||||
description = "A provider is what connects Neovim to an LLM.";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
34
modules/plugins/assistant/avante/config.nix
Normal file
34
modules/plugins/assistant/avante/config.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
|
||||
cfg = config.vim.assistant.avante-nvim;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
vim = {
|
||||
startPlugins = [
|
||||
"dressing-nvim"
|
||||
"nui-nvim"
|
||||
"plenary-nvim"
|
||||
];
|
||||
|
||||
lazy.plugins = {
|
||||
avante-nvim = {
|
||||
package = "avante-nvim";
|
||||
setupModule = "avante";
|
||||
inherit (cfg) setupOpts;
|
||||
};
|
||||
};
|
||||
|
||||
treesitter.enable = true;
|
||||
|
||||
autocomplete.nvim-cmp = {
|
||||
sources = {avante-nvim = "[avante]";};
|
||||
sourcePlugins = ["avante-nvim"];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
6
modules/plugins/assistant/avante/default.nix
Normal file
6
modules/plugins/assistant/avante/default.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./config.nix
|
||||
./avante-nvim.nix
|
||||
];
|
||||
}
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./avante
|
||||
./chatgpt
|
||||
./copilot
|
||||
./codecompanion
|
||||
|
|
|
|||
|
|
@ -26,6 +26,19 @@
|
|||
"url": "https://github.com/goolord/alpha-nvim/archive/de72250e054e5e691b9736ee30db72c65d560771.tar.gz",
|
||||
"hash": "0c1jkhxamfn2md7m1r5b2wpxa26y90b98yzjwf68m3fymalvkn5h"
|
||||
},
|
||||
"avante-nvim": {
|
||||
"type": "Git",
|
||||
"repository": {
|
||||
"type": "GitHub",
|
||||
"owner": "yetone",
|
||||
"repo": "avante.nvim"
|
||||
},
|
||||
"branch": "main",
|
||||
"submodules": false,
|
||||
"revision": "e98bb8d3bae102662c5ad4ada1ce63a9aacac4e0",
|
||||
"url": "https://github.com/yetone/avante.nvim/archive/e98bb8d3bae102662c5ad4ada1ce63a9aacac4e0.tar.gz",
|
||||
"hash": "1x1xs80bmh3w0xnpjanwl8qwqz0lm7d2cmsvgd1p4jki1shllb8y"
|
||||
},
|
||||
"base16": {
|
||||
"type": "Git",
|
||||
"repository": {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue