diff --git a/core/core.el b/core/core.el index 7fe8725f8..3ecc78878 100644 --- a/core/core.el +++ b/core/core.el @@ -142,24 +142,5 @@ (IS-LINUX 'core-os-linux) (IS-WINDOWS 'core-os-win32))) -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -(defun narf-init () - (setq-default - gc-cons-threshold 8388608 - gc-cons-percentage 0.3) - - (defadvice save-buffers-kill-emacs (around no-query-kill-emacs activate) - "Prevent annoying \"Active processes exist\" query when you quit Emacs." - (cl-flet ((process-list ())) ad-do-it)) - - (defun display-startup-echo-area-message () - (after! workgroups2 - (message "%sLoaded in %s" (narf/tab-display t t) (emacs-init-time)))) - - (require 'server) - (unless (server-running-p) - (server-start))) - (provide 'core) ;;; core.el ends here diff --git a/init-org.el b/init-org.el index 49009c716..287dbf30b 100644 --- a/init-org.el +++ b/init-org.el @@ -11,49 +11,42 @@ (defconst narf-theme 'narf-light) (defconst narf-default-font (font-spec :family "Hack" :size 14)) (defconst narf-writing-font (font-spec :family "Deja Sans" :size 14)) -(set-frame-font narf-default-font) -(let (file-name-handler-alist - (gc-cons-threshold 169715200)) - (tool-bar-mode -1) ; no toolbar +(defconst narf-packages + '(core ; core/core.el - (load (concat user-emacs-directory "init-packages.el")) - (load-theme narf-theme t) - - (mapc 'require - `(core ; core/core.el - - core-popup ; taming stray windows - core-ui ; draw me like one of your French editors - core-evil ; come to the dark side, we have cookies - core-editor ; filling the editor-shaped hole in the emacs OS - core-company ; for the lazy typist - core-yasnippet ; for the lazier typist - core-auto-insert ; for the laziest typist - core-flycheck ; remember that semicolon you forgot? - core-project ; whose project am I in? - core-vcs ; version control is a programmer's best friend - core-helm ; a search engine for life and love - core-eval ; run code, run. - core-workgroups ; cure Emacs alzheimers + core-popup ; taming stray windows + core-ui ; draw me like one of your French editors + core-evil ; come to the dark side, we have cookies + core-editor ; filling the editor-shaped hole in the emacs OS + core-company ; for the lazy typist + core-yasnippet ; for the lazier typist + core-auto-insert ; for the laziest typist + core-flycheck ; remember that semicolon you forgot? + core-project ; whose project am I in? + core-vcs ; version control is a programmer's best friend + core-helm ; a search engine for life and love + core-eval ; run code, run. + core-workgroups ; cure Emacs alzheimers ;;; Environments - module-markdown - module-org - module-plantuml + module-markdown + module-org + module-plantuml ;;; Specific custom functionality - ;; lib-plugin ; plugin dev for various programs - lib-tmux ; closing the rift between GUI & terminal - lib-demo ; let me demonstrate... - lib-writing ; yes, I write papers and fiction in emacs - ;; lib-crm ; emacs and org-mode based CRM + ;; lib-plugin ; plugin dev for various programs + lib-tmux ; closing the rift between GUI & terminal + lib-demo ; let me demonstrate... + lib-writing ; yes, I write papers and fiction in emacs + ;; lib-crm ; emacs and org-mode based CRM ;;; Key bindings & ex commands - my-bindings - my-commands - )) - (narf-init)) + my-bindings + my-commands + )) + +(load (concat user-emacs-directory "init-packages.el")) (setq wg-session-file (expand-file-name "wg-org-default" narf-temp-dir)) (cd org-directory) diff --git a/init-packages.el b/init-packages.el index aaaead6f5..420997e0a 100644 --- a/init-packages.el +++ b/init-packages.el @@ -3,7 +3,9 @@ (setq-default ;; stop package.el from being annoying. NARF relies entirely on Cask. package--init-file-ensured t - package-enable-at-startup nil) + package-enable-at-startup nil + gc-cons-threshold 8388608 + gc-cons-percentage 0.3) (eval-and-compile (defconst narf-emacs-dir user-emacs-directory) @@ -55,9 +57,28 @@ (--subdirs narf-packages-dir) load-path)))) -;;;;;;;;;;;;;;;; - +;; Load local settings, if available (when (file-exists-p "~/.emacs.local.el") (load "~/.emacs.local.el")) +;; prematurely optimize for faster startup +(let (file-name-handler-alist + (gc-cons-threshold 169715200)) + (scroll-bar-mode -1) ; no scrollbar + (tool-bar-mode -1) ; no toolbar + (load-theme narf-theme t) + (mapc 'require narf-packages)) + +(defadvice save-buffers-kill-emacs (around no-query-kill-emacs activate) + "Prevent annoying \"Active processes exist\" query when you quit Emacs." + (cl-flet ((process-list ())) ad-do-it)) + +(defun display-startup-echo-area-message () + (after! workgroups2 + (message "%sLoaded in %s" (narf/tab-display t t) (emacs-init-time)))) + +(require 'server) +(unless (server-running-p) + (server-start)) + ;;; init-packages.el ends here diff --git a/init.el b/init.el index 1f54a934d..53d4f5992 100644 --- a/init.el +++ b/init.el @@ -47,71 +47,64 @@ (defconst narf-writing-font (font-spec :family "Hack" :size 14)) (defconst narf-big-font (font-spec :family "Inconsolata" :size 20)) -;; prematurely optimize for faster startup -(let (file-name-handler-alist - (gc-cons-threshold 169715200)) - (scroll-bar-mode -1) ; no scrollbar - (tool-bar-mode -1) ; no toolbar +(defconst narf-packages + '(core ; core/core.el - (load (concat user-emacs-directory "init-packages.el")) - (load-theme narf-theme t) + ;;; The heart of NARF + core-popup ; taming stray windows + core-ui ; draw me like one of your French editors + core-evil ; come to the dark side, we have cookies + core-editor ; filling the editor-shaped hole in the emacs OS + core-company ; for the lazy typist + core-yasnippet ; for the lazier typist + core-auto-insert ; for the laziest typist + core-flycheck ; remember that semicolon you forgot? + core-project ; whose project am I in? + core-vcs ; version control is a programmer's best friend + core-helm ; a search engine for life and love + core-eval ; run code, run. + core-workgroups ; cure Emacs alzheimers + tab emulation - (mapc 'require - `(core ; core/core.el + ;;; Environments + module-cc ; c/c++/obj-c madness + module-csharp ; unity, .NET, and mono shenanigans + module-data ; dbs 'n data formats + module-go ; the hipster dialect + module-java ; the poster child for carpal tunnel syndome + module-js ; all(hope(abandon(ye(who(enter(here)))))) + module-lisp ; drowning in parentheses + module-lua ; one-based indices? one-based indices. + module-markdown ; markdown + ;; module-org ; for fearless [organized] leader + module-php ; making php less painful to work with + module-plantuml ; to help show others how right I am + module-python ; beautiful is better than ugly + module-regex ; /^[^\s](meaning)[^\n]*/ + module-ruby ; <3 + module-rust ; Fe2O3; for gamedev and great good + module-sh ; she sells Z-shells by the C XOR + module-swift ; yay, emoji variables! + module-vim ; my mistress + module-web ; for the 2.0'er - ;;; The heart of NARF - core-popup ; taming stray windows - core-ui ; draw me like one of your French editors - core-evil ; come to the dark side, we have cookies - core-editor ; filling the editor-shaped hole in the emacs OS - core-company ; for the lazy typist - core-yasnippet ; for the lazier typist - core-auto-insert ; for the laziest typist - core-flycheck ; remember that semicolon you forgot? - core-project ; whose project am I in? - core-vcs ; version control is a programmer's best friend - core-helm ; a search engine for life and love - core-eval ; run code, run. - core-workgroups ; cure Emacs alzheimers + tab emulation + ;;; Experimental + ;; module-crystal ; ruby at the speed of c + ;; module-eshell ; for inferior OSes *cough*windows + ;; module-nim ; look out Abraham + ;; module-pony ; Dear Princess Compiler - ;;; Environments - module-cc ; c/c++/obj-c madness - module-csharp ; unity, .NET, and mono shenanigans - module-data ; dbs 'n data formats - module-go ; the hipster dialect - module-java ; the poster child for carpal tunnel syndome - module-js ; all(hope(abandon(ye(who(enter(here)))))) - module-lisp ; drowning in parentheses - module-lua ; one-based indices? one-based indices. - module-markdown ; markdown - module-nim ; look out Abraham - module-org ; for fearless [organized] leader - module-php ; making php less painful to work with - module-plantuml ; to help show how right I am - module-python ; beautiful is better than ugly - module-regex ; /^[^\s](meaning)[^\n]*/ - module-ruby ; <3 - module-rust ; Fe2O3; for gamedev and great good - module-sh ; she sells Z-shells by the C XOR - module-swift ; yay, emoji variables! - module-vim ; my mistress - module-web ; for the 2.0'er - ;;; Experimental - ;; module-crystal ; ruby at the speed of c - ;; module-eshell ; for inferior OSes *cough*windows + ;;; Specific custom functionality + lib-plugin ; plugin dev for various programs + lib-tmux ; closing the rift between GUI & terminal + lib-demo ; let me demonstrate... + lib-writing ; yes, I write papers and fiction in emacs + ;; lib-crm ; emacs and org-mode based CRM - ;;; Specific custom functionality - lib-plugin ; plugin dev for various programs - lib-tmux ; closing the rift between GUI & terminal - lib-demo ; let me demonstrate... - lib-writing ; yes, I write papers and fiction in emacs - ;; lib-crm ; emacs and org-mode based CRM + ;;; Key bindings & ex commands + my-bindings + my-commands + )) - ;;; Key bindings & ex commands - my-bindings - my-commands - ))) - -(narf-init) +(load (concat user-emacs-directory "init-packages.el")) ;;; I think so Brain...