Add shit, apparently UNIX line endings are being stupid

This commit is contained in:
Case Duckworth 2021-02-24 13:00:53 -06:00
parent 0e6f6329c5
commit eaac9d4843
3 changed files with 93 additions and 34 deletions

View File

@ -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.
<<disclaimer>>
;;; Code:
(message "%s..." "Loading early-init.el")
;; BOOTSTRAP PACKAGE MANAGEMENT
<<early-init-package>>
;; SETUP FRAME
<<early-init-frame>>
(message "%s... Done." "Loading early-init.el")
;;; early-init.el ends here
#+end_src

View File

@ -14,6 +14,7 @@
;;; Code:
(message "%s..." "Loading early-init.el")
;; BOOTSTRAP PACKAGE MANAGEMENT
(let ((win-app-dir "~/Applications"))
(dolist (path (list
@ -85,5 +86,38 @@
(horizontal-scroll-bar-mode -1)
(setq-default frame-inhibit-implied-resize t
frame-resize-pixelwise t)
(setq-default indicate-empty-lines t)
(setq-default indicate-buffer-boundaries 'right)
(setq-default visual-line-fringe-indicators '(left-curly-arrow nil))
(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]))
(add-hook 'after-init-hook #'hook--setup-fringes-curly-arrows)
(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]))
(add-hook 'after-init-hook #'hook--setup-fringes-arrows)
(message "%s... Done." "Loading early-init.el")
;;; early-init.el ends here

View File

@ -16,6 +16,7 @@
(setq-default load-prefer-newer t)
(message "%s..." "Loading init.el")
(let* (;; Speed up init
(gc-cons-threshold most-positive-fixnum)
;; (gc-cons-percentage 0.6)
@ -46,5 +47,5 @@
(require 'org)
(org-babel-load-file config.org)
(message "%s... Done" "Loading config.org")))
(message "%s... Done." "Loading init.el")
;;; init.el ends here