Emacs: Switch to claude
This commit is contained in:
parent
0d00ca98d1
commit
c372a404e2
@ -1178,7 +1178,7 @@ Ace Window will show a hint if there are more than 2 windows, but I don't really
|
|||||||
(interactive)
|
(interactive)
|
||||||
(let ((curr (current-buffer)))
|
(let ((curr (current-buffer)))
|
||||||
(mode-line-other-buffer)
|
(mode-line-other-buffer)
|
||||||
(beframe-unassume-current-frame-buffers-selectively '(curr))))
|
(beframe-unassume-current-frame-buffers-selectively (list curr))))
|
||||||
(evil-global-set-key 'normal (kbd "SPC b f") #'joe/beframe-switch-and-unassume)
|
(evil-global-set-key 'normal (kbd "SPC b f") #'joe/beframe-switch-and-unassume)
|
||||||
|
|
||||||
#+end_src
|
#+end_src
|
||||||
@ -1687,13 +1687,21 @@ Stuff to immediately switch to Jetbrains for debugging
|
|||||||
(require 'embark)
|
(require 'embark)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
Add a beframe keybinding to unassume a buffer with embark
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(define-key embark-buffer-map (kbd "b") #'beframe-unassume-current-frame-buffers-selectively)
|
||||||
|
#+end_src
|
||||||
|
|
||||||
These two lines allow you to kill buffers without a confirmation and without
|
These two lines allow you to kill buffers without a confirmation and without
|
||||||
closing the mini-buffer so you can quickly kill multiple buffers if needed. The
|
closing the mini-buffer so you can quickly kill multiple buffers if needed. The
|
||||||
odd looking ~'(t .t)~ is for specifying a default for all other actions.
|
odd looking ~'(t .t)~ is for specifying a default for all other actions.
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(setq embark-quit-after-action '((t . t)
|
(setq embark-quit-after-action '((t . t)
|
||||||
(kill-buffer . nil)))
|
(kill-buffer . nil)
|
||||||
|
;; (beframe-unassume-current-frame-buffers-selectively . nil)))
|
||||||
|
(joe/beframe-unassume-and-refresh-consult . nil)))
|
||||||
|
|
||||||
(setf (alist-get 'kill-buffer embark-pre-action-hooks) nil)
|
(setf (alist-get 'kill-buffer embark-pre-action-hooks) nil)
|
||||||
#+end_src
|
#+end_src
|
||||||
@ -2354,11 +2362,17 @@ These help speed eglot up apparently [[https://www.reddit.com/r/emacs/comments/1
|
|||||||
** AI
|
** AI
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(setq gptel-default-mode #'org-mode)
|
(setq gptel-default-mode #'org-mode)
|
||||||
(setq gptel-model "gpt-4")
|
(setq gptel-model "claude-3-opus")
|
||||||
(setq gptel-api-key (with-temp-buffer
|
(setq gptel-api-key (with-temp-buffer
|
||||||
(insert-file-contents (expand-file-name "gptel-key" user-emacs-directory))
|
(insert-file-contents (expand-file-name "gptel-key" user-emacs-directory))
|
||||||
(buffer-string)))
|
(buffer-string)))
|
||||||
|
;; OPTIONAL configuration
|
||||||
|
(setq
|
||||||
|
gptel-model 'claude-3-sonnet-20240229 ; "claude-3-opus-20240229" also available
|
||||||
|
gptel-backend (gptel-make-anthropic "Claude"
|
||||||
|
:stream t :key (with-temp-buffer
|
||||||
|
(insert-file-contents (expand-file-name "gptel-key" user-emacs-directory))
|
||||||
|
(buffer-string))))
|
||||||
(add-hook 'gptel-post-response-functions #'font-lock-ensure)
|
(add-hook 'gptel-post-response-functions #'font-lock-ensure)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user