diff --git a/config/default.nix b/config/default.nix index ec98d73..bfa3dc7 100644 --- a/config/default.nix +++ b/config/default.nix @@ -24,6 +24,7 @@ _: { ./plugins/editor/illuminate.nix ./plugins/editor/indent-blankline.nix ./plugins/editor/todo-comments.nix + ./plugins/editor/copilot-chat.nix # UI plugins ./plugins/ui/bufferline.nix diff --git a/config/plugins/editor/copilot-chat.nix b/config/plugins/editor/copilot-chat.nix new file mode 100644 index 0000000..ca3d118 --- /dev/null +++ b/config/plugins/editor/copilot-chat.nix @@ -0,0 +1,38 @@ +_: { + plugins.copilot-chat = { + enable = true; + }; + + keymaps = [ + { + key = "ct"; + action = "CopilotChatToggle"; + options.desc = "Toggle Copilot Chat Window"; + } + { + key = "cs"; + action = "CopilotChatStop"; + options.desc = "Stop current Copilot output"; + } + { + key = "cr"; + action = "CopilotChatReview"; + options.desc = "Review the selected code"; + } + { + key = "ce"; + action = "CopilotChatExplain"; + options.desc = "Give an explanation for the selected code"; + } + { + key = "cd"; + action = "CopilotChatDocs"; + options.desc = "Add documentation for the selection"; + } + { + key = "cp"; + action = "CopilotChatTests"; + options.desc = "Add tests for my code"; + } + ]; +} diff --git a/flake.lock b/flake.lock index 30b77c3..2f39de2 100644 --- a/flake.lock +++ b/flake.lock @@ -73,11 +73,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1715865404, - "narHash": "sha256-/GJvTdTpuDjNn84j82cU6bXztE0MSkdnTWClUCRub78=", + "lastModified": 1717285511, + "narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "8dc45382d5206bd292f9c2768b8058a8fd8311d9", + "rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8", "type": "github" }, "original": { @@ -270,14 +270,14 @@ }, "nixpkgs-lib": { "locked": { - "lastModified": 1714640452, - "narHash": "sha256-QBx10+k6JWz6u7VsohfSw8g8hjdBZEf8CFzXH1/1Z94=", + "lastModified": 1717284937, + "narHash": "sha256-lIbdfCsf8LMFloheeE6N31+BMIeixqyQWbSr2vk79EQ=", "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/50eb7ecf4cd0a5756d7275c8ba36790e5bd53e33.tar.gz" + "url": "https://github.com/NixOS/nixpkgs/archive/eb9ceca17df2ea50a250b6b27f7bf6ab0186f198.tar.gz" }, "original": { "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/50eb7ecf4cd0a5756d7275c8ba36790e5bd53e33.tar.gz" + "url": "https://github.com/NixOS/nixpkgs/archive/eb9ceca17df2ea50a250b6b27f7bf6ab0186f198.tar.gz" } }, "nixpkgs-stable": { @@ -311,11 +311,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1717097562, - "narHash": "sha256-4thrq0yjTmGEXH/EjteE/UoYjKZzuxWfULZEIRpfP08=", + "lastModified": 1717274692, + "narHash": "sha256-CnMCPxY9GfBAONN3BoWmPc36QV5Sv9uZFKH9VkE5KJI=", "owner": "nix-community", "repo": "nixvim", - "rev": "25338942a7ee8d641c8d56ba3726a1cb114580ea", + "rev": "e58380adcddc450eb08c37760a3f282077386d19", "type": "github" }, "original": {