From eddc04b22422f068669611d450a59fb20d7f3509 Mon Sep 17 00:00:00 2001 From: Kyle Isom Date: Fri, 11 Apr 2025 09:02:39 -0700 Subject: [PATCH] cleaning up code should be able to bootstrap from scratch. the problem child right now is go-mode. --- ensure.el | 11 +++-------- init.el | 41 ++++++++--------------------------------- 2 files changed, 11 insertions(+), 41 deletions(-) diff --git a/ensure.el b/ensure.el index 268565c..bd74e50 100644 --- a/ensure.el +++ b/ensure.el @@ -8,15 +8,10 @@ (let ((initial-package-list '(auto-complete c-eldoc - cargo - cider ellama elpy + exec-path-from-shell geiser - go ;; play the game - go-autocomplete - go-direx - go-guru go-mode gruvbox-theme ;; irfc @@ -33,10 +28,10 @@ paredit pelican-mode projectile - racket-mode - rust-mode scpaste slime undo-tree))) + (when (executable-find "racket") + (setf initial-package-list (append initial-package-list '(racket-mode)))) (dolist (package initial-package-list) (ensure-package package))) diff --git a/init.el b/init.el index dcd35c1..79606b9 100644 --- a/init.el +++ b/init.el @@ -2,6 +2,7 @@ ;;; (global-font-lock-mode 0) (require 'cl-lib) +(setq debug-on-error t) (defun localize-path (path) "If the path is relative, place it in the user's home directory." @@ -10,16 +11,11 @@ path (expand-file-name path home-dir)))) -(defun remove-if-not (tst lst) - "(remove-if-not tst lst) -Returns a list with all items for which tst is false removed from lst." - (mapcan #'(lambda (x) (when (funcall tst x) (list x))) lst)) - (defun localize-and-filter (paths) "Given a list of paths, localize them and remove any that aren't present on disk." - (remove-if-not #'file-exists-p - (mapcar #'localize-path paths))) + (cl-remove-if-not #'file-exists-p + (mapcar #'localize-path paths))) (defun cache-path (path) "Return a localized, expanded path within the emacs cache directory." @@ -128,6 +124,7 @@ present on disk." (elpy-enable) ;; golang stuff +;; disabled while I debug some packages (setq gofmt-command "goimports") (require 'go-mode) (add-hook 'before-save-hook 'gofmt-before-save) @@ -220,37 +217,15 @@ present on disk." ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(ansi-color-names-vector - ["#2d3743" "#ff4242" "#74af68" "#dbdb95" "#34cae2" "#008b8b" "#00ede1" - "#e1e1e0"]) + ["#2d3743" "#ff4242" "#74af68" "#dbdb95" "#34cae2" "#008b8b" "#00ede1" "#e1e1e0"]) '(chess-default-display 'chess-plain) '(custom-safe-themes - '("5a0ddbd75929d24f5ef34944d78789c6c3421aa943c15218bac791c199fc897d" - "5aedf993c7220cbbe66a410334239521d8ba91e1815f6ebde59cecc2355d7757" - "75b371fce3c9e6b1482ba10c883e2fb813f2cc1c88be0b8a1099773eb78a7176" - "18a1d83b4e16993189749494d75e6adb0e15452c80c431aca4a867bcc8890ca9" - "8363207a952efb78e917230f5a4d3326b2916c63237c1f61d7e5fe07def8d378" - "51fa6edfd6c8a4defc2681e4c438caf24908854c12ea12a1fbfd4d055a9647a3" - "d5fd482fcb0fe42e849caba275a01d4925e422963d1cd165565b31d3f4189c87" - "4c7228157ba3a48c288ad8ef83c490b94cb29ef01236205e360c2c4db200bb18" - "7b8f5bbdc7c316ee62f271acf6bcd0e0b8a272fdffe908f8c920b0ba34871d98" - "37768a79b479684b0756dec7c0fc7652082910c37d8863c35b702db3f16000f8" - "bf390ecb203806cbe351b966a88fc3036f3ff68cd2547db6ee3676e87327b311" - "e1943fd6568d49ec819ee3711c266a8a120e452ba08569045dd8f50cc5ec5dd3" - "4561c67b0764aa6343d710bb0a6f3a96319252b2169d371802cc94adfea5cfc9" - "5f95ce79b4a8870b3486b04de22ca2e0785b287da8779f512cdd847f42266989" - default)) + '("5a0ddbd75929d24f5ef34944d78789c6c3421aa943c15218bac791c199fc897d" "5aedf993c7220cbbe66a410334239521d8ba91e1815f6ebde59cecc2355d7757" "75b371fce3c9e6b1482ba10c883e2fb813f2cc1c88be0b8a1099773eb78a7176" "18a1d83b4e16993189749494d75e6adb0e15452c80c431aca4a867bcc8890ca9" "8363207a952efb78e917230f5a4d3326b2916c63237c1f61d7e5fe07def8d378" "51fa6edfd6c8a4defc2681e4c438caf24908854c12ea12a1fbfd4d055a9647a3" "d5fd482fcb0fe42e849caba275a01d4925e422963d1cd165565b31d3f4189c87" "4c7228157ba3a48c288ad8ef83c490b94cb29ef01236205e360c2c4db200bb18" "7b8f5bbdc7c316ee62f271acf6bcd0e0b8a272fdffe908f8c920b0ba34871d98" "37768a79b479684b0756dec7c0fc7652082910c37d8863c35b702db3f16000f8" "bf390ecb203806cbe351b966a88fc3036f3ff68cd2547db6ee3676e87327b311" "e1943fd6568d49ec819ee3711c266a8a120e452ba08569045dd8f50cc5ec5dd3" "4561c67b0764aa6343d710bb0a6f3a96319252b2169d371802cc94adfea5cfc9" "5f95ce79b4a8870b3486b04de22ca2e0785b287da8779f512cdd847f42266989" default)) '(custom-theme-directory "~/.emacs.d/themes") '(ellama-sessions-directory (cache-path "ellama-sessions")) '(global-font-lock-mode t) '(package-selected-packages - '(arduino-mode cargo chatgpt-shell cider dockerfile-mode ellama elpy - exec-path-from-shell geiser go go-autocomplete - go-direx go-guru graphviz-dot-mode gruvbox-theme - keychain-environment lua-mode luarocks magit mwim - nord-theme ollama-buddy org-ai paredit pelican-mode - projectile protobuf-mode racket-mode rust-mode - scpaste slime swift-mode swift3-mode terraform-mode - treemacs undo-tree xcscope))) + '(mwim undo-tree slime scpaste racket-mode projectile pelican-mode paredit nixos-options nix-ts-mode nix-modeline nix-mode markdown-mode magit luarocks lua-mode keychain-environment gruvbox-theme geiser exec-path-from-shell elpy ellama c-eldoc auto-complete))) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. @@ -294,7 +269,7 @@ p :publishing-directory "/ssh:phobos.wntrmute.net:/var/www/sites/tmp/" test equal data ( "titan.local" 16 ;; 16" MBP - "ono-sendai" 12 ;; 12.5" X230 + "ono-sendai" 13 ;; 12.5" X230 "imladris" 18 ;; 14" X1 carbon )))