nix-community.nixvim/plugins/by-name/parrot/default.nix
osbm a41559f093
Some checks are pending
Publish every Git push to main to FlakeHub / flakehub-publish (push) Waiting to run
Publish every git push to Flakestry / publish-flake (push) Waiting to run
Documentation / Version info (push) Waiting to run
Documentation / Build (push) Blocked by required conditions
Documentation / Combine builds (push) Blocked by required conditions
Documentation / Deploy (push) Blocked by required conditions
treewide: add plugin descriptions
2025-06-24 06:10:11 +00:00

33 lines
922 B
Nix

{ lib, ... }:
lib.nixvim.plugins.mkNeovimPlugin {
name = "parrot";
packPathName = "parrot.nvim";
package = "parrot-nvim";
description = "A Neovim plugin for LLM text generation.";
maintainers = [ lib.maintainers.GaetanLepage ];
dependencies = [ "ripgrep" ];
settingsExample = lib.literalExpression ''
{
cmd_prefix = "Parrot";
providers = {
github = {
api_key.__raw = "os.getenv 'GITHUB_TOKEN'";
topic.model = "gpt-4o";
};
};
hooks = {
Ask.__raw = '''
function(parrot, params)
local template = "Please, answer to this question: {{command}}."
local model_obj = parrot.get_model("command")
parrot.logger.info("Asking model: " .. model_obj.name)
parrot.Prompt(params, parrot.ui.Target.popup, model_obj, "🤖 Ask ~ ", template)
end
''';
};
};
'';
}