From eaac9d4843bf87d6e50eeff0a0da349e64d465ec Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Wed, 24 Feb 2021 13:00:53 -0600 Subject: Add shit, apparently UNIX line endings are being stupid --- config.org | 90 +++++++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 57 insertions(+), 33 deletions(-) (limited to 'config.org') 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. *** Fringes :PROPERTIES: -:header-args: :noweb-ref settings +:header-args: :noweb-ref early-init-frame :END: I have grown to love Emacs's little fringes on the side of the @@ -127,33 +127,41 @@ and have made a custom fringe bitmap. ***** Curly arrows (continuation lines) #+begin_src emacs-lisp - (define-fringe-bitmap 'left-curly-arrow - [#b11000000 - #b01100000 - #b00110000 - #b00011000]) + (defun hook--setup-fringes-curly-arrows () + "Set up curly-arrow fringes." + (define-fringe-bitmap 'left-curly-arrow + [#b11000000 + #b01100000 + #b00110000 + #b00011000]) + + (define-fringe-bitmap 'right-curly-arrow + [#b00011000 + #b00110000 + #b01100000 + #b11000000])) - (define-fringe-bitmap 'right-curly-arrow - [#b00011000 - #b00110000 - #b01100000 - #b11000000]) + (add-hook 'after-init-hook #'hook--setup-fringes-curly-arrows) #+end_src ***** Arrows (truncation lines) #+begin_src emacs-lisp - (define-fringe-bitmap 'left-arrow - [#b00000000 - #b01010100 - #b01010100 - #b00000000]) + (defun hook--setup-fringes-arrows () + "Setup arrow fringe bitmaps." + (define-fringe-bitmap 'left-arrow + [#b00000000 + #b01010100 + #b01010100 + #b00000000]) + + (define-fringe-bitmap 'right-arrow + [#b00000000 + #b00101010 + #b00101010 + #b00000000])) - (define-fringe-bitmap 'right-arrow - [#b00000000 - #b00101010 - #b00101010 - #b00000000]) + (add-hook 'after-init-hook #'hook--setup-fringes-arrows) #+end_src ** Windows @@ -484,13 +492,13 @@ into my personal fork, I'll use the workaround described in the issue. #+begin_src emacs-lisp :noweb-ref hooks - (defun hook--unicode-fonts-setup (frame) + (defun hook--unicode-fonts-setup () "Run `unicode-fonts-setup', then remove the hook." - (select-frame frame) - (unicode-fonts-setup) - (remove-hook 'after-make-frame-functions #'hook--unicode-fonts-setup)) + (when (window-system) + (unicode-fonts-setup)) + (remove-hook 'after-init-hook #'hook--unicode-fonts-setup)) - (add-hook 'after-make-frame-functions #'hook--unicode-fonts-setup) + (add-hook 'after-init-hook #'hook--unicode-fonts-setup) #+end_src *** Draw form-feeds (=^L=) properly :package: @@ -1738,13 +1746,17 @@ to auto-fill in programming modes, but /only/ the comments. #+begin_src emacs-lisp :noweb-ref settings (setq-default show-paren-delay 0 ;; Show the matching paren if visible, else the whole expression - show-paren-style 'mixed) + show-paren-style 'mixed + show-paren-when-point-inside-paren t + show-paren-when-point-in-periphery t) #+end_src -*** Smart parens :package: +*** COMMENT Smart parentheses :package: #+begin_src emacs-lisp :noweb-ref packages - (straight-use-package 'smartparens) + (straight-use-package '(smartparens + :host github + :repo "Fuco1/smartparens")) (require 'smartparens-config) #+end_src @@ -1782,10 +1794,19 @@ to auto-fill in programming modes, but /only/ the comments. #+end_src #+begin_src emacs-lisp :noweb-ref modes - (with-eval-after-load 'smart-parens + (with-eval-after-load 'smartparens (sp-use-paredit-bindings)) #+end_src +*** Electric pairs + +=smart-parens= is acting up on me, and Emacs has an included mode to do pretty +much everything I do with =smart-parens= -- =electric-pair-mode=. Let's try it. + +#+begin_src emacs-lisp :noweb-ref hooks + (add-hook 'prog-mode-hook #'electric-pair-local-mode) +#+end_src + ** Formatting *** Aggressive indent :package: @@ -1948,7 +1969,8 @@ At work, I need to tell Emacs where Firefox is. *** SHR #+begin_src emacs-lisp :noweb-ref settings - (setq-default shr-max-width fill-column) + (setq-default shr-max-width fill-column + shr-width fill-column) #+end_src ** Dired @@ -3393,6 +3415,7 @@ the =unless= form -- it was pretty tough for me to wrap my head around the needed boolean expression to tangle config.org. Booleans, yall! #+begin_src emacs-lisp + (message "%s..." "Loading init.el") (let* (;; Speed up init (gc-cons-threshold most-positive-fixnum) ;; (gc-cons-percentage 0.6) @@ -3423,7 +3446,7 @@ the needed boolean expression to tangle config.org. Booleans, yall! (require 'org) (org-babel-load-file config.org) (message "%s... Done" "Loading config.org"))) - + (message "%s... Done." "Loading init.el") ;;; init.el ends here #+end_src @@ -3441,11 +3464,12 @@ little as possible in this file, so I only have what I need. <> ;;; Code: + (message "%s..." "Loading early-init.el") ;; BOOTSTRAP PACKAGE MANAGEMENT <> ;; SETUP FRAME <> - + (message "%s... Done." "Loading early-init.el") ;;; early-init.el ends here #+end_src -- cgit 1.4.1-21-gabe81