summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.emacs.d/early-init.el1
-rw-r--r--.emacs.d/init.el27
-rw-r--r--.emacs.d/packages.el9
-rw-r--r--.emacs.d/plugins.el14
4 files changed, 31 insertions, 20 deletions
diff --git a/.emacs.d/early-init.el b/.emacs.d/early-init.el
new file mode 100644
index 0000000..512068a
--- /dev/null
+++ b/.emacs.d/early-init.el
@@ -0,0 +1 @@
+(setq package-enable-at-startup nil)
diff --git a/.emacs.d/init.el b/.emacs.d/init.el
index dd07c6e..116ff79 100644
--- a/.emacs.d/init.el
+++ b/.emacs.d/init.el
@@ -1,26 +1,16 @@
-(custom-set-variables
- ;; custom-set-variables was added by Custom.
- ;; If you edit it by hand, you could mess it up, so be careful.
- ;; Your init file should contain only one such instance.
- ;; If there is more than one, they won't work right.
- '(custom-enabled-themes '(moe-dark))
- '(custom-safe-themes
- '("a68624bd5c4bec879ee59cd3039531b6229766a8b8ed0e79eef2642f14dbda32" "58c996beb973f7e988ee4fd21c367b7a5bbdb0622ddfbbd112672a7b4e3d3b81" default))
- '(initial-buffer-choice t)
- '(package-selected-packages '(## elpher moe-theme org visual-fill-column)))
-(custom-set-faces
- ;; custom-set-faces was added by Custom.
- ;; If you edit it by hand, you could mess it up, so be careful.
- ;; Your init file should contain only one such instance.
- ;; If there is more than one, they won't work right.
- )
+;; load plugins
+(when (file-exists-p "~/.emacs.d/plugins.el")
+ (load "~/.emacs.d/plugins.el"))
+(when (file-exists-p "~/.emacs.d/packages.el")
+ (load "~/.emacs.d/packages.el"))
;; Setup modes
+;;(setq initial-buffer-choice t)
;;; remember layout
;;(desktop-save-mode 1)
;;; disable menu bar
-;;(menu-bar-mode -1)
+(menu-bar-mode -1)
(tool-bar-mode -1)
(scroll-bar-mode -1)
;;; disable emacs splash screen
@@ -65,6 +55,3 @@
(global-set-key "\C-cl" 'use-light-theme)
(global-set-key "\C-cd" 'use-dark-theme)
-;; Always last
-;;(when (file-exists-p "~/.emacs.d/pc_local_init.el")
-;; (load "~/.emacs.d/pc_local_init.el"))`
diff --git a/.emacs.d/packages.el b/.emacs.d/packages.el
new file mode 100644
index 0000000..a625f5b
--- /dev/null
+++ b/.emacs.d/packages.el
@@ -0,0 +1,9 @@
+(straight-use-package 'org)
+(straight-use-package 'elpher)
+(straight-use-package 'visual-fill-column)
+(straight-use-package 'markdown-mode)
+
+;; custom recipes
+(straight-use-package '(moe-theme :host github
+ :repo "kuanyui/moe-theme.el"
+ :branch "master"))
diff --git a/.emacs.d/plugins.el b/.emacs.d/plugins.el
new file mode 100644
index 0000000..d4c8983
--- /dev/null
+++ b/.emacs.d/plugins.el
@@ -0,0 +1,14 @@
+;; here is where you can paste all the non self-customized files
+
+(defvar bootstrap-version)
+(let ((bootstrap-file
+ (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
+ (bootstrap-version 6))
+ (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))