X-Git-Url: https://git.shemshak.org/~bandali/configs/blobdiff_plain/ee0dbfb503ff924d6d2778891c18b6e62774cbb1..981ff3ce9a26c24ad5fd0a2cdfed33a015156edf:/init.org?ds=inline diff --git a/init.org b/init.org index da1d297..79dbbd2 100644 --- a/init.org +++ b/init.org @@ -65,7 +65,7 @@ make build ** First line #+begin_src emacs-lisp :comments none -;;; init.el --- Amin Bandali's Emacs config -*- lexical-binding: t ; eval: (view-mode 1)-*- +;;; init.el --- Amin Bandali's Emacs config -*- lexical-binding: t -*- #+end_src Enable =view-mode=, which both makes the file read-only (as a reminder @@ -113,7 +113,6 @@ The conventions below were inspired by [[https://github.com/hlissner/doom-emacs] ;; amin-... public variables or non-interactive functions ;; amin--... private anything (non-interactive), not safe for direct use ;; amin/... an interactive function; safe for M-x or keybinding -;; amin:... an evil operator, motion, or command ;; amin|... a hook function ;; amin*... an advising function ;; amin@... a hydra command @@ -127,6 +126,9 @@ The conventions below were inspired by [[https://github.com/hlissner/doom-emacs] #+begin_src emacs-lisp :comments none ;;; Code: + + +;; * Initial setup #+end_src ** Emacs initialization @@ -350,12 +352,14 @@ in my shell. (exec-path-from-shell-copy-env "SSH_AUTH_SOCK")) #+end_src -** COMMENT Only one custom theme at a time +** Only one custom theme at a time #+begin_src emacs-lisp -(defadvice load-theme (before clear-previous-themes activate) - "Clear existing theme settings instead of layering them" - (mapc #'disable-theme custom-enabled-themes)) +;; only one custom theme at a time +;; +;; (defadvice load-theme (before clear-previous-themes activate) +;; "Clear existing theme settings instead of layering them" +;; (mapc #'disable-theme custom-enabled-themes)) #+end_src ** Server @@ -374,42 +378,44 @@ See [[https://www.gnu.org/software/emacs/manual/html_node/emacs/Emacs-Server.htm :config (or (server-running-p) (server-mode))) #+end_src -** COMMENT Unicode support +** Unicode support Font stack with better unicode support, around =Ubuntu Mono= and =Hack=. -#+begin_src emacs-lisp :tangle no -(dolist (ft (fontset-list)) - (set-fontset-font - ft - 'unicode - (font-spec :name "Source Code Pro" :size 14)) - (set-fontset-font - ft - 'unicode - (font-spec :name "DejaVu Sans Mono") - nil - 'append) - ;; (set-fontset-font - ;; ft - ;; 'unicode - ;; (font-spec - ;; :name "Symbola monospacified for DejaVu Sans Mono") - ;; nil - ;; 'append) - ;; (set-fontset-font - ;; ft - ;; #x2115 ; ℕ - ;; (font-spec :name "DejaVu Sans Mono") - ;; nil - ;; 'append) - (set-fontset-font - ft - (cons ?Α ?ω) - (font-spec :name "DejaVu Sans Mono" :size 14) - nil - 'prepend)) +#+begin_src emacs-lisp +;; unicode support +;; +;; (dolist (ft (fontset-list)) +;; (set-fontset-font +;; ft +;; 'unicode +;; (font-spec :name "Source Code Pro" :size 14)) +;; (set-fontset-font +;; ft +;; 'unicode +;; (font-spec :name "DejaVu Sans Mono") +;; nil +;; 'append) +;; ;; (set-fontset-font +;; ;; ft +;; ;; 'unicode +;; ;; (font-spec +;; ;; :name "Symbola monospacified for DejaVu Sans Mono") +;; ;; nil +;; ;; 'append) +;; ;; (set-fontset-font +;; ;; ft +;; ;; #x2115 ; ℕ +;; ;; (font-spec :name "DejaVu Sans Mono") +;; ;; nil +;; ;; 'append) +;; (set-fontset-font +;; ft +;; (cons ?Α ?ω) +;; (font-spec :name "DejaVu Sans Mono" :size 14) +;; nil +;; 'prepend)) #+end_src ** Gentler font resizing @@ -492,6 +498,11 @@ Convenience macro for =setq='ing multiple variables to the same value: :CUSTOM_ID: core :END: +#+begin_src emacs-lisp :comments none + +;; * Core +#+end_src + ** Defaults *** Time and battery in mode-line @@ -1045,6 +1056,11 @@ There's no way I could top that, so I won't attempt to. * Borg's =layer/essentials= +#+begin_src emacs-lisp :comments none + +;; * Borg's `layer/essentials' +#+end_src + TODO: break this giant source block down into individual org sections. #+begin_src emacs-lisp @@ -1136,6 +1152,11 @@ TODO: break this giant source block down into individual org sections. * Editing +#+begin_src emacs-lisp :comments none + +;; * Editing +#+end_src + ** Company #+begin_src emacs-lisp @@ -1156,6 +1177,12 @@ TODO: break this giant source block down into individual org sections. #+end_src * Syntax and spell checking + +#+begin_src emacs-lisp :comments none + +;; * Syntax and spell checking +#+end_src + #+begin_src emacs-lisp (use-package flycheck :defer 3 @@ -1199,6 +1226,11 @@ TODO: break this giant source block down into individual org sections. #+end_src * Programming modes +#+begin_src emacs-lisp :comments none + +;; * Programming modes +#+end_src + ** [[http://alloytools.org][Alloy]] (with [[https://github.com/dwwmmn/alloy-mode][alloy-mode]]) #+begin_src emacs-lisp @@ -1559,6 +1591,11 @@ treemacs * Emacs Enhancements +#+begin_src emacs-lisp :comments none + +;; * Emacs Enhancements +#+end_src + ** [[https://github.com/justbur/emacs-which-key][which-key]] #+begin_quote @@ -1773,10 +1810,11 @@ Make =*scratch*= and =*Messages*= unkillable. Also see [[https://www.emacswiki.org/emacs/rebox2][rebox2]]. -** COMMENT [[https://github.com/DarthFennec/highlight-indent-guides][highlight-indent-guides]] :ARCHIVE: +** [[https://github.com/DarthFennec/highlight-indent-guides][highlight-indent-guides]] #+begin_src emacs-lisp (use-package highlight-indent-guides + :disabled t :defer 3 :hook ((prog-mode . highlight-indent-guides-mode) ;; (org-mode . highlight-indent-guides-mode) @@ -1865,12 +1903,13 @@ Also see [[https://www.emacswiki.org/emacs/rebox2][rebox2]]. "")))) #+end_src -** COMMENT slack :ARCHIVE: +** slack Hopefully temporary. #+begin_src emacs-lisp (use-package slack + :disabled t :commands (slack-start) :init (eval-when-compile ; silence the byte-compiler @@ -1930,18 +1969,6 @@ Hopefully temporary. (setq alert-default-style 'notifier)) #+end_src -** COMMENT magithub :ARCHIVE: - -For when I /have to/ use GH. - -#+begin_src emacs-lisp -(use-package magithub - :after magit - :config - (magithub-feature-autoinject t) - (setq magithub-clone-default-directory "~/src/git")) -#+end_src - ** [[https://github.com/peterwvj/eshell-up][eshell-up]] #+begin_src emacs-lisp @@ -1954,9 +1981,9 @@ For when I /have to/ use GH. #+begin_src emacs-lisp (use-package multi-term :defer 1 - :bind (("C-c C-j" . term-line-mode) - ("C-c m m" . multi-term) - ("C-c m p" . multi-term-dedicated-toggle)) + :bind (("C-c C-j" . term-line-mode) + ("C-c a s m m" . multi-term) + ("C-c a s m p" . multi-term-dedicated-toggle)) :config (setq multi-term-program "/bin/screen" ;; TODO: add separate bindings for connecting to existing @@ -1982,8 +2009,21 @@ For when I /have to/ use GH. '("C-z" "C-x" "C-c" "C-h" "C-y" ""))) #+end_src +** page-break-lines + +#+begin_src emacs-lisp +(use-package page-break-lines + :config + (global-page-break-lines-mode)) +#+end_src + * Email +#+begin_src emacs-lisp :comments none + +;; * Email +#+end_src + #+begin_src emacs-lisp (defvar amin-maildir (expand-file-name "~/mail/")) (after! recentf @@ -2220,10 +2260,11 @@ I tried using =borg-elpa= instead of doing it like this, but it added (bbdb-initialize 'gnus 'message)) #+end_src -** COMMENT message-x +** message-x #+begin_src emacs-lisp (use-package message-x + :disabled t :custom (message-x-completion-alist (quote @@ -2235,10 +2276,11 @@ I tried using =borg-elpa= instead of doing it like this, but it added . message-expand-group))))) #+end_src -** COMMENT gnus-harvest +** gnus-harvest #+begin_src emacs-lisp (use-package gnus-harvest + :disabled t :commands gnus-harvest-install :demand t :config @@ -2248,6 +2290,12 @@ I tried using =borg-elpa= instead of doing it like this, but it added #+end_src * Blogging + +#+begin_src emacs-lisp :comments none + +;; * Blogging +#+end_src + ** [[https://ox-hugo.scripter.co][ox-hugo]] #+begin_src emacs-lisp @@ -2263,6 +2311,11 @@ I tried using =borg-elpa= instead of doing it like this, but it added :CUSTOM_ID: post-initialization :END: +#+begin_src emacs-lisp :comments none + +;; * Post initialization +#+end_src + Display how long it took to load the init file. #+begin_src emacs-lisp