whompmacs/early-init.el

51 lines
1.4 KiB
EmacsLisp
Raw Normal View History

2024-07-06 09:23:11 +00:00
;;
;; Load paths
;;
;; Add the lib directory to the load path
2024-07-12 23:32:01 +00:00
(add-to-list 'load-path (expand-file-name "whomp" user-emacs-directory))
2024-07-06 09:23:11 +00:00
;; Add the thwap.d directory to the load path
2024-07-12 23:32:01 +00:00
(add-to-list 'load-path (expand-file-name "whomp.d" user-emacs-directory))
2024-07-06 09:23:11 +00:00
;;
;; Package management dependencies
;;
2024-07-05 05:48:54 +00:00
;; And disable package at startup
(setq package-enable-at-startup nil)
2024-07-06 09:23:11 +00:00
;;
;; Bootstrap package management with straight.el and use-package
;;
;; Bootstrap straight.el
(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))
;; Set up straight.el to use use-package
2024-07-14 07:18:36 +00:00
;; (straight-use-package 'use-package)
(use-package use-package
:straight t
:defer t)
2024-07-12 23:32:01 +00:00
(defun whomp/add-key-binding (key command help-text)
"Add a key binding to the W.H.O.M.P. keymap"
(define-key whomp-map (kbd key) command)
(add-to-list 'whomp-help-lines (format "%-12s: %s" (concat "C-c w " key) help-text)))