[emacs] More hacking, snapshot to sync
This commit is contained in:
parent
cdc09a3c8c
commit
1fd66682e5
3 changed files with 505 additions and 275 deletions
|
|
@ -57,8 +57,28 @@
|
|||
'(org-log-done t)
|
||||
'(org-odd-levels-only t)
|
||||
'(org-todo-keywords '((sequence "TODO" "|" "DONE" "ABANDONED" "DEFERRED")))
|
||||
'(package-check-signature nil)
|
||||
'(package-selected-packages
|
||||
'(gptel fish-mode editorconfig jsonnet-mode scala-ts-mode adaptive-wrap add-node-modules-path ag auto-complete auto-complete-nxml bazel blacken cider clang-format clojure-mode color-theme-monokai color-theme-sanityinc-solarized color-theme-sanityinc-tomorrow company company-jedi company-lsp compat cquery dash-functional deadgrep dockerfile-mode doom-themes earthfile-mode eglot eglot-java elm-mode esup exec-path-from-shell filladapt flycheck flycheck-elm flycheck-rust flymake flyspell fsharp-mode geiser gnu-elpa-keyring-update go-autocomplete go-mode graphviz-dot-mode hack-mode haxe-mode howm ink-mode js2-mode js2-refactor json-mode lsp-hack lsp-pyright lsp-ui lua-mode magit markdown-mode merlin mocha modus-themes monky monokai-theme multi-term mustache-mode nyan-mode paredit popup prettier-js projectile protobuf-mode python-mode rjsx-mode ruby-mode rust-mode sql-indent swift-mode switch-window terraform-mode thrift tide tree-sitter tss tuareg typescript-mode use-package vterm web-mode wgrep xref-js2 xterm-color yaml-mode zig-mode))
|
||||
'(adaptive-wrap add-node-modules-path ag auto-complete auto-complete-nxml
|
||||
bazel blacken cider clang-format clipetty clojure-mode
|
||||
color-theme-monokai color-theme-sanityinc-solarized
|
||||
color-theme-sanityinc-tomorrow company company-jedi
|
||||
company-lsp compat cquery dash-functional deadgrep
|
||||
dockerfile-mode doom-themes earthfile-mode editorconfig
|
||||
eglot eglot-java elm-mode esup exec-path-from-shell
|
||||
filladapt fish-mode flycheck flycheck-elm flycheck-rust
|
||||
flymake flyspell fsharp-mode geiser
|
||||
gnu-elpa-keyring-update go-autocomplete go-mode gptel
|
||||
graphviz-dot-mode hack-mode haxe-mode howm ink-mode
|
||||
js2-mode js2-refactor json-mode jsonnet-mode lsp-hack
|
||||
lsp-pyright lsp-ui lua-mode magit markdown-mode merlin
|
||||
mocha modus-themes monky monokai-theme multi-term
|
||||
mustache-mode nyan-mode paredit popup prettier-js
|
||||
projectile protobuf-mode python-mode request rjsx-mode
|
||||
ruby-mode rust-mode scala-mode scala-ts-mode sql-indent
|
||||
swift-mode switch-window terraform-mode thrift tide
|
||||
tree-sitter tss tuareg typescript-mode use-package vterm
|
||||
web-mode wgrep xref-js2 xterm-color yaml-mode zig-mode))
|
||||
'(reb-re-syntax 'string)
|
||||
'(rmail-mail-new-frame t)
|
||||
'(safe-local-variable-values
|
||||
|
|
@ -73,8 +93,8 @@
|
|||
(whitespace-mode 0)
|
||||
(whitespace-mode 1))
|
||||
(whitespace-line-column . 80)
|
||||
(whitespace-style face trailing lines-tail)
|
||||
(require-final-newline . t)))
|
||||
(whitespace-style face trailing lines-tail) (require-final-newline . t)))
|
||||
'(scala-indent:use-javadoc-style t)
|
||||
'(scroll-conservatively 1)
|
||||
'(scroll-step 1)
|
||||
'(sd-user-email "johndoty@microsoft.com")
|
||||
|
|
@ -86,6 +106,7 @@
|
|||
'(tags-revert-without-query t)
|
||||
'(tramp-completion-reread-directory-timeout nil)
|
||||
'(tramp-default-method "sshx")
|
||||
'(tramp-use-connection-share nil)
|
||||
'(tramp-use-ssh-controlmaster-options nil)
|
||||
'(transient-mark-mode t)
|
||||
'(truncate-lines t)
|
||||
|
|
|
|||
|
|
@ -1401,44 +1401,24 @@ Do this when you edit your project view."
|
|||
;; =================================================================
|
||||
;; AI Shit
|
||||
;; =================================================================
|
||||
(use-package request :ensure)
|
||||
(defun claude-get-api-key ()
|
||||
"Get Claude API key from auth-source."
|
||||
(let ((auth-info (nth 0 (auth-source-search :host "anthropic.com"
|
||||
:user "claude-api"
|
||||
:require '(:secret)
|
||||
:create t))))
|
||||
(if auth-info
|
||||
(let ((secret (plist-get auth-info :secret)))
|
||||
(if (functionp secret)
|
||||
(funcall secret)
|
||||
secret))
|
||||
(error "Claude API key not found in auth-source"))))
|
||||
|
||||
(use-package claude
|
||||
:load-path "~/site-lisp/"
|
||||
:custom
|
||||
(claude-model "claude-3-7-sonnet-20250219") ;; Current model as of March 2025
|
||||
(claude-max-tokens 4000)
|
||||
(claude-auto-display-results t)
|
||||
(use-package gptel :ensure
|
||||
:config
|
||||
;; If you want to add any custom tools, add them here
|
||||
;; (claude-register-tool
|
||||
;; '(:name "my_custom_tool"
|
||||
;; :description "A custom tool that does something specific"
|
||||
;; :parameters ((properties
|
||||
;; (param1 (title . "Parameter 1")
|
||||
;; (type . "string")
|
||||
;; (description . "Description of parameter 1"))))))
|
||||
|
||||
;; (claude-register-tool-handler
|
||||
;; "my_custom_tool"
|
||||
;; (lambda (parameters)
|
||||
;; ;; Your implementation here
|
||||
;; (format "Tool executed with param: %s" (cdr (assoc 'param1 parameters)))))
|
||||
|
||||
;; Enable the minor mode for keybindings
|
||||
(claude-mode 1)
|
||||
:bind (:map claude-mode-map
|
||||
;; You can customize the keybindings if you prefer different ones
|
||||
("C-c C-a a" . claude-prompt-and-send) ;; Add a custom binding
|
||||
;; Default bindings included by claude-mode:
|
||||
;; C-c C-a s - claude-send-region
|
||||
;; C-c C-a b - claude-send-buffer
|
||||
;; C-c C-a r - claude-code-review
|
||||
;; C-c C-a e - claude-explain-code
|
||||
;; C-c C-a c - claude-complete-code
|
||||
;; C-c C-a t - claude-send-with-tools
|
||||
;; C-c C-a l - claude-list-requested-tools
|
||||
;; C-c C-a p - claude-prompt-and-send
|
||||
))
|
||||
|
||||
(setq
|
||||
gptel-model 'claude-3-7-sonnet-20250219 ; "claude-3-opus-20240229" also available
|
||||
gptel-backend (gptel-make-anthropic "Claude"
|
||||
:stream t :key #'claude-get-api-key))
|
||||
)
|
||||
;;; init.el ends here
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue