nixvim!
This commit is contained in:
parent
1ae2d7cc6a
commit
6198767e5b
47 changed files with 2430 additions and 108 deletions
56
modules/editors/nixvim/plug/utils/copilot.nix
Normal file
56
modules/editors/nixvim/plug/utils/copilot.nix
Normal file
|
@ -0,0 +1,56 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
copilotChatRepo = {
|
||||
owner = "copilotc-nvim";
|
||||
repo = "CopilotChat.nvim";
|
||||
rev = "2771f1fa7af502ea4226a88a792f4e4319199906";
|
||||
hash = "sha256-Q+g81BQVQTY5J2c2ZWB7bjJLuNSdI0PAan+75YJ7mI0=";
|
||||
};
|
||||
in {
|
||||
extraPlugins = with pkgs.vimUtils; [
|
||||
(buildVimPlugin {
|
||||
pname = "copilotchat";
|
||||
version = "2.4.0";
|
||||
src = pkgs.fetchFromGitHub copilotChatRepo;
|
||||
meta = {
|
||||
description = "Chat with GitHub Copilot in Neovim";
|
||||
homepage = "https://github.com/CopilotC-Nvim/CopilotChat.nvim/";
|
||||
license = lib.licenses.gpl3;
|
||||
};
|
||||
})
|
||||
];
|
||||
extraConfigLua = ''
|
||||
require("CopilotChat").setup { }
|
||||
'';
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
mode = "x";
|
||||
key = "<leader>a";
|
||||
action = "+copilot";
|
||||
}
|
||||
{
|
||||
mode = "x";
|
||||
key = "<leader>ae";
|
||||
action = "<cmd>CopilotChatExplain<cr>";
|
||||
}
|
||||
{
|
||||
mode = "x";
|
||||
key = "<leader>af";
|
||||
action = "<cmd>CopilotChatFix<cr>";
|
||||
}
|
||||
{
|
||||
mode = "x";
|
||||
key = "<leader>ad";
|
||||
action = "<cmd>CopilotChatDocs<cr>";
|
||||
}
|
||||
{
|
||||
mode = "x";
|
||||
key = "<leader>ac";
|
||||
action = "<cmd>CopilotChatCommit<cr>";
|
||||
}
|
||||
];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue