yasnippets and org-ai cfg

This commit is contained in:
Levi Neely 2024-09-08 17:19:19 +02:00
parent d67d17a0a5
commit ed2200f37f
2 changed files with 24 additions and 8 deletions

1
.gitignore vendored
View File

@ -8,3 +8,4 @@
/emacs/straight/
/emacs/ellama-sessions/
/emacs/claude/
/emacs/games/

View File

@ -712,18 +712,19 @@
(use-package websocket :ensure t)
(use-package org-ai
:ensure t
:commands (org-ai-mode org-ai-global-mode)
:load-path (lambda () "~/.config/emacs/elisp/org-ai")
:commands (org-ai-mode
org-ai-global-mode)
:init
(add-hook 'org-mode-hook #'org-ai-mode)
(org-ai-global-mode nil)
(add-hook 'org-mode-hook #'org-ai-mode)
(org-ai-global-mode)
(org-ai-install-yasnippets)
:config
(setq org-ai-use-auth-source t)
(setq org-ai-default-provider 'anthropic)
(setq org-ai-default-chat-model "claude-3-5-sonnet-20240620")
(global-set-key (kbd "C-x O A") org-ai-global-prefix-map))
(setq org-ai-default-chat-model "gpt-3.5-turbo"))
(defun magit-reset-to-merge-base ()
@ -757,7 +758,21 @@
(global-set-key (kbd "C-x g r b") 'magit-reset-to-merge-base)
(global-set-key (kbd "C-x g r u") 'magit-reset-to-upstream)
(use-package yasnippet
:ensure t
:config
(yas-global-mode 1)
:bind
("C-x y i" . yas-insert-snippet)
("C-x y n" . yas-new-snippet)
("C-x y v" . yas-visit-snippet-file))
(use-package yasnippet-snippets
:ensure t
:after yasnippet)
(provide 'init)
;;; init.el ends here