about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--config.org90
-rw-r--r--early-init.el34
-rw-r--r--init.el3
3 files changed, 93 insertions, 34 deletions
diff --git a/config.org b/config.org index bacb5f6..5479ab4 100644 --- a/config.org +++ b/config.org
@@ -97,7 +97,7 @@ want it to resize by pixels -- we /are/ using a GUI, after all.
97 97
98*** Fringes 98*** Fringes
99:PROPERTIES: 99:PROPERTIES:
100:header-args: :noweb-ref settings 100:header-args: :noweb-ref early-init-frame
101:END: 101:END:
102 102
103I have grown to love Emacs's little fringes on the side of the 103I have grown to love Emacs's little fringes on the side of the
@@ -127,33 +127,41 @@ and have made a custom fringe bitmap.
127***** Curly arrows (continuation lines) 127***** Curly arrows (continuation lines)
128 128
129#+begin_src emacs-lisp 129#+begin_src emacs-lisp
130 (define-fringe-bitmap 'left-curly-arrow 130 (defun hook--setup-fringes-curly-arrows ()
131 [#b11000000 131 "Set up curly-arrow fringes."
132 #b01100000 132 (define-fringe-bitmap 'left-curly-arrow
133 #b00110000 133 [#b11000000
134 #b00011000]) 134 #b01100000
135 #b00110000
136 #b00011000])
137
138 (define-fringe-bitmap 'right-curly-arrow
139 [#b00011000
140 #b00110000
141 #b01100000
142 #b11000000]))
135 143
136 (define-fringe-bitmap 'right-curly-arrow 144 (add-hook 'after-init-hook #'hook--setup-fringes-curly-arrows)
137 [#b00011000
138 #b00110000
139 #b01100000
140 #b11000000])
141#+end_src 145#+end_src
142 146
143***** Arrows (truncation lines) 147***** Arrows (truncation lines)
144 148
145#+begin_src emacs-lisp 149#+begin_src emacs-lisp
146 (define-fringe-bitmap 'left-arrow 150 (defun hook--setup-fringes-arrows ()
147 [#b00000000 151 "Setup arrow fringe bitmaps."
148 #b01010100 152 (define-fringe-bitmap 'left-arrow
149 #b01010100 153 [#b00000000
150 #b00000000]) 154 #b01010100
155 #b01010100
156 #b00000000])
157
158 (define-fringe-bitmap 'right-arrow
159 [#b00000000
160 #b00101010
161 #b00101010
162 #b00000000]))
151 163
152 (define-fringe-bitmap 'right-arrow 164 (add-hook 'after-init-hook #'hook--setup-fringes-arrows)
153 [#b00000000
154 #b00101010
155 #b00101010
156 #b00000000])
157#+end_src 165#+end_src
158 166
159** Windows 167** Windows
@@ -484,13 +492,13 @@ into my personal fork, I'll use the workaround described in the
484issue. 492issue.
485 493
486#+begin_src emacs-lisp :noweb-ref hooks 494#+begin_src emacs-lisp :noweb-ref hooks
487 (defun hook--unicode-fonts-setup (frame) 495 (defun hook--unicode-fonts-setup ()
488 "Run `unicode-fonts-setup', then remove the hook." 496 "Run `unicode-fonts-setup', then remove the hook."
489 (select-frame frame) 497 (when (window-system)
490 (unicode-fonts-setup) 498 (unicode-fonts-setup))
491 (remove-hook 'after-make-frame-functions #'hook--unicode-fonts-setup)) 499 (remove-hook 'after-init-hook #'hook--unicode-fonts-setup))
492 500
493 (add-hook 'after-make-frame-functions #'hook--unicode-fonts-setup) 501 (add-hook 'after-init-hook #'hook--unicode-fonts-setup)
494#+end_src 502#+end_src
495 503
496*** Draw form-feeds (=^L=) properly :package: 504*** Draw form-feeds (=^L=) properly :package:
@@ -1738,13 +1746,17 @@ to auto-fill in programming modes, but /only/ the comments.
1738#+begin_src emacs-lisp :noweb-ref settings 1746#+begin_src emacs-lisp :noweb-ref settings
1739 (setq-default show-paren-delay 0 1747 (setq-default show-paren-delay 0
1740 ;; Show the matching paren if visible, else the whole expression 1748 ;; Show the matching paren if visible, else the whole expression
1741 show-paren-style 'mixed) 1749 show-paren-style 'mixed
1750 show-paren-when-point-inside-paren t
1751 show-paren-when-point-in-periphery t)
1742#+end_src 1752#+end_src
1743 1753
1744*** Smart parens :package: 1754*** COMMENT Smart parentheses :package:
1745 1755
1746#+begin_src emacs-lisp :noweb-ref packages 1756#+begin_src emacs-lisp :noweb-ref packages
1747 (straight-use-package 'smartparens) 1757 (straight-use-package '(smartparens
1758 :host github
1759 :repo "Fuco1/smartparens"))
1748 (require 'smartparens-config) 1760 (require 'smartparens-config)
1749#+end_src 1761#+end_src
1750 1762
@@ -1782,10 +1794,19 @@ to auto-fill in programming modes, but /only/ the comments.
1782#+end_src 1794#+end_src
1783 1795
1784#+begin_src emacs-lisp :noweb-ref modes 1796#+begin_src emacs-lisp :noweb-ref modes
1785 (with-eval-after-load 'smart-parens 1797 (with-eval-after-load 'smartparens
1786 (sp-use-paredit-bindings)) 1798 (sp-use-paredit-bindings))
1787#+end_src 1799#+end_src
1788 1800
1801*** Electric pairs
1802
1803=smart-parens= is acting up on me, and Emacs has an included mode to do pretty
1804much everything I do with =smart-parens= -- =electric-pair-mode=. Let's try it.
1805
1806#+begin_src emacs-lisp :noweb-ref hooks
1807 (add-hook 'prog-mode-hook #'electric-pair-local-mode)
1808#+end_src
1809
1789** Formatting 1810** Formatting
1790 1811
1791*** Aggressive indent :package: 1812*** Aggressive indent :package:
@@ -1948,7 +1969,8 @@ At work, I need to tell Emacs where Firefox is.
1948*** SHR 1969*** SHR
1949 1970
1950#+begin_src emacs-lisp :noweb-ref settings 1971#+begin_src emacs-lisp :noweb-ref settings
1951 (setq-default shr-max-width fill-column) 1972 (setq-default shr-max-width fill-column
1973 shr-width fill-column)
1952#+end_src 1974#+end_src
1953 1975
1954** Dired 1976** Dired
@@ -3393,6 +3415,7 @@ the =unless= form -- it was pretty tough for me to wrap my head around
3393the needed boolean expression to tangle config.org. Booleans, yall! 3415the needed boolean expression to tangle config.org. Booleans, yall!
3394 3416
3395#+begin_src emacs-lisp 3417#+begin_src emacs-lisp
3418 (message "%s..." "Loading init.el")
3396 (let* (;; Speed up init 3419 (let* (;; Speed up init
3397 (gc-cons-threshold most-positive-fixnum) 3420 (gc-cons-threshold most-positive-fixnum)
3398 ;; (gc-cons-percentage 0.6) 3421 ;; (gc-cons-percentage 0.6)
@@ -3423,7 +3446,7 @@ the needed boolean expression to tangle config.org. Booleans, yall!
3423 (require 'org) 3446 (require 'org)
3424 (org-babel-load-file config.org) 3447 (org-babel-load-file config.org)
3425 (message "%s... Done" "Loading config.org"))) 3448 (message "%s... Done" "Loading config.org")))
3426 3449 (message "%s... Done." "Loading init.el")
3427 ;;; init.el ends here 3450 ;;; init.el ends here
3428#+end_src 3451#+end_src
3429 3452
@@ -3441,11 +3464,12 @@ little as possible in this file, so I only have what I need.
3441 <<disclaimer>> 3464 <<disclaimer>>
3442 ;;; Code: 3465 ;;; Code:
3443 3466
3467 (message "%s..." "Loading early-init.el")
3444 ;; BOOTSTRAP PACKAGE MANAGEMENT 3468 ;; BOOTSTRAP PACKAGE MANAGEMENT
3445 <<early-init-package>> 3469 <<early-init-package>>
3446 ;; SETUP FRAME 3470 ;; SETUP FRAME
3447 <<early-init-frame>> 3471 <<early-init-frame>>
3448 3472 (message "%s... Done." "Loading early-init.el")
3449 ;;; early-init.el ends here 3473 ;;; early-init.el ends here
3450#+end_src 3474#+end_src
3451 3475
diff --git a/early-init.el b/early-init.el index b8a6c6c..1a26b03 100644 --- a/early-init.el +++ b/early-init.el
@@ -14,6 +14,7 @@
14 14
15;;; Code: 15;;; Code:
16 16
17(message "%s..." "Loading early-init.el")
17;; BOOTSTRAP PACKAGE MANAGEMENT 18;; BOOTSTRAP PACKAGE MANAGEMENT
18(let ((win-app-dir "~/Applications")) 19(let ((win-app-dir "~/Applications"))
19 (dolist (path (list 20 (dolist (path (list
@@ -85,5 +86,38 @@
85(horizontal-scroll-bar-mode -1) 86(horizontal-scroll-bar-mode -1)
86(setq-default frame-inhibit-implied-resize t 87(setq-default frame-inhibit-implied-resize t
87 frame-resize-pixelwise t) 88 frame-resize-pixelwise t)
89(setq-default indicate-empty-lines t)
90(setq-default indicate-buffer-boundaries 'right)
91(setq-default visual-line-fringe-indicators '(left-curly-arrow nil))
92(defun hook--setup-fringes-curly-arrows ()
93 "Set up curly-arrow fringes."
94 (define-fringe-bitmap 'left-curly-arrow
95 [#b11000000
96 #b01100000
97 #b00110000
98 #b00011000])
88 99
100 (define-fringe-bitmap 'right-curly-arrow
101 [#b00011000
102 #b00110000
103 #b01100000
104 #b11000000]))
105
106(add-hook 'after-init-hook #'hook--setup-fringes-curly-arrows)
107(defun hook--setup-fringes-arrows ()
108 "Setup arrow fringe bitmaps."
109 (define-fringe-bitmap 'left-arrow
110 [#b00000000
111 #b01010100
112 #b01010100
113 #b00000000])
114
115 (define-fringe-bitmap 'right-arrow
116 [#b00000000
117 #b00101010
118 #b00101010
119 #b00000000]))
120
121(add-hook 'after-init-hook #'hook--setup-fringes-arrows)
122(message "%s... Done." "Loading early-init.el")
89;;; early-init.el ends here 123;;; early-init.el ends here
diff --git a/init.el b/init.el index 0d48e0d..28238aa 100644 --- a/init.el +++ b/init.el
@@ -16,6 +16,7 @@
16 16
17(setq-default load-prefer-newer t) 17(setq-default load-prefer-newer t)
18 18
19(message "%s..." "Loading init.el")
19(let* (;; Speed up init 20(let* (;; Speed up init
20 (gc-cons-threshold most-positive-fixnum) 21 (gc-cons-threshold most-positive-fixnum)
21 ;; (gc-cons-percentage 0.6) 22 ;; (gc-cons-percentage 0.6)
@@ -46,5 +47,5 @@
46 (require 'org) 47 (require 'org)
47 (org-babel-load-file config.org) 48 (org-babel-load-file config.org)
48 (message "%s... Done" "Loading config.org"))) 49 (message "%s... Done" "Loading config.org")))
49 50(message "%s... Done." "Loading init.el")
50;;; init.el ends here 51;;; init.el ends here