This commit is contained in:
Levi Neely 2024-09-06 21:27:00 +02:00
parent a98c753d77
commit 44536beaef
1 changed files with 60 additions and 17 deletions

View File

@ -4,6 +4,7 @@
'("melpa" . "https://melpa.org/packages/")
'("nongnu" . "https://elpa.nongnu.org/nongnu/")))
(package-initialize)
(setq package-enable-at-startup t)
(require 'use-package)
(defvar bootstrap-version)
@ -362,7 +363,6 @@
;; navigation
;; ===
(use-package avy
:ensure t
:bind (("C-x j j" . avy-goto-char)
@ -665,23 +665,67 @@
(global-set-key (kbd "C-x y b p") 'copy-file-path-to-clipboard)
(add-hook 'before-save-hook #'gofmt-before-save)
;; (use-package ellama
;; :init
;; ;; setup key bindings
;; (setopt ellama-keymap-prefix "C-c e")
;; ;; language you want ellama to translate to
;; (setopt ellama-language "English")
;; ;; could be llm-openai for example
;; (require 'llm-ollama)
;; (setopt ellama-provider
;; (make-llm-ollama
;; ;; this model should be pulled to use it
;; ;; value should be the same as you print in terminal during pull
;; :chat-model "codellama:latest"
;; :embedding-model "nomic-embed-text"
;; :default-chat-non-standard-params '(("num_ctx" . 8192)))))
(use-package ellama
(use-package lmtf :ensure t :defer t
:straight (lmtf :type git :host github :repo "lneely/lmtf")
:bind (:map emacs-lisp-mode-map
("C-c t !" . lmtf-run-all-tests)
("C-c t r" . lmtf-show-results)))
(defun compile-init-on-save ()
"Automatically compile init.el when saving it."
(when (equal buffer-file-name (expand-file-name "~/.emacs.d/init.el"))
(byte-compile-file buffer-file-name)))
(add-hook 'after-save-hook #'compile-init-on-save)
(use-package claude-shell
:straight (claude-shell :type git :host github :repo "arminfriedl/claude-shell")
:config
(setq claude-shell-api-token (getenv "CLAUDE_API_KEY")))
(use-package org-ai
:ensure t
:commands (org-ai-mode org-ai-global-mode)
:init
;; setup key bindings
(setopt ellama-keymap-prefix "C-c e")
;; language you want ellama to translate to
(setopt ellama-language "English")
;; could be llm-openai for example
(require 'llm-ollama)
(setopt ellama-provider
(make-llm-ollama
;; this model should be pulled to use it
;; value should be the same as you print in terminal during pull
:chat-model "codellama:latest"
:embedding-model "nomic-embed-text"
:default-chat-non-standard-params '(("num_ctx" . 8192)))))
(add-hook 'org-mode-hook #'org-ai-mode)
(org-ai-global-mode nil)
:config
(setq org-ai-default-provider 'anthropic)
(setq org-ai-default-chat-model "claude-3-opus-20240229")
(setq org-ai-use-auth-source t)
(global-set-key (kbd "C-x O a") org-ai-global-prefix-map))
;; setup key bindings
(setopt ellama-keymap-prefix "C-c e")
;; language you want ellama to translate to
(setopt ellama-language "English")
;; could be llm-openai for example
(require 'llm-ollama)
(setopt ellama-provider
(make-llm-ollama
;; this model should be pulled to use it
;; value should be the same as you print in terminal during pull
:chat-model "codellama:latest"
:embedding-model "nomic-embed-text"
:default-chat-non-standard-params '(("num_ctx" . 8192)))))
(defun magit-reset-to-merge-base ()
"Reset to merge-base of two branches using Magit's branch selection."
@ -714,8 +758,7 @@
(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)
(provide 'init)
;;; init.el ends here