Compare commits
5
Commits
45ed3a8081
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
69af07dc49 | ||
|
|
017c4b0b7d | ||
|
|
77b1b6f999 | ||
|
|
5c4d83590c | ||
|
|
a949d2b57b |
+22
-16
@@ -205,6 +205,7 @@ Finish up
|
||||
all-the-icons-completion
|
||||
;; eat
|
||||
;; Enhancements
|
||||
centaur-tabs
|
||||
olivetti
|
||||
helpful
|
||||
vterm
|
||||
@@ -1020,10 +1021,7 @@ Fill region is great, except when you don't need it...
|
||||
(require 'all-the-icons-ibuffer)
|
||||
(add-hook 'ibuffer-mode-hook #'all-the-icons-ibuffer-mode)
|
||||
(global-set-key [remap list-buffers] 'ibuffer)
|
||||
(evil-define-key '(normal insert visual emacs) 'global
|
||||
(kbd "C-b") #'consult-buffer)
|
||||
(evil-define-key '(normal insert visual emacs) 'global
|
||||
(kbd "C-S-b") #'ibuffer)
|
||||
(global-set-key (kbd "C-x b") #'consult-buffer)
|
||||
|
||||
(defun joe/switch-other-buffer ()
|
||||
"Switch to other buffer"
|
||||
@@ -2179,19 +2177,26 @@ start it, so go through all existing buffers that match the mode and belong to t
|
||||
#+end_src
|
||||
** AI
|
||||
#+begin_src emacs-lisp
|
||||
(setq gptel-default-mode #'org-mode)
|
||||
(setq gptel-api-key (with-temp-buffer
|
||||
(insert-file-contents (expand-file-name "gptel-gpt-key" user-emacs-directory))
|
||||
(buffer-string)))
|
||||
(gptel-make-anthropic "Claude" :stream t :key (with-temp-buffer
|
||||
(insert-file-contents (expand-file-name "gptel-key" user-emacs-directory))
|
||||
(buffer-string)))
|
||||
(gptel-make-openai "ChatGPT" :stream t :key (with-temp-buffer
|
||||
(insert-file-contents (expand-file-name "gptel-gpt-key" user-emacs-directory))
|
||||
(buffer-string)))
|
||||
|
||||
(defun joe/read-file-or-nil (filename)
|
||||
"Read FILENAME from emacs directory, return nil if file doesn't exist."
|
||||
(let ((path (expand-file-name filename user-emacs-directory)))
|
||||
(when (file-exists-p path)
|
||||
(with-temp-buffer
|
||||
(insert-file-contents path)
|
||||
(string-trim (buffer-string))))))
|
||||
|
||||
(setq gptel-default-mode #'org-mode)
|
||||
(when-let ((gpt-key (joe/read-file-or-nil "gptel-gpt-key")))
|
||||
(setq gptel-api-key gpt-key))
|
||||
|
||||
(when-let ((claude-key (joe/read-file-or-nil "gptel-key")))
|
||||
(gptel-make-anthropic "Claude" :stream t :key claude-key)
|
||||
(setq gptel-model 'claude-sonnet-4-6)
|
||||
(setq gptel-backend (gptel-get-backend "Claude"))
|
||||
(setq gptel-backend (gptel-get-backend "Claude")))
|
||||
|
||||
(when-let ((gpt-key (joe/read-file-or-nil "gptel-gpt-key")))
|
||||
(gptel-make-openai "ChatGPT" :stream t :key gpt-key))
|
||||
|
||||
(setq gptel-prompt-prefix-alist '((markdown-mode . "### ")
|
||||
(org-mode . "* ")
|
||||
@@ -2425,7 +2430,7 @@ it doesn't close it.
|
||||
(deactivate-mark))))
|
||||
|
||||
;; This is required so that .dir-locals that read env files for credentials works
|
||||
(require 'dotenv)
|
||||
;; (require 'dotenv)
|
||||
(defun joe/sql-mode-hook ()
|
||||
(define-key sql-mode-map (kbd "C-M-h") #'joe/mark-sql-defun)
|
||||
(define-key sql-mode-map (kbd "C-M-x") #'sql-send-pg-function)
|
||||
@@ -2505,6 +2510,7 @@ Apparently this helps with the performance of dape, as well as LSP
|
||||
** org-mode
|
||||
*** General
|
||||
#+begin_src emacs-lisp
|
||||
(require 'org)
|
||||
(setq org-todo-keywords '((sequence "TODO" "IN-PROGRESS" "|" "DONE" "BACKLOG")))
|
||||
(setq org-directory "~/Notes/")
|
||||
|
||||
|
||||
Reference in new issue
Block a user