diff options
author | Case Duckworth | 2021-10-20 17:31:13 -0500 |
---|---|---|
committer | Case Duckworth | 2021-10-20 17:31:13 -0500 |
commit | 0d311d36b9d5f430324d919ac097f2364588a432 (patch) | |
tree | a2e71547fac3fdeab473ca4083547b8b1dc26ed2 /init.el | |
parent | Move most of acdw-irc to acdw-circe (diff) | |
download | emacs-0d311d36b9d5f430324d919ac097f2364588a432.tar.gz emacs-0d311d36b9d5f430324d919ac097f2364588a432.zip |
blayfduoisaudfoiasdupjfoiu
Diffstat (limited to 'init.el')
-rw-r--r-- | init.el | 81 |
1 files changed, 35 insertions, 46 deletions
diff --git a/init.el b/init.el index c2a3579..8886660 100644 --- a/init.el +++ b/init.el | |||
@@ -95,6 +95,10 @@ | |||
95 | (expand-file-name-exists-p "pkg/" user-emacs-directory))) | 95 | (expand-file-name-exists-p "pkg/" user-emacs-directory))) |
96 | (normal-top-level-add-subdirs-to-load-path))) | 96 | (normal-top-level-add-subdirs-to-load-path))) |
97 | 97 | ||
98 | (setup auto-fill | ||
99 | (:hook (defun auto-fill@truncate-lines () | ||
100 | (setq-local truncate-lines t)))) | ||
101 | |||
98 | (setup autoinsert | 102 | (setup autoinsert |
99 | (require 'acdw-autoinsert) | 103 | (require 'acdw-autoinsert) |
100 | (acdw/define-auto-insert '(:replace t) | 104 | (acdw/define-auto-insert '(:replace t) |
@@ -169,7 +173,8 @@ | |||
169 | (cons (rx (or "youtube.com" ; videos | 173 | (cons (rx (or "youtube.com" ; videos |
170 | "youtu.be" | 174 | "youtu.be" |
171 | (seq "." (or "mp4" | 175 | (seq "." (or "mp4" |
172 | "gif") | 176 | "gif" |
177 | "mov" "MOV") | ||
173 | eos))) | 178 | eos))) |
174 | (lambda (&rest args) | 179 | (lambda (&rest args) |
175 | (apply (if (executable-find "mpv") | 180 | (apply (if (executable-find "mpv") |
@@ -390,7 +395,9 @@ | |||
390 | native-comp-async-report-warnings-errors nil | 395 | native-comp-async-report-warnings-errors nil |
391 | password-cache t | 396 | password-cache t |
392 | password-cache-expiry (* 60 5) ; seconds | 397 | password-cache-expiry (* 60 5) ; seconds |
393 | set-mark-command-repeat-pop t) | 398 | set-mark-command-repeat-pop t |
399 | hscroll-step 1 | ||
400 | scroll-step 1) | ||
394 | 401 | ||
395 | (when (fboundp 'command-completion-default-include-p) | 402 | (when (fboundp 'command-completion-default-include-p) |
396 | (setq read-extended-command-predicate | 403 | (setq read-extended-command-predicate |
@@ -414,6 +421,9 @@ | |||
414 | "C-c _" #'add-file-local-variable | 421 | "C-c _" #'add-file-local-variable |
415 | "C-x C-c" #'acdw/fat-finger-exit) | 422 | "C-x C-c" #'acdw/fat-finger-exit) |
416 | 423 | ||
424 | (global-set-key (kbd "M-n") (kbd "C-u 1 C-v")) | ||
425 | (global-set-key (kbd "M-p") (kbd "C-u 1 M-v")) | ||
426 | |||
417 | ;; inspo: https://github.com/zaeph/.emacs.d/blob/master/init.el#L479 | 427 | ;; inspo: https://github.com/zaeph/.emacs.d/blob/master/init.el#L479 |
418 | (defvar toggle-map (make-sparse-keymap) | 428 | (defvar toggle-map (make-sparse-keymap) |
419 | "A keymap for toggling!") | 429 | "A keymap for toggling!") |
@@ -555,7 +565,9 @@ | |||
555 | "C-c l v" #'find-variable)) | 565 | "C-c l v" #'find-variable)) |
556 | 566 | ||
557 | (setup flymake | 567 | (setup flymake |
558 | 568 | ;; TODO: look at flycheck for ideas around `flycheck-disabled-checkers' and | |
569 | ;; `flycheck-emacs-lisp-load-path'... there must be a way to get flymake to | ||
570 | ;; recognize new values in the load path. | ||
559 | (defvar-local flymake-inhibit nil | 571 | (defvar-local flymake-inhibit nil |
560 | "Buffer-local variable to inhibit `flymake'.") | 572 | "Buffer-local variable to inhibit `flymake'.") |
561 | (add-to-list 'safe-local-variable-values '(flymake-inhibit . t)) | 573 | (add-to-list 'safe-local-variable-values '(flymake-inhibit . t)) |
@@ -1760,6 +1772,8 @@ See also `crux-reopen-as-root-mode'." | |||
1760 | (setup (:straight (frowny | 1772 | (setup (:straight (frowny |
1761 | :host github | 1773 | :host github |
1762 | :repo "duckwork/frowny.el")) | 1774 | :repo "duckwork/frowny.el")) |
1775 | (:option frowny-eyes (rx (| ":" ":-" ":'" "=")) | ||
1776 | frowny-eyes-looking-back-limit 2) | ||
1763 | (global-frowny-mode +1)) | 1777 | (global-frowny-mode +1)) |
1764 | 1778 | ||
1765 | (setup (:straight gcmh) | 1779 | (setup (:straight gcmh) |
@@ -2194,7 +2208,7 @@ browser defined in `browse-url-secondary-browser-function'." | |||
2194 | 2208 | ||
2195 | (:bind "RET" #'acdw-org/return-dwim | 2209 | (:bind "RET" #'acdw-org/return-dwim |
2196 | "<S-return>" #'acdw-org/org-table-copy-down | 2210 | "<S-return>" #'acdw-org/org-table-copy-down |
2197 | "M-SPC M-SPC" #'insert-zero-width-space | 2211 | ;; "M-SPC M-SPC" #'insert-zero-width-space |
2198 | "C-c C-l" #'org-insert-link-dwim | 2212 | "C-c C-l" #'org-insert-link-dwim |
2199 | "C-c w" #'chd/do-the-thing | 2213 | "C-c w" #'chd/do-the-thing |
2200 | "C-c C-n" #'acdw/org-next-heading-widen | 2214 | "C-c C-n" #'acdw/org-next-heading-widen |
@@ -2216,40 +2230,15 @@ browser defined in `browse-url-secondary-browser-function'." | |||
2216 | #'org-export-remove-zero-width-spaces)) | 2230 | #'org-export-remove-zero-width-spaces)) |
2217 | 2231 | ||
2218 | (:local-hook before-save-hook | 2232 | (:local-hook before-save-hook |
2219 | (defun org/before-save@fix-blank-lines () | 2233 | (defun org/before-save@prettify-buffer () |
2220 | (acdw-org/fix-blank-lines t)) | 2234 | (run-with-idle-timer 1 nil |
2221 | before-save-hook | 2235 | (lambda () |
2222 | (defun org/before-save@align-tags () | 2236 | (with-temp-message "Filling..." |
2237 | (save-mark-and-excursion | ||
2238 | (mark-whole-buffer) | ||
2239 | (org-fill-paragraph nil t))))) | ||
2240 | (acdw-org/fix-blank-lines t) | ||
2223 | (org-align-tags :all))) | 2241 | (org-align-tags :all))) |
2224 | |||
2225 | (:hook ;; #'variable-pitch-mode | ||
2226 | |||
2227 | ;; (defun org-mode@before-save@fill-buffer () | ||
2228 | ;; (add-hook 'before-save-hook | ||
2229 | ;; (defun before-save@fill-buffer () | ||
2230 | ;; (fill-region (point-min) (point-max))) | ||
2231 | ;; nil :local)) | ||
2232 | |||
2233 | ;; This is super ugly because I need to add a function to | ||
2234 | ;; `before-save-hook', but only in org-mode buffers. So I make a hook | ||
2235 | ;; to make a hook. I'm sure there's a better way to do this. | ||
2236 | ;; (defun org-mode@fix-blank-lines-on-save () | ||
2237 | ;; (add-hook 'before-save-hook | ||
2238 | ;; (defun acdw-org/fix-blank-lines-in-buffer () | ||
2239 | ;; (acdw-org/fix-blank-lines t)) | ||
2240 | ;; 0 :local)) | ||
2241 | |||
2242 | ;; (defun org-mode@wc-stupid () | ||
2243 | ;; (unless (and wc-mode | ||
2244 | ;; (> 0 (+ (or wc-orig-words 0) | ||
2245 | ;; (or wc-words-delta 0))))) | ||
2246 | ;; (setq-local | ||
2247 | ;; wc-count-words-function | ||
2248 | ;; (lambda (start end) "Count words stupidly with a limit." | ||
2249 | ;; (acdw-org/count-words-stupidly start | ||
2250 | ;; end | ||
2251 | ;; 999)))) | ||
2252 | ) | ||
2253 | 2242 | ||
2254 | (with-eval-after-load 'org | 2243 | (with-eval-after-load 'org |
2255 | (org-clock-persistence-insinuate)) | 2244 | (org-clock-persistence-insinuate)) |
@@ -2708,16 +2697,16 @@ If used with a numeric prefix argument N, N backticks will be inserted." | |||
2708 | (setup (:straight wgrep) | 2697 | (setup (:straight wgrep) |
2709 | (wgrep-setup)) | 2698 | (wgrep-setup)) |
2710 | 2699 | ||
2711 | (setup (:straight which-key) | 2700 | ;; (setup (:straight which-key) |
2712 | (:option which-key-show-early-on-C-h t | 2701 | ;; (:option which-key-show-early-on-C-h t |
2713 | which-key-idle-delay 1 | 2702 | ;; which-key-idle-delay 1 |
2714 | which-key-idle-secondary-delay 0.5 | 2703 | ;; which-key-idle-secondary-delay 0.5 |
2715 | which-key-sort-order 'which-key-prefix-then-key-order) | 2704 | ;; which-key-sort-order 'which-key-prefix-then-key-order) |
2716 | 2705 | ||
2717 | (:global "C-h m" #'which-key-show-major-mode) | 2706 | ;; (:global "C-h m" #'which-key-show-major-mode) |
2718 | 2707 | ||
2719 | (which-key-setup-side-window-right-bottom) | 2708 | ;; (which-key-setup-side-window-right-bottom) |
2720 | (which-key-mode +1)) | 2709 | ;; (which-key-mode +1)) |
2721 | 2710 | ||
2722 | (setup (:straight whitespace-cleanup-mode) | 2711 | (setup (:straight whitespace-cleanup-mode) |
2723 | (global-whitespace-cleanup-mode +1)) | 2712 | (global-whitespace-cleanup-mode +1)) |