mirror of
https://github.com/nix-community/nixvim.git
synced 2025-11-08 19:46:06 +01:00
parent
138a387afb
commit
e87e4b1812
2 changed files with 204 additions and 0 deletions
35
plugins/by-name/sidekick/default.nix
Normal file
35
plugins/by-name/sidekick/default.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
options,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
|
name = "sidekick";
|
||||||
|
package = "sidekick-nvim";
|
||||||
|
|
||||||
|
maintainers = [ lib.maintainers.khaneliman ];
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
"claude-code"
|
||||||
|
"copilot"
|
||||||
|
"gemini"
|
||||||
|
"opencode"
|
||||||
|
];
|
||||||
|
|
||||||
|
extraConfig = {
|
||||||
|
assertions = lib.nixvim.mkAssertions "plugins.sidekick" {
|
||||||
|
assertion = config.plugins.copilot-lua.enable || config.lsp.servers.copilot.enable;
|
||||||
|
message = "sidekick requires either copilot-lua (${options.plugins.copilot-lua.enable}) or copilot LSP (${options.lsp.servers}.copilot.enable) to be enabled";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
settingsExample = {
|
||||||
|
cli = {
|
||||||
|
mux = {
|
||||||
|
backend = "zellij";
|
||||||
|
enabled = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
169
tests/test-sources/plugins/by-name/sidekick/default.nix
Normal file
169
tests/test-sources/plugins/by-name/sidekick/default.nix
Normal file
|
|
@ -0,0 +1,169 @@
|
||||||
|
{
|
||||||
|
empty = {
|
||||||
|
plugins.copilot-lua.enable = true;
|
||||||
|
plugins.sidekick.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
defaults = {
|
||||||
|
plugins.copilot-lua.enable = true;
|
||||||
|
plugins.sidekick = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
jump = {
|
||||||
|
jumplist = true;
|
||||||
|
};
|
||||||
|
signs = {
|
||||||
|
enabled = true;
|
||||||
|
icon = " ";
|
||||||
|
};
|
||||||
|
nes = {
|
||||||
|
enabled.__raw = ''
|
||||||
|
function(buf)
|
||||||
|
return vim.g.sidekick_nes ~= false and vim.b.sidekick_nes ~= false
|
||||||
|
end'';
|
||||||
|
debounce = 100;
|
||||||
|
trigger = {
|
||||||
|
events = [
|
||||||
|
"InsertLeave"
|
||||||
|
"TextChanged"
|
||||||
|
"User SidekickNesDone"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
clear = {
|
||||||
|
events = [
|
||||||
|
"TextChangedI"
|
||||||
|
"BufWritePre"
|
||||||
|
"InsertEnter"
|
||||||
|
];
|
||||||
|
esc = true;
|
||||||
|
};
|
||||||
|
diff = {
|
||||||
|
inline = "words";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
cli = {
|
||||||
|
watch = true;
|
||||||
|
win = {
|
||||||
|
wo = { };
|
||||||
|
bo = { };
|
||||||
|
width = 80;
|
||||||
|
height = 20;
|
||||||
|
layout = "vertical";
|
||||||
|
position = "right";
|
||||||
|
keys = {
|
||||||
|
stopinsert = [
|
||||||
|
"<esc><esc>"
|
||||||
|
"stopinsert"
|
||||||
|
{ mode = "t"; }
|
||||||
|
];
|
||||||
|
hide_n = [
|
||||||
|
"q"
|
||||||
|
"hide"
|
||||||
|
{ mode = "n"; }
|
||||||
|
];
|
||||||
|
hide_t = [
|
||||||
|
"<c-q>"
|
||||||
|
"hide"
|
||||||
|
];
|
||||||
|
win_p = [
|
||||||
|
"<c-w>p"
|
||||||
|
"blur"
|
||||||
|
];
|
||||||
|
blur = [
|
||||||
|
"<c-o>"
|
||||||
|
"blur"
|
||||||
|
];
|
||||||
|
prompt = [
|
||||||
|
"<c-p>"
|
||||||
|
"prompt"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
mux = {
|
||||||
|
backend = "zellij";
|
||||||
|
enabled = false;
|
||||||
|
};
|
||||||
|
tools = {
|
||||||
|
aider = {
|
||||||
|
cmd = [ "aider" ];
|
||||||
|
url = "https://github.com/Aider-AI/aider";
|
||||||
|
};
|
||||||
|
amazon_q = {
|
||||||
|
cmd = [ "q" ];
|
||||||
|
url = "https://github.com/aws/amazon-q-developer-cli";
|
||||||
|
};
|
||||||
|
claude = {
|
||||||
|
cmd = [ "claude" ];
|
||||||
|
url = "https://github.com/anthropics/claude-code";
|
||||||
|
};
|
||||||
|
codex = {
|
||||||
|
cmd = [
|
||||||
|
"codex"
|
||||||
|
"--search"
|
||||||
|
];
|
||||||
|
url = "https://github.com/openai/codex";
|
||||||
|
};
|
||||||
|
copilot = {
|
||||||
|
cmd = [
|
||||||
|
"copilot"
|
||||||
|
"--banner"
|
||||||
|
];
|
||||||
|
url = "https://github.com/github/copilot-cli";
|
||||||
|
};
|
||||||
|
cursor = {
|
||||||
|
cmd = [ "cursor-agent" ];
|
||||||
|
url = "https://cursor.com/cli";
|
||||||
|
};
|
||||||
|
gemini = {
|
||||||
|
cmd = [ "gemini" ];
|
||||||
|
url = "https://github.com/google-gemini/gemini-cli";
|
||||||
|
};
|
||||||
|
grok = {
|
||||||
|
cmd = [ "grok" ];
|
||||||
|
url = "https://github.com/superagent-ai/grok-cli";
|
||||||
|
};
|
||||||
|
opencode = {
|
||||||
|
cmd = [ "opencode" ];
|
||||||
|
url = "https://github.com/sst/opencode";
|
||||||
|
};
|
||||||
|
qwen = {
|
||||||
|
cmd = [ "qwen" ];
|
||||||
|
url = "https://github.com/QwenLM/qwen-code";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
prompts = {
|
||||||
|
explain = "Explain this code";
|
||||||
|
diagnostics = {
|
||||||
|
msg = "What do the diagnostics in this file mean?";
|
||||||
|
diagnostics = true;
|
||||||
|
};
|
||||||
|
diagnostics_all = {
|
||||||
|
msg = "Can you help me fix these issues?";
|
||||||
|
diagnostics = {
|
||||||
|
all = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
fix = {
|
||||||
|
msg = "Can you fix the issues in this code?";
|
||||||
|
diagnostics = true;
|
||||||
|
};
|
||||||
|
review = {
|
||||||
|
msg = "Can you review this code for any issues or improvements?";
|
||||||
|
diagnostics = true;
|
||||||
|
};
|
||||||
|
optimize = "How can this code be optimized?";
|
||||||
|
tests = "Can you write tests for this code?";
|
||||||
|
file = {
|
||||||
|
location = {
|
||||||
|
row = false;
|
||||||
|
col = false;
|
||||||
|
};
|
||||||
|
position = { };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
debug = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue