Skip to content

Commit

Permalink
[emacs] yap: add config and modline entry
Browse files Browse the repository at this point in the history
  • Loading branch information
meain committed Jul 12, 2024
1 parent b2d5861 commit 7c56c9c
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions emacs/.config/emacs/init.el
Original file line number Diff line number Diff line change
Expand Up @@ -4328,6 +4328,17 @@ Pass in `LISTITEMS to decide if you wanna create a new item or search for existi
(global-set-key (kbd "M-f i i") (lambda () (interactive) (gptel-send t)))
(global-set-key (kbd "M-f i r") (lambda () (interactive) (gptel-rewrite-menu))))

(use-package yap
:load-path "/Users/meain/dev/src/yap"
:config
(setq yap-api-key:openai openai-api-key)
(setq yap-respond-in-buffer nil)
(setq yap-show-diff-before-rewrite t)

(global-set-key (kbd "M-f y y") 'yap-prompt)
(global-set-key (kbd "M-f y r") 'yap-rewrite)
(global-set-key (kbd "M-f y w") 'yap-write))

;; Chatgpt shell
(use-package chatgpt-shell
:ensure t
Expand Down Expand Up @@ -4894,6 +4905,11 @@ not defined, it will be saved in the `$HOME' directory."
face
hima-simple-gray)
""))
'(:eval (mode-line-idle 1.0
'(:propertize (:eval (concat " [" yap-model "]"))
face
hima-simple-gray)
""))
'(:eval (if (boundp 'keycast-mode-line) keycast-mode-line))
'(:eval (if (boundp 'mode-line-format-right-align)
mode-line-format-right-align
Expand Down

0 comments on commit 7c56c9c

Please sign in to comment.