nix-community.nixvim/tests/test-sources/plugins/by-name/copilot-chat/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

126 lines
3.8 KiB
Nix
Raw Normal View History

2024-06-01 00:56:14 +02:00
{
empty = {
plugins.copilot-chat.enable = true;
};
defaults = {
plugins.copilot-chat = {
enable = true;
2025-02-20 21:23:54 +01:00
# https://github.com/CopilotC-Nvim/CopilotChat.nvim/blob/main/lua/CopilotChat/config.lua
2024-06-01 00:56:14 +02:00
settings = {
2025-02-20 21:23:54 +01:00
system_prompt = "require('CopilotChat.config.prompts').COPILOT_INSTRUCTIONS";
model = "gpt-4-o";
agent = "none";
2024-06-01 00:56:14 +02:00
context = null;
2025-02-20 21:23:54 +01:00
sticky = null;
temperature = 0.1;
headless = false;
2024-06-01 00:56:14 +02:00
callback = null;
2025-02-20 21:23:54 +01:00
selection.__raw = ''
2024-06-01 00:56:14 +02:00
function(source)
local select = require('CopilotChat.select')
2025-02-20 21:23:54 +01:00
return select.visual(source) or select.buffer(source)
2024-06-01 00:56:14 +02:00
end
'';
window = {
layout = "vertical";
width = 0.5;
height = 0.5;
relative = "editor";
border = "single";
row = null;
col = null;
title = "Copilot Chat";
footer = null;
zindex = 1;
};
2025-02-20 21:23:54 +01:00
show_help = true;
show_folds = true;
highlight_selection = true;
highlight_headers = true;
auto_follow_cursor = true;
auto_insert_mode = false;
insert_at_end = false;
debug = false;
log_level = "info";
proxy = null;
allow_insecure = false;
chat_autocomplete = true;
log_path.__raw = "vim.fn.stdpath('state') .. '/CopilotChat.log'";
history_path.__raw = "vim.fn.stdpath('data') .. '/copilotchat_history'";
question_header = "## User ";
answer_header = "## Copilot ";
error_header = "## Error ";
separator = "";
2024-06-01 00:56:14 +02:00
};
};
};
example = {
plugins.copilot-chat = {
enable = true;
settings = {
question_header = "## User ";
answer_header = "## Copilot ";
error_header = "## Error ";
prompts = {
Explain = "Please explain how the following code works.";
Review = "Please review the following code and provide suggestions for improvement.";
Tests = "Please explain how the selected code works, then generate unit tests for it.";
Refactor = "Please refactor the following code to improve its clarity and readability.";
FixCode = "Please fix the following code to make it work as intended.";
FixError = "Please explain the error in the following text and provide a solution.";
BetterNamings = "Please provide better names for the following variables and functions.";
Documentation = "Please provide documentation for the following code.";
SwaggerApiDocs = "Please provide documentation for the following API using Swagger.";
SwaggerJsDocs = "Please write JSDoc for the following API using Swagger.";
Summarize = "Please summarize the following text.";
Spelling = "Please correct any grammar and spelling errors in the following text.";
Wording = "Please improve the grammar and wording of the following text.";
Concise = "Please rewrite the following text to make it more concise.";
};
auto_follow_cursor = false;
show_help = false;
mappings = {
complete = {
detail = "Use @<Tab> or /<Tab> for options.";
insert = "<Tab>";
};
close = {
normal = "q";
insert = "<C-c>";
};
reset = {
normal = "<C-x>";
insert = "<C-x>";
};
submit_prompt = {
normal = "<CR>";
insert = "<C-CR>";
};
accept_diff = {
normal = "<C-y>";
insert = "<C-y>";
};
yank_diff.normal = "gmy";
show_diff.normal = "gmd";
2024-12-06 11:20:06 +01:00
show_info.normal = "gmp";
show_context.normal = "gms";
2024-06-01 00:56:14 +02:00
};
};
};
};
}