code re-organization

This commit is contained in:
Mike 'Fuzzy' Partin 2024-07-06 02:23:11 -07:00
parent 62c8d25b56
commit 46f7a9350a
3 changed files with 40 additions and 24 deletions

View File

@ -1,3 +1,42 @@
;;
;; Load paths
;;
;; Add the lib directory to the load path
(add-to-list 'load-path (expand-file-name "lib" user-emacs-directory))
;; Add the thwap.d directory to the load path
(add-to-list 'load-path (expand-file-name "thwap.d" user-emacs-directory))
;;
;; Package management dependencies
;;
;; And disable package at startup
(setq package-enable-at-startup nil)
;;
;; 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
(straight-use-package 'use-package)

22
init.el
View File

@ -1,25 +1,3 @@
;; Add our custom site dir
(add-to-list 'load-path (expand-file-name "lib" user-emacs-directory))
(add-to-list 'load-path (expand-file-name "thwap.d" user-emacs-directory))
;; bootstrap straight, which we will use for everything
(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))
;; custom set stuff
(custom-set-variables
;; custom-set-variables was added by Custom.

View File

@ -1,6 +1,5 @@
;; Set up straight.el to use use-package
(straight-use-package 'use-package)
;; golden-ratio
(straight-use-package 'golden-ratio)