making a lot of ai stuff finally work

This commit is contained in:
Chris Cochrun 2023-12-12 14:35:23 -06:00
parent 22d466d6eb
commit 3719955000
2 changed files with 44 additions and 6 deletions

View file

@ -639,6 +639,10 @@ This evil-collection package includes a lot of other evil based things.
(general-create-definer chris/leader-keys (general-create-definer chris/leader-keys
:keymaps '(normal visual emacs) :keymaps '(normal visual emacs)
:prefix "SPC") :prefix "SPC")
(chris/leader-keys
:states 'visual
:keymaps 'override
"d" '(execute-extended-command :which-key "execute command"))
(chris/leader-keys (chris/leader-keys
:states 'normal :states 'normal
:keymaps 'override :keymaps 'override
@ -2011,12 +2015,26 @@ Idk, let's try this i guess
(use-package ellama (use-package ellama
:init :init
(require 'llm-ollama) (require 'llm-ollama)
(setopt ellama-buffer-mode 'org-mode (setopt ellama-buffer-mode 'markdown-mode
ellama-user-nick "Chris" ellama-user-nick "Chris"
ellama-assistant-nick "Jeeves" ellama-assistant-nick "Jeeves"
ellama-provider ellama-provider
(make-llm-ollama (make-llm-ollama
:chat-model "zephyr:7b-chat-q4_0" :embedding-model "zephyr:7b-chat-q4_0"))) :scheme "http"
:host "192.168.1.2"
:port 11434
:chat-model "mistral" :embedding-model "mistral"))
:general
(chris/leader-keys
:states '(normal visual)
:keymaps 'override
"l" '(:ignore t :which-key "llm")
"la" 'ellama-ask
"lb" 'ellama-ask-about
"lc" 'ellama-code-review
"lec" 'ellama-enhance-code
"leg" 'ellama-enhance-grammar-spelling
"lew" 'ellama-enhance-wording))
#+end_src #+end_src
** Jinx ** Jinx
@ -3390,6 +3408,7 @@ It's probably smart to have markdown.
:config :config
(setq markdown-fontify-code-blocks-natively t) (setq markdown-fontify-code-blocks-natively t)
(add-hook 'markdown-mode-hook 'chris/org-mode-setup) (add-hook 'markdown-mode-hook 'chris/org-mode-setup)
(custom-set-faces '(markdown-code-face ((t (:inherit org-block)))))
:general :general
(general-def 'normal markdown-mode-map (general-def 'normal markdown-mode-map
"C-j" 'markdown-next-visible-heading "C-j" 'markdown-next-visible-heading

25
init.el
View file

@ -346,6 +346,10 @@
(general-create-definer chris/leader-keys (general-create-definer chris/leader-keys
:keymaps '(normal visual emacs) :keymaps '(normal visual emacs)
:prefix "SPC") :prefix "SPC")
(chris/leader-keys
:states 'visual
:keymaps 'override
"d" '(execute-extended-command :which-key "execute command"))
(chris/leader-keys (chris/leader-keys
:states 'normal :states 'normal
:keymaps 'override :keymaps 'override
@ -1596,12 +1600,26 @@ Optional BACKEND must be `re-reveal' or a backend derived from it."
(use-package ellama (use-package ellama
:init :init
(require 'llm-ollama) (require 'llm-ollama)
(setopt ellama-buffer-mode 'org-mode (setopt ellama-buffer-mode 'markdown-mode
ellama-user-nick "Chris" ellama-user-nick "Chris"
ellama-assistant-nick "Jeeves" ellama-assistant-nick "Jeeves"
ellama-provider ellama-provider
(make-llm-ollama (make-llm-ollama
:chat-model "zephyr:7b-chat-q4_0" :embedding-model "zephyr:7b-chat-q4_0"))) :scheme "http"
:host "192.168.1.2"
:port 11434
:chat-model "mistral" :embedding-model "mistral"))
:general
(chris/leader-keys
:states '(normal visual)
:keymaps 'override
"l" '(:ignore t :which-key "llm")
"la" 'ellama-ask
"lb" 'ellama-ask-about
"lc" 'ellama-code-review
"lec" 'ellama-enhance-code
"leg" 'ellama-enhance-grammar-spelling
"lew" 'ellama-enhance-wording))
(use-package jinx (use-package jinx
;; :hook (emacs-startup . global-jinx-mode) ;; :hook (emacs-startup . global-jinx-mode)
@ -2506,6 +2524,7 @@ targets."
:config :config
(setq markdown-fontify-code-blocks-natively t) (setq markdown-fontify-code-blocks-natively t)
(add-hook 'markdown-mode-hook 'chris/org-mode-setup) (add-hook 'markdown-mode-hook 'chris/org-mode-setup)
(custom-set-faces '(markdown-code-face ((t (:inherit org-block)))))
:general :general
(general-def 'normal markdown-mode-map (general-def 'normal markdown-mode-map
"C-j" 'markdown-next-visible-heading "C-j" 'markdown-next-visible-heading