nixvim: add copilot stuff

This commit is contained in:
cy 2025-01-29 16:23:33 -05:00
parent b2a6740256
commit 069a65d4c7
Signed by: cy
SSH key fingerprint: SHA256:o/geVWV4om1QhUSkKvDQeW/eAihwnjyXkqMwrVdbuts

View file

@ -24,7 +24,7 @@
extraPlugins = [ extraPlugins = [
(pkgs.vimUtils.buildVimPlugin { (pkgs.vimUtils.buildVimPlugin {
name = "gitub-theme"; name = "github-theme";
src = inputs.nvim-github-theme; src = inputs.nvim-github-theme;
}) })
]; ];
@ -71,6 +71,35 @@
key = "<C-e>"; key = "<C-e>";
mode = "i"; mode = "i";
} }
# quick chat with copilot
{
key = "<leader>ccq";
action.__raw = ''
function()
local input = vim.fn.input("Quick chat: ")
if input ~= "" then
require("CopilotChat").ask(input, { selection = require("CopilotChat.select").buffer })
end
end
'';
mode = [ "n" "v" ];
}
# ask perplexity a quick question
{
key = "<leader>ccs";
action.__raw = ''
function()
local input = vim.fn.input("Perplexity: ")
if input ~= "" then
require("CopilotChat").ask(input, {
agent = "perplexityai",
selection = false,
})
end
end
'';
mode = [ "n" "v" ];
}
]; ];
plugins.cmp = { plugins.cmp = {
@ -197,6 +226,13 @@
settings.current_line_blame = true; settings.current_line_blame = true;
}; };
plugins.copilot-chat = {
enable = true;
settings = {
model = "claude-3.5-sonnet";
};
};
plugins.cmp-buffer.enable = true; plugins.cmp-buffer.enable = true;
plugins.cmp-emoji.enable = true; plugins.cmp-emoji.enable = true;
plugins.cmp-nvim-lsp.enable = true; plugins.cmp-nvim-lsp.enable = true;