Skip to content

Commit 06d476c

Browse files
committed
Experiment with configuring gptel manually instead of using =doom= llm module
Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com>
1 parent d583f55 commit 06d476c

File tree

3 files changed

+60
-19
lines changed

3 files changed

+60
-19
lines changed

doom/config.el

Lines changed: 51 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
;; available. You can either set `doom-theme' or manually load a theme with the
4040
;; `load-theme' function. This is the default:
4141
;; (setq doom-theme 'doom-alabaster-dark)
42-
(setq doom-theme 'doom-gruvbox)
42+
(setq doom-theme 'doom-snazzy)
4343

4444
;; This determines the style of line numbers in effect. If set to `nil', line
4545
;; numbers are disabled. For relative line numbers, set this to `relative'.
@@ -121,7 +121,8 @@
121121
("C-c v &" . git-link))
122122

123123
;; LLM stuff
124-
(after! gptel
124+
(use-package! gptel
125+
:config
125126
(setq gptel-log-level 'info ;; help in debugging
126127
gptel-include-reasoning t)
127128
(require 'gptel-integrations) ;; TODO
@@ -133,29 +134,52 @@
133134
;; N.B.: the key is the prefix in the list of models in gptel.
134135
;; There's a default list prefixed by "ChatGPT" which is not controlled by this.
135136
;; TODO: figure out what happens if we override the name "ChatGPT" here.
136-
(gptel-make-openai "OpenAI"
137-
:stream t
138-
:key (auth-source-pick-first-password :host "api.openai.com")
139-
:models '((gpt-5 . "gpt-5")
140-
(gpt-5-mini . "gpt-5-mini")
141-
(gpt-4o-mini . "gpt-4o-mini")
142-
(gpt-4o . "gpt-4o")
143-
(gpt-4.1 . "gpt-4.1")
144-
(gpt-4.1-mini . "gpt-4.1-mini"))
145-
)
137+
;; (gptel-make-openai "OpenAI"
138+
;; :stream t
139+
;; :key (auth-source-pick-first-password :host "api.openai.com")
140+
;; :models '((gpt-5 . "gpt-5")
141+
;; (gpt-5-mini . "gpt-5-mini")
142+
;; (gpt-4o-mini . "gpt-4o-mini")
143+
;; (gpt-4o . "gpt-4o")
144+
;; (gpt-4.1 . "gpt-4.1")
145+
;; (gpt-4.1-mini . "gpt-4.1-mini"))
146+
;; )
147+
146148
(gptel-make-deepseek "DeepSeek"
147149
:stream t
148150
:key (auth-source-pick-first-password :host "api.deepseek.com"))
151+
149152
(gptel-make-gemini "Gemini"
150153
:stream t
151154
:key (auth-source-pick-first-password :host "generativelanguage.googleapis.com"))
152155

156+
(gptel-make-ollama "Ollama"
157+
:stream t
158+
:host "localhost:11434"
159+
:models '(qwen3.5:0.8b)
160+
)
161+
162+
(setq! gptel-model 'qwen3.5:0.8b)
163+
153164
;; Set default model. Right now this is very OpenAI-centric, i.e. might change in the future.
154-
(setq gptel-model 'gpt-5))
165+
;; (setq gptel-model 'gpt-5))
166+
;; (setq gptel-model 'llama-3.2-3b))
155167

156-
;; Magit integration for gptel
157-
(after! gptel-magit
158-
(setq gptel-magit-model 'gpt-4.1-mini))
168+
)
169+
170+
;; Magit integration for gptel (configure separately since it loads via hook)
171+
(use-package! gptel-magit
172+
:after gptel magit
173+
:config
174+
;; (setq gptel-magit-model 'gpt-4.1-mini)
175+
176+
(setq! gptel-magit-model 'llama-3.2:3b
177+
gptel-magit-backend (gptel-make-ollama "Ollama"
178+
:stream t
179+
:host "localhost:11434"
180+
:models '(qwen3.5:0.8b)
181+
))
182+
)
159183

160184
;; Let me write longer commit messages
161185
(after! git-commit
@@ -183,7 +207,7 @@
183207
;; ("i" . yankpad-insert)
184208
;; ("s" . yankpad-search)))
185209

186-
(use-package! eca)
210+
;; (use-package! eca)
187211

188212
(use-package! rainbow-mode
189213
:defer 5
@@ -210,6 +234,9 @@
210234
(setq agent-shell-enable-logging t)
211235
(setq agent-shell-enable-debug t)
212236
(setq agent-shell-enable-traces t)
237+
;; On Arch the claude-acp executable is called claude-code-acp for some reason, so we need to override the default command.
238+
;; TODO: figure out why this is the case and if there's a better solution than hardcoding this.
239+
(setq agent-shell-anthropic-claude-acp-command '("claude-code-acp"))
213240
(setq agent-shell-anthropic-authentication
214241
(agent-shell-anthropic-make-authentication
215242
:api-key (lambda () (auth-source-pick-first-password :host "api.anthropic.com"))))
@@ -233,3 +260,10 @@
233260
;; ; The grammar is called tlaplus, but the mode is called tla
234261
;; (setq treesit-load-name-override-list '((tla "libtree-sitter-tlaplus" "tree_sitter_tlaplus")))
235262
;; )
263+
264+
;; (use-package! claude-code-ide
265+
;; ;; :bind ("C-c C-'" . claude-code-ide-menu) ; Set your favorite keybinding
266+
;; :config
267+
;; ;; (setq claude-code-ide-cli-path "/usr/bin/claude")
268+
;; ;; (setq claude-code-ide-cli-debug t)
269+
;; (claude-code-ide-emacs-tools-setup)) ; Optionally enable Emacs MCP tools

doom/init.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
ein ; tame Jupyter notebooks with emacs
9999
(eval +overlay) ; run code, run (also, repls)
100100
lookup ; navigate your code and its documentation
101-
llm ; when I said you needed friends, I didn't mean...
101+
;; llm ; when I said you needed friends, I didn't mean...
102102
(lsp +lsp +booster); M-x vscode
103103
magit ; a git porcelain for Emacs
104104
make ; run make tasks from Emacs

doom/packages.el

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
(package! doom-alabaster-theme :recipe (:host github :repo "eapolinario/doom-alabaster-dark-theme"))
9595

9696
;; eca.dev
97-
(package! eca :recipe (:host github :repo "editor-code-assistant/eca-emacs" :files ("*.el")))
97+
;; (package! eca :recipe (:host github :repo "editor-code-assistant/eca-emacs" :files ("*.el")))
9898

9999
;; Highlight hex color codes
100100
(package! rainbow-mode)
@@ -110,3 +110,10 @@
110110
;; :recipe (:host github :repo "ratish-punnoose/tla-mode"))
111111
;; (package! tla-ts-mode
112112
;; :recipe (:host github :repo "Davidbrcz/tla-ts-mode" :files ("*.el")))
113+
114+
;; (package! claude-code-ide
115+
;; :recipe (:host github :repo "manzaltu/claude-code-ide.el"))
116+
117+
118+
(package! gptel :recipe (:nonrecursive t))
119+
(package! gptel-magit)

0 commit comments

Comments
 (0)