This commit is contained in:
2026-08-29 16:14:49 -06:00
parent 0a0db21234
commit 75873656c9

67
init.el
View File

@@ -9,7 +9,7 @@
(setq visible-bell nil) (setq visible-bell nil)
(setq ring-bell-function 'ignore) (setq ring-bell-function 'ignore)
(setq shell-file-name "/bin/bash") (setq shell-file-name "/bin/bash")
(setq shell-command-switch "-c") (setq shell-command-switch "-ic")
(setq indent-tabs-mode nil) (setq indent-tabs-mode nil)
(setq require-final-newline t) (setq require-final-newline t)
(setq frame-inhibit-implied-resize t) (setq frame-inhibit-implied-resize t)
@@ -255,30 +255,30 @@
(add-to-list 'auto-mode-alist '("\\.pm$" . cperl-mode)) (add-to-list 'auto-mode-alist '("\\.pm$" . cperl-mode))
(add-to-list 'auto-mode-alist '("\\.pl$" . cperl-mode)) (add-to-list 'auto-mode-alist '("\\.pl$" . cperl-mode))
(add-to-list 'auto-mode-alist '("\\.psgi$" . cperl-mode)) (add-to-list 'auto-mode-alist '("\\.psgi$" . cperl-mode))
(setq cperl-basic-offset 4) (setq cperl-basic-offset 2)
(add-hook 'cperl-mode-hook (add-hook 'cperl-mode-hook
(lambda () (lambda ()
(add-hook 'before-save-hook #'perltidy-buffer nil t))) (add-hook 'before-save-hook #'perltidy-buffer nil t)))
(setq flycheck-perl-include-path '()) (let ((local-perl-path (expand-file-name "~/perl5/lib/perl5")))
(when (file-directory-p "~/perl5/perlbrew") (setenv "PERL5LIB" local-perl-path)
(let ((rf-perl-version (shell-command-to-string "source ~/.bashrc && perl -e 'print($^V =~ s/v//r)' 2> /dev/null"))) (setenv "PERL_LOCAL_LIB_ROOT" (expand-file-name "~/perl5"))
;; Strip any trailing newlines from shell command output (setenv "PERL_MB_OPT" "--install_base ~/perl5")
(setq rf-perl-version (string-trim rf-perl-version)) (setenv "PERL_MM_OPT" "INSTALL_BASE=~/perl5")
(when (not (string-empty-p rf-perl-version)) ;; Update Emacs' executable paths so it finds local binaries (like cpanm)
(add-to-list 'flycheck-perl-include-path (setenv "PATH" (concat (expand-file-name "~/perl5/bin:") (getenv "PATH")))
(expand-file-name (format "~/perl5/perlbrew/perls/perl-%s/lib/%s" rf-perl-version rf-perl-version)))))) (add-to-list 'exec-path (expand-file-name "~/perl5/bin")))
(require 'projectile) (require 'projectile)
(defun flycheck-perllib-init () (defun flycheck-perllib-init ()
"Dynamically add local project lib path to Flycheck without overwriting global paths." "Dynamically add local project lib path to Flycheck without overwriting global paths."
(let ((root (or (and (fboundp 'projectile-project-root) (projectile-project-root)) (let ((root (or (and (fboundp 'projectile-project-root) (projectile-project-root))
(and (fboundp 'project-current) (project-current) (project-root (project-current)))))) (and (fboundp 'project-current) (project-current) (project-root (project-current))))))
(when root (when root
(let ((local-lib (expand-file-name "lib" root))) (let ((local-lib (expand-file-name "lib" root)))
(make-local-variable 'flycheck-perl-include-path)
(add-to-list 'flycheck-perl-include-path "~/perl5/lib/perl5/")
(when (file-directory-p local-lib) (when (file-directory-p local-lib)
(make-local-variable 'flycheck-perl-include-path)
(add-to-list 'flycheck-perl-include-path local-lib)))))) (add-to-list 'flycheck-perl-include-path local-lib))))))
(add-hook 'cperl-mode-hook #'flycheck-perllib-init) (add-hook 'cperl-mode-hook #'flycheck-perllib-init)
@@ -417,9 +417,48 @@
;; If you edit it by hand, you could mess it up, so be careful. ;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance. ;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right. ;; If there is more than one, they won't work right.
'(custom-enabled-themes '(doom-gruvbox)) '(custom-enabled-themes '(modus-vivendi))
'(custom-safe-themes '(custom-safe-themes
'("38b43b865e2be4fe80a53d945218318d0075c5e01ddf102e9bec6e90d57e2134" "e4a702e262c3e3501dfe25091621fe12cd63c7845221687e36a79e17cf3a67e0" "b99ff6bfa13f0273ff8d0d0fd17cc44fab71dfdc293c7a8528280e690f084ef0" "3061706fa92759264751c64950df09b285e3a2d3a9db771e99bcbb2f9b470037" "e14289199861a5db890065fdc5f3d3c22c5bac607e0dbce7f35ce60e6b55fc52" "7c3d62a64bafb2cc95cd2de70f7e4446de85e40098ad314ba2291fc07501b70c" "1f292969fc19ba45fbc6542ed54e58ab5ad3dbe41b70d8cb2d1f85c22d07e518" "4d5d11bfef87416d85673947e3ca3d3d5d985ad57b02a7bb2e32beaf785a100e" "4594d6b9753691142f02e67b8eb0fda7d12f6cc9f1299a49b819312d6addad1d" "d97ac0baa0b67be4f7523795621ea5096939a47e8b46378f79e78846e0e4ad3d" "f64189544da6f16bab285747d04a92bd57c7e7813d8c24c30f382f087d460a33" "0c83e0b50946e39e237769ad368a08f2cd1c854ccbcd1a01d39fdce4d6f86478" "70c88c01b0b5fde9ecf3bb23d542acba45bb4c5ae0c1330b965def2b6ce6fac3" "13096a9a6e75c7330c1bc500f30a8f4407bd618431c94aeab55c9855731a95e1" "456697e914823ee45365b843c89fbc79191fdbaff471b29aad9dcbe0ee1d5641" "9b9d7a851a8e26f294e778e02c8df25c8a3b15170e6f9fd6965ac5f2544ef2a9" "dd4582661a1c6b865a33b89312c97a13a3885dc95992e2e5fc57456b4c545176" "c3c135e69890de6a85ebf791017d458d3deb3954f81dcb7ac8c430e1620bb0f1" "8c7e832be864674c220f9a9361c851917a93f921fedb7717b1b5ece47690c098" "8d3ef5ff6273f2a552152c7febc40eabca26bae05bd12bc85062e2dc224cde9a" "e8ceeba381ba723b59a9abc4961f41583112fc7dc0e886d9fc36fa1dc37b4079" "0d2c5679b6d087686dcfd4d7e57ed8e8aedcccc7f1a478cd69704c02e4ee36fe" "77fff78cc13a2ff41ad0a8ba2f09e8efd3c7e16be20725606c095f9a19c24d3d" "e8bd9bbf6506afca133125b0be48b1f033b1c8647c628652ab7a2fe065c10ef0" "93011fe35859772a6766df8a4be817add8bfe105246173206478a0706f88b33d" "9e5e0ff3a81344c9b1e6bfc9b3dcf9b96d5ec6a60d8de6d4c762ee9e2121dfb2" "f1e8339b04aef8f145dd4782d03499d9d716fdc0361319411ac2efc603249326" "02d422e5b99f54bd4516d4157060b874d14552fe613ea7047c4a5cfa1288cf4f" "aec7b55f2a13307a55517fdf08438863d694550565dee23181d2ebd973ebd6b8" "b5fd9c7429d52190235f2383e47d340d7ff769f141cd8f9e7a4629a81abc6b19" "720838034f1dd3b3da66f6bd4d053ee67c93a747b219d1c546c41c4e425daf93" default))) '("4990532659bb6a285fee01ede3dfa1b1bdf302c5c3c8de9fad9b6bc63a9252f7"
"7771c8496c10162220af0ca7b7e61459cb42d18c35ce272a63461c0fc1336015"
"a9eeab09d61fef94084a95f82557e147d9630fbbb82a837f971f83e66e21e5ad"
"e1df746a4fa8ab920aafb96c39cd0ab0f1bac558eff34532f453bd32c687b9d6"
"7ec8fd456c0c117c99e3a3b16aaf09ed3fb91879f6601b1ea0eeaee9c6def5d9"
"df6dfd55673f40364b1970440f0b0cb8ba7149282cf415b81aaad2d98b0f0290"
"4b88b7ca61eb48bb22e2a4b589be66ba31ba805860db9ed51b4c484f3ef612a7"
"dfb1c8b5bfa040b042b4ef660d0aab48ef2e89ee719a1f24a4629a0c5ed769e8"
"38b43b865e2be4fe80a53d945218318d0075c5e01ddf102e9bec6e90d57e2134"
"e4a702e262c3e3501dfe25091621fe12cd63c7845221687e36a79e17cf3a67e0"
"b99ff6bfa13f0273ff8d0d0fd17cc44fab71dfdc293c7a8528280e690f084ef0"
"3061706fa92759264751c64950df09b285e3a2d3a9db771e99bcbb2f9b470037"
"e14289199861a5db890065fdc5f3d3c22c5bac607e0dbce7f35ce60e6b55fc52"
"7c3d62a64bafb2cc95cd2de70f7e4446de85e40098ad314ba2291fc07501b70c"
"1f292969fc19ba45fbc6542ed54e58ab5ad3dbe41b70d8cb2d1f85c22d07e518"
"4d5d11bfef87416d85673947e3ca3d3d5d985ad57b02a7bb2e32beaf785a100e"
"4594d6b9753691142f02e67b8eb0fda7d12f6cc9f1299a49b819312d6addad1d"
"d97ac0baa0b67be4f7523795621ea5096939a47e8b46378f79e78846e0e4ad3d"
"f64189544da6f16bab285747d04a92bd57c7e7813d8c24c30f382f087d460a33"
"0c83e0b50946e39e237769ad368a08f2cd1c854ccbcd1a01d39fdce4d6f86478"
"70c88c01b0b5fde9ecf3bb23d542acba45bb4c5ae0c1330b965def2b6ce6fac3"
"13096a9a6e75c7330c1bc500f30a8f4407bd618431c94aeab55c9855731a95e1"
"456697e914823ee45365b843c89fbc79191fdbaff471b29aad9dcbe0ee1d5641"
"9b9d7a851a8e26f294e778e02c8df25c8a3b15170e6f9fd6965ac5f2544ef2a9"
"dd4582661a1c6b865a33b89312c97a13a3885dc95992e2e5fc57456b4c545176"
"c3c135e69890de6a85ebf791017d458d3deb3954f81dcb7ac8c430e1620bb0f1"
"8c7e832be864674c220f9a9361c851917a93f921fedb7717b1b5ece47690c098"
"8d3ef5ff6273f2a552152c7febc40eabca26bae05bd12bc85062e2dc224cde9a"
"e8ceeba381ba723b59a9abc4961f41583112fc7dc0e886d9fc36fa1dc37b4079"
"0d2c5679b6d087686dcfd4d7e57ed8e8aedcccc7f1a478cd69704c02e4ee36fe"
"77fff78cc13a2ff41ad0a8ba2f09e8efd3c7e16be20725606c095f9a19c24d3d"
"e8bd9bbf6506afca133125b0be48b1f033b1c8647c628652ab7a2fe065c10ef0"
"93011fe35859772a6766df8a4be817add8bfe105246173206478a0706f88b33d"
"9e5e0ff3a81344c9b1e6bfc9b3dcf9b96d5ec6a60d8de6d4c762ee9e2121dfb2"
"f1e8339b04aef8f145dd4782d03499d9d716fdc0361319411ac2efc603249326"
"02d422e5b99f54bd4516d4157060b874d14552fe613ea7047c4a5cfa1288cf4f"
"aec7b55f2a13307a55517fdf08438863d694550565dee23181d2ebd973ebd6b8"
"b5fd9c7429d52190235f2383e47d340d7ff769f141cd8f9e7a4629a81abc6b19"
"720838034f1dd3b3da66f6bd4d053ee67c93a747b219d1c546c41c4e425daf93"
default)))
(custom-set-faces (custom-set-faces
;; custom-set-faces was added by Custom. ;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful. ;; If you edit it by hand, you could mess it up, so be careful.