nixvim: add copilot stuff
This commit is contained in:
parent
b2a6740256
commit
069a65d4c7
1 changed files with 37 additions and 1 deletions
|
@ -24,7 +24,7 @@
|
|||
|
||||
extraPlugins = [
|
||||
(pkgs.vimUtils.buildVimPlugin {
|
||||
name = "gitub-theme";
|
||||
name = "github-theme";
|
||||
src = inputs.nvim-github-theme;
|
||||
})
|
||||
];
|
||||
|
@ -71,6 +71,35 @@
|
|||
key = "<C-e>";
|
||||
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 = {
|
||||
|
@ -197,6 +226,13 @@
|
|||
settings.current_line_blame = true;
|
||||
};
|
||||
|
||||
plugins.copilot-chat = {
|
||||
enable = true;
|
||||
settings = {
|
||||
model = "claude-3.5-sonnet";
|
||||
};
|
||||
};
|
||||
|
||||
plugins.cmp-buffer.enable = true;
|
||||
plugins.cmp-emoji.enable = true;
|
||||
plugins.cmp-nvim-lsp.enable = true;
|
||||
|
|
Loading…
Add table
Reference in a new issue