LLM integrations for emacs
This commit is contained in:
parent
415f33880c
commit
0f471e2c6e
1 changed files with 64 additions and 2 deletions
|
|
@ -935,10 +935,72 @@ I know these could be bound on a per-package basis, but since this is my primary
|
|||
deft-extensions '("org" "txt"))
|
||||
#+end_src
|
||||
* AI
|
||||
Multiple AI coding-agent integrations are configured here, all under the
|
||||
=SPC c a= (mnemonic: "code agent") prefix. None of these packages are
|
||||
loaded, started, or connected to anything at Emacs startup — they are
|
||||
purely autoloaded via =:commands= and only spring into life when you
|
||||
explicitly invoke one of the bindings below. This is deliberate: several
|
||||
of these (claude-code family in particular) are tied to a specific
|
||||
subscription/account, and accidentally having one auto-activate in the
|
||||
wrong project (personal vs. work) would be a contract violation. So:
|
||||
|
||||
- No =:hook=, no =:init= that touches global state, no autostart.
|
||||
- Each package is truly inert until you press its specific keybinding.
|
||||
- You are always choosing, explicitly, which agent/account to invoke for
|
||||
the current project.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package gptel)
|
||||
(setq gptl-default-mode 'org-mode)
|
||||
(use-package gptel
|
||||
:commands (gptel gptel-send gptel-menu)
|
||||
:config
|
||||
(setq gptel-default-mode 'org-mode))
|
||||
|
||||
;; gptel-agent adds agentic/tool-use capabilities on top of gptel.
|
||||
;; Deferred the same way — it does nothing until invoked.
|
||||
(use-package gptel-agent
|
||||
:straight (gptel-agent :host github :repo "skissue/gptel-agent")
|
||||
:after gptel
|
||||
:commands (gptel-agent))
|
||||
|
||||
;; claude-code.el: terminal/vterm-backed Claude Code session manager.
|
||||
;; :commands ensures the package (and any of its process-launching code)
|
||||
;; is not loaded until you explicitly call one of these.
|
||||
(use-package claude-code
|
||||
:straight (claude-code :host github :repo "stevemolitor/claude-code.el")
|
||||
:commands (claude-code claude-code-toggle claude-code-send-region
|
||||
claude-code-switch-to-buffer))
|
||||
|
||||
;; claude-code-ide.el: a separate, IDE-style (not terminal-based)
|
||||
;; Claude Code integration. Kept fully independent from claude-code.el
|
||||
;; above so you can compare the two without either auto-loading the
|
||||
;; other.
|
||||
(use-package claude-code-ide
|
||||
:straight (claude-code-ide :host github :repo "manzaltu/claude-code-ide.el")
|
||||
:commands (claude-code-ide claude-code-ide-menu))
|
||||
|
||||
;; agent-shell: general-purpose agent shell (not Claude-specific).
|
||||
(use-package agent-shell
|
||||
:straight (agent-shell :host github :repo "xenodium/agent-shell")
|
||||
:commands (agent-shell))
|
||||
#+end_src
|
||||
|
||||
** Keybindings
|
||||
All bindings live under =SPC c a=, alongside the rest of the =Code= prefix.
|
||||
Nothing here is bound globally outside of =general-definition= below, and
|
||||
none of it runs at startup — pressing one of these keys is the only thing
|
||||
that ever loads/starts the corresponding package.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(with-eval-after-load 'general
|
||||
(general-definition
|
||||
"ca" '(:ignore t :which-key "Code agent")
|
||||
"caa" '(gptel :which-key "gptel (chat)")
|
||||
"cag" '(gptel-agent :which-key "gptel-agent")
|
||||
"cac" '(claude-code :which-key "claude-code.el")
|
||||
"caC" '(claude-code-ide :which-key "claude-code-ide.el")
|
||||
"cas" '(agent-shell :which-key "agent-shell")))
|
||||
#+end_src
|
||||
|
||||
* Org Mode
|
||||
#+begin_src emacs-lisp
|
||||
(use-package org)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue