File tree Expand file tree Collapse file tree 3 files changed +29
-1
lines changed
layers/+web-services/github-copilot Expand file tree Collapse file tree 3 files changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,11 @@ be necessary to add the new binding manually. Details for this can be found [[ht
49
49
50
50
For the chat interface a separate login procedure will be necessary once a chat is started.
51
51
52
+ To enable automatic generation of git commit messages using
53
+ copilot-chat, set the layer variable
54
+ =github-copilot-enable-commit-messages= to t. Alternatively, you can
55
+ invoke =SPC SPC copilot-chat-insert-commit-message= manually.
56
+
52
57
* Key bindings
53
58
** General
54
59
Original file line number Diff line number Diff line change
1
+ ; ;; config.el --- github-copilot layer configuration file for Spacemacs -*- lexical-binding : t ; -*-
2
+
3
+ ; ; Copyright (C) 2025 Aaron Zeng
4
+
5
+ ; ; Author: Aaron Zeng <[email protected] >
6
+
7
+ ; ; This program is free software; you can redistribute it and/or modify
8
+ ; ; it under the terms of the GNU General Public License as published by
9
+ ; ; the Free Software Foundation, either version 3 of the License, or
10
+ ; ; (at your option) any later version.
11
+
12
+ ; ; This program is distributed in the hope that it will be useful,
13
+ ; ; but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ ; ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ ; ; GNU General Public License for more details.
16
+
17
+ ; ; You should have received a copy of the GNU General Public License
18
+ ; ; along with this program. If not, see <https://www.gnu.org/licenses/>.
19
+
20
+ (defvar github-copilot-enable-commit-messages nil
21
+ " If non-nil, automatically generate commit messages (for magit) using Copilot." )
Original file line number Diff line number Diff line change 42
42
(defun github-copilot/init-copilot-chat ()
43
43
" Initialize the `copilot-chat' package and set up keybindings."
44
44
(use-package copilot-chat
45
- :hook (git-commit-setup . copilot-chat-insert-commit-message)
46
45
:defer t
47
46
:init
48
47
; ; Provide our transient state in the AI menu
49
48
(spacemacs/declare-prefix " $" " AI" )
50
49
(spacemacs/set-leader-keys " $c" 'copilot-chat-transient )
50
+ (when github-copilot-enable-commit-messages
51
+ (add-hook 'git-commit-setup-hook
52
+ #'copilot-chat-insert-commit-message ))
51
53
:config
52
54
; ; Make sure that standard ,, works as confirm in the chat window
53
55
(evil-define-key 'normal copilot-chat-prompt-mode-map " ,," #'copilot-chat-prompt-send )
You can’t perform that action at this time.
0 commit comments