Compare commits
7 commits
3855359104
...
7fc62482ff
| Author | SHA1 | Date | |
|---|---|---|---|
| 7fc62482ff | |||
| 7b86c88080 | |||
| d77b353bdd | |||
| f2cc293a91 | |||
| 9439fc9802 | |||
| 11e4e4509a | |||
| f86376b8ad |
3 changed files with 218 additions and 232 deletions
|
|
@ -1,8 +1,10 @@
|
||||||
fish_add_path ~/.local/bin \
|
fish_add_path \
|
||||||
~/.cargo/bin \
|
~/.local/bin \
|
||||||
~/bin \
|
~/.cargo/bin \
|
||||||
/opt/local/sbin \
|
~/bin \
|
||||||
/opt/local/bin
|
/opt/local/sbin \
|
||||||
|
/opt/local/bin \
|
||||||
|
~/.npm-global/bin
|
||||||
|
|
||||||
fish_add_path --append \
|
fish_add_path --append \
|
||||||
~/devtools/buck/bin \
|
~/devtools/buck/bin \
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@
|
||||||
'(company-minimum-prefix-length 1)
|
'(company-minimum-prefix-length 1)
|
||||||
'(css-indent-offset 2)
|
'(css-indent-offset 2)
|
||||||
'(custom-safe-themes t)
|
'(custom-safe-themes t)
|
||||||
|
'(eglot-code-action-indications '(eldoc-hint))
|
||||||
'(fast-lock-cache-directories '("~/flc-cache"))
|
'(fast-lock-cache-directories '("~/flc-cache"))
|
||||||
'(fast-lock-minimum-size nil)
|
'(fast-lock-minimum-size nil)
|
||||||
'(fill-column 77)
|
'(fill-column 77)
|
||||||
|
|
@ -77,13 +78,13 @@
|
||||||
js2-mode js2-refactor json-mode jsonnet-mode lsp-hack
|
js2-mode js2-refactor json-mode jsonnet-mode lsp-hack
|
||||||
lsp-pyright lsp-ui lua-mode magit markdown-mode merlin
|
lsp-pyright lsp-ui lua-mode magit markdown-mode merlin
|
||||||
mocha modus-themes monky monokai-theme multi-term
|
mocha modus-themes monky monokai-theme multi-term
|
||||||
mustache-mode nyan-mode paredit popup prettier-js
|
mustache-mode nyan-mode paredit poly-markdown popup
|
||||||
projectile protobuf-mode python-mode request rjsx-mode
|
prettier-js projectile protobuf-mode python-mode request
|
||||||
ruby-mode rust-mode scala-ts-mode simple-httpd sql-indent
|
rjsx-mode ruby-mode rust-mode scala-ts-mode simple-httpd
|
||||||
swift-mode switch-window terraform-mode thrift tide
|
sql-indent swift-mode switch-window terraform-mode thrift
|
||||||
tree-sitter tss tuareg typescript-mode use-package uuidgen
|
tide tree-sitter tss tuareg typescript-mode use-package
|
||||||
vterm web-mode wgrep wgsl-mode xref-js2 xterm-color
|
uuidgen vterm web-mode wgrep wgsl-mode xref-js2
|
||||||
yaml-mode zig-mode))
|
xterm-color yaml-mode zig-mode))
|
||||||
'(reb-re-syntax 'string)
|
'(reb-re-syntax 'string)
|
||||||
'(rmail-mail-new-frame t)
|
'(rmail-mail-new-frame t)
|
||||||
'(safe-local-variable-directories '("/home/john.doty/universe/"))
|
'(safe-local-variable-directories '("/home/john.doty/universe/"))
|
||||||
|
|
@ -106,6 +107,7 @@
|
||||||
'(sentence-end-double-space nil)
|
'(sentence-end-double-space nil)
|
||||||
'(show-paren-mode t)
|
'(show-paren-mode t)
|
||||||
'(show-paren-style 'parenthesis)
|
'(show-paren-style 'parenthesis)
|
||||||
|
'(straight-use-package-by-default t)
|
||||||
'(tab-width 4)
|
'(tab-width 4)
|
||||||
'(tags-revert-without-query t)
|
'(tags-revert-without-query t)
|
||||||
'(tramp-completion-reread-directory-timeout nil)
|
'(tramp-completion-reread-directory-timeout nil)
|
||||||
|
|
|
||||||
422
.emacs.d/init.el
422
.emacs.d/init.el
|
|
@ -6,6 +6,8 @@
|
||||||
;;; This is my .emacs.
|
;;; This is my .emacs.
|
||||||
;;; There are many like it, but this one is mine.
|
;;; There are many like it, but this one is mine.
|
||||||
;;;
|
;;;
|
||||||
|
;;; 2025/12/24 - Convert to straight.el from ELPA; it's been a good run.
|
||||||
|
;;;
|
||||||
;;; 2019/03/27 - Moved back into init.el, to make profiling possible.
|
;;; 2019/03/27 - Moved back into init.el, to make profiling possible.
|
||||||
;;;
|
;;;
|
||||||
;;; 2016/12/03 - Just a note: been using Emacs far more heavily as my core
|
;;; 2016/12/03 - Just a note: been using Emacs far more heavily as my core
|
||||||
|
|
@ -56,6 +58,27 @@
|
||||||
(setq custom-file (concat init-dir "custom.el"))
|
(setq custom-file (concat init-dir "custom.el"))
|
||||||
(load custom-file)
|
(load custom-file)
|
||||||
|
|
||||||
|
;; =================================================================
|
||||||
|
;; straight.el bootstrap
|
||||||
|
;; =================================================================
|
||||||
|
;; This is after the custom-set-variables thing so that straight.el
|
||||||
|
;; picks up on customizations that we've made.
|
||||||
|
(defvar bootstrap-version)
|
||||||
|
(let ((bootstrap-file
|
||||||
|
(expand-file-name
|
||||||
|
"straight/repos/straight.el/bootstrap.el"
|
||||||
|
(or (bound-and-true-p straight-base-dir)
|
||||||
|
user-emacs-directory)))
|
||||||
|
(bootstrap-version 7))
|
||||||
|
(unless (file-exists-p bootstrap-file)
|
||||||
|
(with-current-buffer
|
||||||
|
(url-retrieve-synchronously
|
||||||
|
"https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el"
|
||||||
|
'silent 'inhibit-cookies)
|
||||||
|
(goto-char (point-max))
|
||||||
|
(eval-print-last-sexp)))
|
||||||
|
(load bootstrap-file nil 'nomessage))
|
||||||
|
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
;; Load Path Customization
|
;; Load Path Customization
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
|
|
@ -63,52 +86,6 @@
|
||||||
;; add private lisp directory to load-path.
|
;; add private lisp directory to load-path.
|
||||||
(add-to-list 'load-path (directory-file-name "~/site-lisp"))
|
(add-to-list 'load-path (directory-file-name "~/site-lisp"))
|
||||||
|
|
||||||
;; =================================================================
|
|
||||||
;; FB STUFF
|
|
||||||
;; =================================================================
|
|
||||||
(defconst master-dir (getenv "LOCAL_ADMIN_SCRIPTS"))
|
|
||||||
(defconst engshare-master (getenv "ADMIN_SCRIPTS"))
|
|
||||||
(defconst is-fb-environment
|
|
||||||
(file-exists-p "/usr/share/emacs/site-lisp/fb-master.el")
|
|
||||||
"Are we running on an FB machine or not?")
|
|
||||||
|
|
||||||
(when is-fb-environment
|
|
||||||
;; Load the master.emacs file which apparently has stuff in it I want?
|
|
||||||
(load-library "/usr/share/emacs/site-lisp/fb-master.el")
|
|
||||||
|
|
||||||
;; Set up the proxy for working properly from the devserver.
|
|
||||||
(if (and
|
|
||||||
(getenv "HOSTNAME")
|
|
||||||
(string-match-p ".+\.facebook\.com" (getenv "HOSTNAME")))
|
|
||||||
(setq url-proxy-services
|
|
||||||
'(("no_proxy" . "^\\(localhost\\|10.*\\)")
|
|
||||||
("http" . "fwdproxy:8080")
|
|
||||||
("https" . "fwdproxy:8080"))))
|
|
||||||
)
|
|
||||||
|
|
||||||
;; =================================================================
|
|
||||||
;; Packages
|
|
||||||
;; =================================================================
|
|
||||||
;; See http://dotyl.ink/l/qbmhz43kju
|
|
||||||
(let* ((no-ssl (and (memq system-type '(windows-nt ms-dos))
|
|
||||||
(not (gnutls-available-p))))
|
|
||||||
(proto (if no-ssl "http" "https")))
|
|
||||||
(setq package-archives
|
|
||||||
'(("gnu" . "https://elpa.gnu.org/packages/")
|
|
||||||
("org" . "https://orgmode.org/elpa/")
|
|
||||||
))
|
|
||||||
|
|
||||||
(add-to-list 'package-archives (cons "melpa" (concat proto "://melpa.org/packages/")) t)
|
|
||||||
)
|
|
||||||
(package-initialize)
|
|
||||||
(unless package-archive-contents
|
|
||||||
(package-refresh-contents))
|
|
||||||
|
|
||||||
;; Really we should be marking *everyting* here with :ensure rather than
|
|
||||||
;; downloading it all up front.
|
|
||||||
;;
|
|
||||||
;; (package-install-selected-packages))
|
|
||||||
|
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
;; Common stuff that's needed once
|
;; Common stuff that's needed once
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
|
|
@ -116,8 +93,6 @@
|
||||||
(require 'ffap) ;; Am I using this?
|
(require 'ffap) ;; Am I using this?
|
||||||
(require 'uniquify) ;; Unique buffers based on file name.
|
(require 'uniquify) ;; Unique buffers based on file name.
|
||||||
(require 'ansi-color)
|
(require 'ansi-color)
|
||||||
(when is-fb-environment
|
|
||||||
(require '50-arc))
|
|
||||||
(require 'ert) ;; I don't know, I started getting probs.
|
(require 'ert) ;; I don't know, I started getting probs.
|
||||||
|
|
||||||
(prefer-coding-system 'utf-8)
|
(prefer-coding-system 'utf-8)
|
||||||
|
|
@ -176,47 +151,41 @@
|
||||||
;; segfaulting on my devserver when it called find-font, and I'll be damned
|
;; segfaulting on my devserver when it called find-font, and I'll be damned
|
||||||
;; if I'm going to debug it.)
|
;; if I'm going to debug it.)
|
||||||
;;
|
;;
|
||||||
|
(defun font-candidate (&rest fonts)
|
||||||
|
"Return the first font in the list of FONTS."
|
||||||
|
(cl-find-if (lambda (f) (find-font (font-spec :name f))) fonts))
|
||||||
|
|
||||||
(if (display-graphic-p)
|
(if (display-graphic-p)
|
||||||
(let ((jd-frame-height))
|
;; Consolas. (And, to a lesser extent, Inconsolata.)
|
||||||
;; Consolas. (And, to a lesser extent, Inconsolata.)
|
;;
|
||||||
;;
|
(let ((my-font-choice (cond
|
||||||
(defun font-candidate (&rest fonts)
|
((string-equal (downcase (system-name)) "bifrost")
|
||||||
"Return existing font which first match."
|
"InputMonoNarrow-12")
|
||||||
(cl-find-if (lambda (f) (find-font (font-spec :name f))) fonts))
|
|
||||||
|
|
||||||
(defvar my-font-choice
|
((string-equal (downcase (system-name)) "fred")
|
||||||
(cond
|
"InputMonoNarrow-16")
|
||||||
((string-equal (downcase (system-name)) "bifrost")
|
|
||||||
"InputMonoNarrow-12")
|
|
||||||
|
|
||||||
((string-equal (downcase (system-name)) "fred")
|
((string-equal (downcase (system-name)) "unstablesurface")
|
||||||
"InputMonoNarrow-16")
|
"Input Mono Narrow:pixelsize=28:weight=normal")
|
||||||
|
|
||||||
((string-equal (downcase (system-name)) "unstablesurface")
|
((string-equal (downcase (system-name)) "oldconvert")
|
||||||
"Input Mono Narrow:pixelsize=28:weight=normal")
|
"Input Mono Narrow:pixelsize=28:weight=normal")
|
||||||
|
|
||||||
((string-equal (downcase (system-name)) "oldconvert")
|
(t
|
||||||
"Input Mono Narrow:pixelsize=28:weight=normal")
|
(font-candidate
|
||||||
|
"Input Mono Narrow:pixelsize=14:weight=normal"
|
||||||
(t
|
"InputMonoNarrow-14"
|
||||||
(font-candidate
|
"Consolas-10"
|
||||||
"Input Mono Narrow:pixelsize=14:weight=normal"
|
"Inconsolata-11"
|
||||||
"InputMonoNarrow-14"
|
"Monaco-14")))))
|
||||||
"Consolas-10"
|
|
||||||
"Inconsolata-11"
|
|
||||||
"Monaco-14")))
|
|
||||||
"The font I'm using, in graphics mode.")
|
|
||||||
|
|
||||||
;; This is just here for playing with things.
|
;; This is just here for playing with things.
|
||||||
(set-frame-font my-font-choice)
|
(set-frame-font my-font-choice)
|
||||||
|
|
||||||
;;
|
|
||||||
;; To obtain new font string, execute eval-expression, and eval this:
|
;; To obtain new font string, execute eval-expression, and eval this:
|
||||||
;; (insert(prin1-to-string(w32-select-font)))
|
;; (insert(prin1-to-string(w32-select-font)))
|
||||||
;; This will show the required string in the scratch buffer.
|
;; This will show the required string in the scratch buffer.
|
||||||
|
|
||||||
|
|
||||||
;; NOTE: I used to compute the height of the initial frame based on
|
;; NOTE: I used to compute the height of the initial frame based on
|
||||||
;; display pixel height but it got unsustainable and I hated it. (setq
|
;; display pixel height but it got unsustainable and I hated it. (setq
|
||||||
;; jd-frame-height
|
;; jd-frame-height
|
||||||
|
|
@ -224,7 +193,6 @@
|
||||||
;; ((> (display-pixel-height) 768) 48)
|
;; ((> (display-pixel-height) 768) 48)
|
||||||
;; ('t 40)))
|
;; ('t 40)))
|
||||||
|
|
||||||
|
|
||||||
;; frame settings. default-frame-alist controls what a default frame
|
;; frame settings. default-frame-alist controls what a default frame
|
||||||
;; looks like.
|
;; looks like.
|
||||||
(setq default-frame-alist
|
(setq default-frame-alist
|
||||||
|
|
@ -238,7 +206,7 @@
|
||||||
(width . 91)))
|
(width . 91)))
|
||||||
))
|
))
|
||||||
|
|
||||||
(use-package doom-themes :ensure t
|
(use-package doom-themes :straight t
|
||||||
:config
|
:config
|
||||||
(load-theme 'doom-vibrant t)
|
(load-theme 'doom-vibrant t)
|
||||||
|
|
||||||
|
|
@ -284,7 +252,7 @@
|
||||||
(setq w32-use-w32-font-dialog t)
|
(setq w32-use-w32-font-dialog t)
|
||||||
|
|
||||||
;; Adaptive fill for everybody!
|
;; Adaptive fill for everybody!
|
||||||
(use-package filladapt :ensure t
|
(use-package filladapt :straight t
|
||||||
:init (setq-default filladapt-mode t))
|
:init (setq-default filladapt-mode t))
|
||||||
|
|
||||||
(require 'ido)
|
(require 'ido)
|
||||||
|
|
@ -293,8 +261,9 @@
|
||||||
(add-hook 'before-save-hook 'whitespace-cleanup)
|
(add-hook 'before-save-hook 'whitespace-cleanup)
|
||||||
|
|
||||||
;; Fix path loading on MacOS X
|
;; Fix path loading on MacOS X
|
||||||
|
(straight-register-package 'exec-path-from-shell)
|
||||||
(when (memq window-system '(mac ns))
|
(when (memq window-system '(mac ns))
|
||||||
(use-package exec-path-from-shell :ensure t)
|
(use-package exec-path-from-shell :straight t)
|
||||||
(exec-path-from-shell-initialize))
|
(exec-path-from-shell-initialize))
|
||||||
|
|
||||||
;;; Stefan Monnier <foo at acm.org>. It is the opposite of fill-paragraph
|
;;; Stefan Monnier <foo at acm.org>. It is the opposite of fill-paragraph
|
||||||
|
|
@ -384,9 +353,9 @@
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
;; clipetty makes the kill ring interact with the terminal.
|
;; clipetty makes the kill ring interact with the terminal.
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
|
(straight-register-package 'clipetty)
|
||||||
(when (getenv "TMUX")
|
(when (getenv "TMUX")
|
||||||
(use-package clipetty
|
(use-package clipetty :straight t
|
||||||
:ensure t
|
|
||||||
:hook (after-init . global-clipetty-mode)))
|
:hook (after-init . global-clipetty-mode)))
|
||||||
|
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
|
|
@ -404,7 +373,7 @@
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
;; Company? Company.
|
;; Company? Company.
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
(use-package company :ensure t
|
(use-package company :straight t
|
||||||
:commands company-mode
|
:commands company-mode
|
||||||
:init
|
:init
|
||||||
;; 2023-08-26: Enable company mode globally.
|
;; 2023-08-26: Enable company mode globally.
|
||||||
|
|
@ -465,7 +434,7 @@
|
||||||
(eq major-mode 'csharp-ts-mode))
|
(eq major-mode 'csharp-ts-mode))
|
||||||
(eglot-format)))
|
(eglot-format)))
|
||||||
|
|
||||||
(use-package eglot :ensure t
|
(use-package eglot :straight t
|
||||||
:commands (eglot-ensure eglot)
|
:commands (eglot-ensure eglot)
|
||||||
:hook
|
:hook
|
||||||
(python-mode . eglot-ensure)
|
(python-mode . eglot-ensure)
|
||||||
|
|
@ -536,11 +505,23 @@
|
||||||
(add-hook 'eglot-connect-hook 'my-eglot-connect-hook))
|
(add-hook 'eglot-connect-hook 'my-eglot-connect-hook))
|
||||||
|
|
||||||
;; NOTE: elgot defers to flymake for error information.
|
;; NOTE: elgot defers to flymake for error information.
|
||||||
(use-package flymake
|
(use-package flymake :straight t
|
||||||
:bind (("C-c n" . 'flymake-goto-next-error)
|
:bind (("C-c n" . 'flymake-goto-next-error)
|
||||||
("C-c p" . 'flymake-goto-prev-error)))
|
("C-c p" . 'flymake-goto-prev-error)))
|
||||||
|
|
||||||
|
|
||||||
|
(defun rebuild-slnx ()
|
||||||
|
"Rebuild the solution file."
|
||||||
|
(interactive)
|
||||||
|
(with-temp-buffer
|
||||||
|
(let ((exit-code (process-file "buck2" nil t nil "run" "//:gen_solution")))
|
||||||
|
(unless (zerop exit-code)
|
||||||
|
(error "Error generating solution (%d): %s" exit-code (buffer-string))))
|
||||||
|
(message "%s" (buffer-string)))
|
||||||
|
(if (and (functionp 'eglot-reconnect)
|
||||||
|
(functionp 'eglot-current-server))
|
||||||
|
(eglot-reconnect (eglot-current-server))))
|
||||||
|
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
;; CC-Mode configuration. Stuff that makes working in IDL, C, and
|
;; CC-Mode configuration. Stuff that makes working in IDL, C, and
|
||||||
;; C++ a whole lot more tolerable.
|
;; C++ a whole lot more tolerable.
|
||||||
|
|
@ -617,7 +598,7 @@ Or, uh, Objective C, I guess."
|
||||||
|
|
||||||
(defun my-c-mode-hook ()
|
(defun my-c-mode-hook ()
|
||||||
"Doty's `c-mode' hook."
|
"Doty's `c-mode' hook."
|
||||||
(c-set-style (if is-fb-environment "fb-c-style" "ms-c"))
|
(c-set-style "ms-c")
|
||||||
(add-hook 'before-save-hook 'clang-format-cpp-buffer))
|
(add-hook 'before-save-hook 'clang-format-cpp-buffer))
|
||||||
|
|
||||||
(add-hook 'c-mode-hook 'my-c-mode-hook)
|
(add-hook 'c-mode-hook 'my-c-mode-hook)
|
||||||
|
|
@ -702,7 +683,7 @@ Or, uh, Objective C, I guess."
|
||||||
;; C#-Mode configuration.
|
;; C#-Mode configuration.
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
|
|
||||||
(use-package csharp-mode :ensure t
|
(use-package csharp-ts-mode :straight nil
|
||||||
|
|
||||||
:preface
|
:preface
|
||||||
(defun my-csharp-mode-hook ()
|
(defun my-csharp-mode-hook ()
|
||||||
|
|
@ -759,7 +740,16 @@ Or, uh, Objective C, I guess."
|
||||||
;; Fix up record indentation (and parameter list indentation too.)
|
;; Fix up record indentation (and parameter list indentation too.)
|
||||||
(push
|
(push
|
||||||
'((parent-is "parameter_list") parent-bol csharp-ts-mode-indent-offset)
|
'((parent-is "parameter_list") parent-bol csharp-ts-mode-indent-offset)
|
||||||
(cdar csharp-ts-mode--indent-rules)))
|
(cdar csharp-ts-mode--indent-rules))
|
||||||
|
(push
|
||||||
|
'((node-is "arrow_expression_clause") parent-bol csharp-ts-mode-indent-offset)
|
||||||
|
(cdar csharp-ts-mode--indent-rules))
|
||||||
|
|
||||||
|
(push
|
||||||
|
'((node-is "type_parameter_constraints_clause") parent-bol csharp-ts-mode-indent-offset)
|
||||||
|
(cdar csharp-ts-mode--indent-rules))
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
;; (use-package csharp-lsp-decompile
|
;; (use-package csharp-lsp-decompile
|
||||||
;; :config
|
;; :config
|
||||||
|
|
@ -819,7 +809,7 @@ Or, uh, Objective C, I guess."
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
;; Elm
|
;; Elm
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
(use-package flycheck-elm :ensure t
|
(use-package flycheck-elm :straight t
|
||||||
:after (flycheck)
|
:after (flycheck)
|
||||||
:config
|
:config
|
||||||
(add-to-list 'flycheck-checkers 'elm))
|
(add-to-list 'flycheck-checkers 'elm))
|
||||||
|
|
@ -836,7 +826,7 @@ Or, uh, Objective C, I guess."
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
;; Flycheck
|
;; Flycheck
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
(use-package flycheck :ensure t
|
(use-package flycheck :straight t
|
||||||
:config
|
:config
|
||||||
(setq-default flycheck-temp-prefix ".flycheck")
|
(setq-default flycheck-temp-prefix ".flycheck")
|
||||||
(setq-default flycheck-disabled-checkers
|
(setq-default flycheck-disabled-checkers
|
||||||
|
|
@ -849,8 +839,6 @@ Or, uh, Objective C, I guess."
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
(defun my-python-mode-hook ()
|
(defun my-python-mode-hook ()
|
||||||
"My hook for `python-mode`."
|
"My hook for `python-mode`."
|
||||||
(when is-fb-environment
|
|
||||||
(flycheck-select-checker `python-fb-flake8))
|
|
||||||
(unless (and (buffer-file-name)
|
(unless (and (buffer-file-name)
|
||||||
(string-match-p "TARGETS" (buffer-file-name)))
|
(string-match-p "TARGETS" (buffer-file-name)))
|
||||||
(blacken-mode)))
|
(blacken-mode)))
|
||||||
|
|
@ -864,7 +852,7 @@ Or, uh, Objective C, I guess."
|
||||||
;; (add-to-list 'interpreter-mode-alist '("python" . python-mode))
|
;; (add-to-list 'interpreter-mode-alist '("python" . python-mode))
|
||||||
;; (add-hook 'python-mode-hook 'my-python-mode-hook))
|
;; (add-hook 'python-mode-hook 'my-python-mode-hook))
|
||||||
|
|
||||||
(use-package blacken :ensure t
|
(use-package blacken :straight t
|
||||||
:commands (blacken-mode)
|
:commands (blacken-mode)
|
||||||
:hook (python-mode . blacken-mode))
|
:hook (python-mode . blacken-mode))
|
||||||
|
|
||||||
|
|
@ -879,7 +867,7 @@ Or, uh, Objective C, I guess."
|
||||||
;; Bazel Support
|
;; Bazel Support
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
|
|
||||||
(use-package bazel :ensure t
|
(use-package bazel :straight t
|
||||||
:mode (("/\\.bazelignore\\'" . bazelignore-mode)
|
:mode (("/\\.bazelignore\\'" . bazelignore-mode)
|
||||||
("/\\(?:\\(?:bazel\\)?\\.bazelrc\\)\\'" . bazelrc-mode)
|
("/\\(?:\\(?:bazel\\)?\\.bazelrc\\)\\'" . bazelrc-mode)
|
||||||
("/.+\\.bzl\\'" . bazel-starlark-mode)
|
("/.+\\.bzl\\'" . bazel-starlark-mode)
|
||||||
|
|
@ -997,7 +985,7 @@ Or, uh, Objective C, I guess."
|
||||||
;; (add-hook 'project-find-functions #'project-find-go-module)
|
;; (add-hook 'project-find-functions #'project-find-go-module)
|
||||||
;;-----
|
;;-----
|
||||||
|
|
||||||
(use-package go-mode :ensure t
|
(use-package go-mode :straight t
|
||||||
:mode "\\.go\\'"
|
:mode "\\.go\\'"
|
||||||
:config
|
:config
|
||||||
(add-hook 'before-save-hook 'gofmt-before-save))
|
(add-hook 'before-save-hook 'gofmt-before-save))
|
||||||
|
|
@ -1021,7 +1009,7 @@ Or, uh, Objective C, I guess."
|
||||||
(my--fix-aspell)
|
(my--fix-aspell)
|
||||||
(require 'ox-quip))
|
(require 'ox-quip))
|
||||||
|
|
||||||
(use-package org
|
(use-package org :straight t
|
||||||
:mode ("\\.org\\'" . org-mode)
|
:mode ("\\.org\\'" . org-mode)
|
||||||
:bind (:map org-mode-map
|
:bind (:map org-mode-map
|
||||||
("C-c l" . org-store-link)
|
("C-c l" . org-store-link)
|
||||||
|
|
@ -1054,16 +1042,16 @@ Or, uh, Objective C, I guess."
|
||||||
;; (tide-hl-identifier-mode)
|
;; (tide-hl-identifier-mode)
|
||||||
;; (eldoc-mode +1)))
|
;; (eldoc-mode +1)))
|
||||||
|
|
||||||
(use-package typescript-mode :ensure t
|
(use-package typescript-mode :straight t
|
||||||
;; 2023-09-03 Trying eglot instead of TIDE for now.
|
;; 2023-09-03 Trying eglot instead of TIDE for now.
|
||||||
;; :config
|
;; :config
|
||||||
;; (add-hook 'typescript-mode-hook 'ts/enable-eglot-or-tide)
|
;; (add-hook 'typescript-mode-hook 'ts/enable-eglot-or-tide)
|
||||||
)
|
)
|
||||||
|
|
||||||
(use-package add-node-modules-path :ensure t
|
(use-package add-node-modules-path :straight t
|
||||||
:hook (typescript-mode . add-node-modules-path))
|
:hook (typescript-mode . add-node-modules-path))
|
||||||
|
|
||||||
(use-package prettier-js :ensure t
|
(use-package prettier-js :straight t
|
||||||
:hook (typescript-mode . prettier-js-mode))
|
:hook (typescript-mode . prettier-js-mode))
|
||||||
|
|
||||||
;; 2023-09-03 Trying eglot instead of TIDE for now.
|
;; 2023-09-03 Trying eglot instead of TIDE for now.
|
||||||
|
|
@ -1091,30 +1079,10 @@ Or, uh, Objective C, I guess."
|
||||||
(vv (cadr spev)))
|
(vv (cadr spev)))
|
||||||
(setenv vn vv))))
|
(setenv vn vv))))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;; ;; =================================================================
|
|
||||||
;; ;; PHP stuff
|
|
||||||
;; ;; =================================================================
|
|
||||||
;; (if is-fb-environment
|
|
||||||
;; (progn
|
|
||||||
;; ;; Hack support for stuff in www
|
|
||||||
;; (setq hack-for-hiphop-root (expand-file-name "www" "~"))
|
|
||||||
;; ;;(load "/home/engshare/tools/hack-for-hiphop")
|
|
||||||
|
|
||||||
;; (load-library "/usr/share/emacs/site-lisp/emacs-packages/hh-client.el")
|
|
||||||
;; (require 'hh-client)
|
|
||||||
|
|
||||||
;; (defun my-fb-php-hook ()
|
|
||||||
;; (global-set-key (kbd "M-.") 'hh-client-find-definition))
|
|
||||||
;; (add-hook 'php-mode-hook 'my-fb-php-hook)
|
|
||||||
;; ))
|
|
||||||
|
|
||||||
|
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
;; Magit stuff
|
;; Magit stuff
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
(use-package magit :ensure t
|
(use-package magit :straight t
|
||||||
:bind (("C-x g" . magit-status)
|
:bind (("C-x g" . magit-status)
|
||||||
("C-c g" . magit-dispatch)
|
("C-c g" . magit-dispatch)
|
||||||
("C-c f" . magit-file-dispatch)))
|
("C-c f" . magit-file-dispatch)))
|
||||||
|
|
@ -1122,15 +1090,14 @@ Or, uh, Objective C, I guess."
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
;; Mercurial stuff
|
;; Mercurial stuff
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
;; I remove Hg from VC-mode because it is SO SLOW.
|
;; ;; I remove Hg from VC-mode because it is SO SLOW.
|
||||||
(setq vc-handled-backends (remove 'Hg vc-handled-backends))
|
;; (setq vc-handled-backends (remove 'Hg vc-handled-backends))
|
||||||
;; But I have monky enabled so I can use it instead.
|
;; ;; But I have monky enabled so I can use it instead.
|
||||||
(use-package monky
|
;; (use-package monky :straight t
|
||||||
:ensure t
|
;; :config
|
||||||
:config
|
;; (setq monky-process-type 'cmdserver)
|
||||||
(setq monky-process-type 'cmdserver)
|
;; :bind
|
||||||
:bind
|
;; ("C-x h" . monky-status))
|
||||||
("C-x h" . monky-status))
|
|
||||||
|
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
;; Shell stuff
|
;; Shell stuff
|
||||||
|
|
@ -1148,7 +1115,7 @@ Or, uh, Objective C, I guess."
|
||||||
(add-hook 'shell-mode-hook 'my-shell-mode-hook)
|
(add-hook 'shell-mode-hook 'my-shell-mode-hook)
|
||||||
|
|
||||||
;; xterm-color
|
;; xterm-color
|
||||||
(use-package xterm-color :ensure t
|
(use-package xterm-color :straight t
|
||||||
:config
|
:config
|
||||||
(add-hook 'comint-preoutput-filter-functions 'xterm-color-filter)
|
(add-hook 'comint-preoutput-filter-functions 'xterm-color-filter)
|
||||||
(setq comint-output-filter-functions
|
(setq comint-output-filter-functions
|
||||||
|
|
@ -1186,25 +1153,33 @@ Or, uh, Objective C, I guess."
|
||||||
"My hook for markdown mode."
|
"My hook for markdown mode."
|
||||||
(turn-off-auto-fill)
|
(turn-off-auto-fill)
|
||||||
(setq truncate-lines nil)
|
(setq truncate-lines nil)
|
||||||
(setq word-wrap 't)
|
(setq word-wrap 't))
|
||||||
(when is-fb-environment
|
|
||||||
(require 'fb-note-publish)))
|
|
||||||
|
|
||||||
(use-package markdown-mode :ensure t
|
(use-package markdown-mode :straight t
|
||||||
:mode "\\.md\\'"
|
:mode "\\.md\\'"
|
||||||
:config (add-hook 'markdown-mode-hook 'my-markdown-mode-hook))
|
:config (add-hook 'markdown-mode-hook 'my-markdown-mode-hook))
|
||||||
|
|
||||||
(use-package adaptive-wrap :ensure t
|
(use-package adaptive-wrap :straight t
|
||||||
:commands adaptive-wrap-prefix-mode
|
:commands adaptive-wrap-prefix-mode
|
||||||
:init
|
:init
|
||||||
(add-hook 'markdown-mode-hook 'adaptive-wrap-prefix-mode)
|
(add-hook 'markdown-mode-hook 'adaptive-wrap-prefix-mode)
|
||||||
(add-hook 'visual-line-mode-hook 'adaptive-wrap-prefix-mode))
|
(add-hook 'visual-line-mode-hook 'adaptive-wrap-prefix-mode))
|
||||||
|
|
||||||
|
(use-package poly-markdown :straight t
|
||||||
|
:init
|
||||||
|
(add-hook 'markdown-mode-hook 'poly-markdown-mode)
|
||||||
|
:config
|
||||||
|
;; NOTE: This hook is required to keep from resetting the line-wrap stuff every time we switch modes.
|
||||||
|
(add-hook 'polymode-after-switch-buffer-hook
|
||||||
|
(lambda (_old _new)
|
||||||
|
(setq truncate-lines nil)
|
||||||
|
(setq word-wrap t)
|
||||||
|
(visual-line-mode 1))))
|
||||||
|
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
;; Rust
|
;; Rust
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
(use-package rust-mode :ensure t
|
(use-package rust-mode :straight t
|
||||||
:mode "\\.rs\\'"
|
:mode "\\.rs\\'"
|
||||||
:commands rust-format-buffer ; 2023-10-26 Make this command available even when the mode isn't used.
|
:commands rust-format-buffer ; 2023-10-26 Make this command available even when the mode isn't used.
|
||||||
:config
|
:config
|
||||||
|
|
@ -1226,11 +1201,12 @@ Or, uh, Objective C, I guess."
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
;; Clojure
|
;; Clojure
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
(use-package clojure-mode :ensure t
|
(straight-register-package 'cider)
|
||||||
|
(use-package clojure-mode :straight t
|
||||||
:mode (("\\.clj\\'" . clojure-mode)
|
:mode (("\\.clj\\'" . clojure-mode)
|
||||||
("\\.edn\\'" . clojure-mode))
|
("\\.edn\\'" . clojure-mode))
|
||||||
:config
|
:config
|
||||||
(use-package cider :ensure t
|
(use-package cider :straight t
|
||||||
:config
|
:config
|
||||||
;; Put TARGETS in clojure-build-tool-files so that directories with TARGETS
|
;; Put TARGETS in clojure-build-tool-files so that directories with TARGETS
|
||||||
;; get identified as projects.
|
;; get identified as projects.
|
||||||
|
|
@ -1242,7 +1218,7 @@ Or, uh, Objective C, I guess."
|
||||||
;; ================================================================
|
;; ================================================================
|
||||||
;; TRAMP
|
;; TRAMP
|
||||||
;; ================================================================
|
;; ================================================================
|
||||||
(use-package tramp
|
(use-package tramp :straight t
|
||||||
:config
|
:config
|
||||||
;; Since we're going to be doing this a lot, the minibar message tramp
|
;; Since we're going to be doing this a lot, the minibar message tramp
|
||||||
;; spits out for every file access is both spammy, distracting, and often
|
;; spits out for every file access is both spammy, distracting, and often
|
||||||
|
|
@ -1284,16 +1260,8 @@ Or, uh, Objective C, I guess."
|
||||||
;; ================================================================
|
;; ================================================================
|
||||||
;; Zig
|
;; Zig
|
||||||
;; ================================================================
|
;; ================================================================
|
||||||
(use-package zig-mode :ensure t
|
(use-package zig-mode :straight t
|
||||||
:mode (("\\.zig\\'" . zig-mode))
|
:mode (("\\.zig\\'" . zig-mode)))
|
||||||
:config
|
|
||||||
(require 'lsp) ;; There's a use-package somewhere else...?
|
|
||||||
(add-to-list 'lsp-language-id-configuration '(zig-mode . "zig"))
|
|
||||||
(lsp-register-client
|
|
||||||
(make-lsp-client
|
|
||||||
:new-connection (lsp-stdio-connection "<path to zls>")
|
|
||||||
:major-modes '(zig-mode)
|
|
||||||
:server-id 'zls)))
|
|
||||||
|
|
||||||
;; ================================================================
|
;; ================================================================
|
||||||
;; Pico-8
|
;; Pico-8
|
||||||
|
|
@ -1304,7 +1272,8 @@ Or, uh, Objective C, I guess."
|
||||||
(setq lua-indent-level 1)
|
(setq lua-indent-level 1)
|
||||||
(set-fill-column 32))
|
(set-fill-column 32))
|
||||||
|
|
||||||
(use-package pico8-mode
|
(use-package pico8-mode ;; :straight t (site-lisp)
|
||||||
|
:straight (pico8-mode :type git :host github :repo "Kaali/pico8-mode")
|
||||||
:mode (("\\.p8\\'" . pico8-mode))
|
:mode (("\\.p8\\'" . pico8-mode))
|
||||||
:config (add-hook 'pico8-mode-hook 'my-pico8-hook))
|
:config (add-hook 'pico8-mode-hook 'my-pico8-hook))
|
||||||
|
|
||||||
|
|
@ -1319,7 +1288,7 @@ Or, uh, Objective C, I guess."
|
||||||
(setq truncate-lines nil)
|
(setq truncate-lines nil)
|
||||||
(visual-line-mode))
|
(visual-line-mode))
|
||||||
|
|
||||||
(use-package ink-mode :ensure t
|
(use-package ink-mode :straight t
|
||||||
:mode (("\\.ink\\'" . ink-mode))
|
:mode (("\\.ink\\'" . ink-mode))
|
||||||
:bind (:map ink-mode-map
|
:bind (:map ink-mode-map
|
||||||
("M-." . ink-follow-link-at-point)
|
("M-." . ink-follow-link-at-point)
|
||||||
|
|
@ -1341,7 +1310,7 @@ Or, uh, Objective C, I guess."
|
||||||
((file-directory-p "/mnt/c/Users/john/Dropbox") "/mnt/c/Users/john/Dropbox")))
|
((file-directory-p "/mnt/c/Users/john/Dropbox") "/mnt/c/Users/john/Dropbox")))
|
||||||
"Where is my dropbox?")
|
"Where is my dropbox?")
|
||||||
|
|
||||||
(use-package howm :ensure t
|
(use-package howm :straight t
|
||||||
:init
|
:init
|
||||||
;; Directory configuration
|
;; Directory configuration
|
||||||
;;
|
;;
|
||||||
|
|
@ -1377,31 +1346,31 @@ Or, uh, Objective C, I guess."
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
;; Protocol Buffers
|
;; Protocol Buffers
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
(use-package protobuf-mode :ensure t)
|
(use-package protobuf-mode :straight t)
|
||||||
|
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
;; Deadgrep for searching
|
;; Deadgrep for searching
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
(use-package deadgrep :ensure t
|
(use-package deadgrep :straight t
|
||||||
:bind ("C-c d" . deadgrep))
|
:bind ("C-c d" . deadgrep))
|
||||||
|
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
;; Terraform
|
;; Terraform
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
(use-package terraform-mode :ensure t
|
(use-package terraform-mode :straight t
|
||||||
:mode "\\.tf(vars)?\\'"
|
:mode "\\.tf(vars)?\\'"
|
||||||
:config (add-hook 'terraform-mode-hook #'terraform-format-on-save-mode))
|
:config (add-hook 'terraform-mode-hook #'terraform-format-on-save-mode))
|
||||||
|
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
;; Earthly
|
;; Earthly
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
(use-package earthfile-mode :ensure t
|
(use-package earthfile-mode :straight t
|
||||||
:mode ("\\.earth\\'" "Earthfile\\'"))
|
:mode ("\\.earth\\'" "Earthfile\\'"))
|
||||||
|
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
;; Java
|
;; Java
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
(use-package eglot-java :ensure t
|
(use-package eglot-java :straight t
|
||||||
:after (eglot)
|
:after (eglot)
|
||||||
:hook
|
:hook
|
||||||
(java-mode . eglot-java-mode))
|
(java-mode . eglot-java-mode))
|
||||||
|
|
@ -1409,18 +1378,18 @@ Or, uh, Objective C, I guess."
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
;; SQL?
|
;; SQL?
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
(use-package sql-indent :ensure t)
|
(use-package sql-indent :straight t)
|
||||||
|
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
;; Swift
|
;; Swift
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
(use-package swift-mode :ensure t
|
(use-package swift-mode :straight t
|
||||||
:mode "\\.swift\\(interface\\)?\\'")
|
:mode "\\.swift\\(interface\\)?\\'")
|
||||||
|
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
;; Scala
|
;; Scala
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
(use-package scala-ts-mode :ensure t
|
(use-package scala-ts-mode :straight t
|
||||||
:mode "\\.scala\\'"
|
:mode "\\.scala\\'"
|
||||||
:interpreter ("scala" . scala-mode)
|
:interpreter ("scala" . scala-mode)
|
||||||
)
|
)
|
||||||
|
|
@ -1437,81 +1406,89 @@ Do this when you edit your project view."
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
;; Jsonnet
|
;; Jsonnet
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
(use-package jsonnet-mode :ensure t
|
(use-package jsonnet-mode :straight t
|
||||||
:mode "\\.jsonnet\\(\\.TEMPLATE\\)?\\'")
|
:mode "\\.jsonnet\\(\\.TEMPLATE\\)?\\'")
|
||||||
|
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
;; Fish shell
|
;; Fish shell
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
(use-package fish-mode :ensure)
|
(use-package fish-mode :straight t)
|
||||||
|
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
;; AI Shit
|
;; AI Shit
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
(defun claude-get-api-key ()
|
(use-package claude-code-ide
|
||||||
"Get Claude API key from ~/.config/io.datasette.llm/keys.json file."
|
:straight (:type git :host github :repo "manzaltu/claude-code-ide.el")
|
||||||
(let* ((keys-file (expand-file-name "~/.config/io.datasette.llm/keys.json"))
|
:bind ("C-c C-'" . claude-code-ide-menu) ; Set your favorite keybinding
|
||||||
(json-object-type 'hash-table)
|
|
||||||
(json-array-type 'list)
|
|
||||||
(json-key-type 'string))
|
|
||||||
(if (file-exists-p keys-file)
|
|
||||||
(let* ((json-data (with-temp-buffer
|
|
||||||
(insert-file-contents keys-file)
|
|
||||||
(json-read-from-string (buffer-string))))
|
|
||||||
(claude-key (gethash "claude" json-data)))
|
|
||||||
(if claude-key
|
|
||||||
claude-key
|
|
||||||
(error "Claude API key not found in keys.json")))
|
|
||||||
(error "Key file keys.json file not found at %s" keys-file))))
|
|
||||||
|
|
||||||
(defconst my/gptel-databricks-path
|
|
||||||
(expand-file-name "~/universe/experimental/john.doty/gptel-databricks/")
|
|
||||||
"The path to the databricks gptel backend.")
|
|
||||||
|
|
||||||
(defconst my/has-gptel-databricks
|
|
||||||
(file-exists-p my/gptel-databricks-path)
|
|
||||||
"Whether or not we have the databricks gptel backend.")
|
|
||||||
|
|
||||||
(defconst my/gptel-backend
|
|
||||||
(if my/has-gptel-databricks
|
|
||||||
(progn
|
|
||||||
(add-to-list 'load-path (directory-file-name my/gptel-databricks-path))
|
|
||||||
(require 'gptel-databricks)
|
|
||||||
(gptel-make-databricks "Databricks" :stream t))
|
|
||||||
(gptel-make-anthropic "Claude"
|
|
||||||
:stream t
|
|
||||||
:key #'claude-get-api-key
|
|
||||||
:request-params '(:thinking (:type "enabled" :budget_tokens 2048)
|
|
||||||
:max_tokens 4096)))
|
|
||||||
"The right backend based on my environment.")
|
|
||||||
|
|
||||||
(defconst my/gptel-model
|
|
||||||
(if my/has-gptel-databricks
|
|
||||||
'claude-3-7-sonnet-internal-tools
|
|
||||||
'claude-3-7-sonnet-20250219)
|
|
||||||
"Which model do we want by default?")
|
|
||||||
|
|
||||||
(use-package gptel :ensure
|
|
||||||
:bind (:map gptel-mode-map
|
|
||||||
("C-c C-g" . gptel-menu)
|
|
||||||
("C-c C-t" . gptel-tools))
|
|
||||||
|
|
||||||
:commands (gptel gptel-menu gptel-tools)
|
|
||||||
:config
|
:config
|
||||||
|
(setq claude-code-ide-terminal-backend 'eat)
|
||||||
|
(setq claude-code-ide-use-side-window nil)
|
||||||
|
(claude-code-ide-emacs-tools-setup)) ; Optionally enable Emacs MCP tools
|
||||||
|
|
||||||
(setq
|
;; (defun claude-get-api-key ()
|
||||||
gptel-model my/gptel-model ; "claude-3-opus-20240229" also available
|
;; "Get Claude API key from ~/.config/io.datasette.llm/keys.json file."
|
||||||
gptel-backend my/gptel-backend)
|
;; (let* ((keys-file (expand-file-name "~/.config/io.datasette.llm/keys.json"))
|
||||||
(if (file-exists-p "~/llm-hints.md")
|
;; (json-object-type 'hash-table)
|
||||||
(gptel-add-file (expand-file-name "~/llm-hints.md")))
|
;; (json-array-type 'list)
|
||||||
(require 'doty-tools)
|
;; (json-key-type 'string))
|
||||||
(require 'doty-tools-buffer-map))
|
;; (if (file-exists-p keys-file)
|
||||||
|
;; (let* ((json-data (with-temp-buffer
|
||||||
|
;; (insert-file-contents keys-file)
|
||||||
|
;; (json-read-from-string (buffer-string))))
|
||||||
|
;; (claude-key (gethash "claude" json-data)))
|
||||||
|
;; (if claude-key
|
||||||
|
;; claude-key
|
||||||
|
;; (error "Claude API key not found in keys.json")))
|
||||||
|
;; (error "Key file keys.json file not found at %s" keys-file))))
|
||||||
|
|
||||||
|
;; (defconst my/gptel-databricks-path
|
||||||
|
;; (expand-file-name "~/universe/experimental/john.doty/gptel-databricks/")
|
||||||
|
;; "The path to the databricks gptel backend.")
|
||||||
|
|
||||||
|
;; (defconst my/has-gptel-databricks
|
||||||
|
;; (file-exists-p my/gptel-databricks-path)
|
||||||
|
;; "Whether or not we have the databricks gptel backend.")
|
||||||
|
|
||||||
|
;; (defconst my/gptel-backend
|
||||||
|
;; (if my/has-gptel-databricks
|
||||||
|
;; (progn
|
||||||
|
;; (add-to-list 'load-path (directory-file-name my/gptel-databricks-path))
|
||||||
|
;; (require 'gptel-databricks)
|
||||||
|
;; (gptel-make-databricks "Databricks" :stream t))
|
||||||
|
;; (gptel-make-anthropic "Claude"
|
||||||
|
;; :stream t
|
||||||
|
;; :key #'claude-get-api-key
|
||||||
|
;; :request-params '(:thinking (:type "enabled" :budget_tokens 2048)
|
||||||
|
;; :max_tokens 4096)))
|
||||||
|
;; "The right backend based on my environment.")
|
||||||
|
|
||||||
|
;; (defconst my/gptel-model
|
||||||
|
;; (if my/has-gptel-databricks
|
||||||
|
;; 'claude-3-7-sonnet-internal-tools
|
||||||
|
;; 'claude-3-7-sonnet-20250219)
|
||||||
|
;; "Which model do we want by default?")
|
||||||
|
|
||||||
|
;; (use-package gptel :straight t
|
||||||
|
;; :bind (:map gptel-mode-map
|
||||||
|
;; ("C-c C-g" . gptel-menu)
|
||||||
|
;; ("C-c C-t" . gptel-tools))
|
||||||
|
|
||||||
|
;; :commands (gptel gptel-menu gptel-tools)
|
||||||
|
;; :config
|
||||||
|
|
||||||
|
;; (setq
|
||||||
|
;; gptel-model my/gptel-model ; "claude-3-opus-20240229" also available
|
||||||
|
;; gptel-backend my/gptel-backend)
|
||||||
|
;; (if (file-exists-p "~/llm-hints.md")
|
||||||
|
;; (gptel-add-file (expand-file-name "~/llm-hints.md")))
|
||||||
|
;; (require 'doty-tools)
|
||||||
|
;; (require 'doty-tools-buffer-map))
|
||||||
|
|
||||||
|
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
;; Debugging
|
;; Debugging
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
(use-package dap-mode :ensure
|
(use-package dap-mode :straight t
|
||||||
:commands dap-debug
|
:commands dap-debug
|
||||||
:config
|
:config
|
||||||
(require 'dap-netcore))
|
(require 'dap-netcore))
|
||||||
|
|
@ -1519,13 +1496,18 @@ Do this when you edit your project view."
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
;; WGSL
|
;; WGSL
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
(use-package wgsl-mode :ensure
|
(use-package wgsl-mode :straight t
|
||||||
:mode "\\.wgsl\\'")
|
:mode "\\.wgsl\\'")
|
||||||
|
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
;; HLSL
|
;; HLSL
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
(use-package hlsl-mode
|
(use-package hlsl-mode :straight nil
|
||||||
:mode "\\.hlsl\\'")
|
:mode "\\.hlsl\\'")
|
||||||
|
|
||||||
|
;; =================================================================
|
||||||
|
;; Terminal
|
||||||
|
;; =================================================================
|
||||||
|
(use-package eat :straight t)
|
||||||
|
|
||||||
;;; init.el ends here
|
;;; init.el ends here
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue