diff options
author | Case Duckworth | 2023-01-14 19:14:24 -0600 |
---|---|---|
committer | Case Duckworth | 2023-01-14 19:14:24 -0600 |
commit | 2223dd66591aad1ee44916994c8782d5a59315d0 (patch) | |
tree | 50ed30832c247a023b22b038da3f27891cc0c2f9 | |
parent | Add +completions.el (diff) | |
download | emacs-2223dd66591aad1ee44916994c8782d5a59315d0.tar.gz emacs-2223dd66591aad1ee44916994c8782d5a59315d0.zip |
Whitespace etc.
-rw-r--r-- | basics.el | 170 | ||||
-rw-r--r-- | early-init.el | 12 | ||||
-rw-r--r-- | init.el | 159 |
3 files changed, 180 insertions, 161 deletions
diff --git a/basics.el b/basics.el index 3b24a68..7b4b1fd 100644 --- a/basics.el +++ b/basics.el | |||
@@ -29,61 +29,61 @@ | |||
29 | :ensure t :demand t | 29 | :ensure t :demand t |
30 | :preface | 30 | :preface |
31 | (setq-default no-littering-etc-directory etc/ | 31 | (setq-default no-littering-etc-directory etc/ |
32 | no-littering-var-directory etc/)) | 32 | no-littering-var-directory etc/)) |
33 | 33 | ||
34 | ;;; Settings | 34 | ;;; Settings |
35 | 35 | ||
36 | ;; Async | 36 | ;; Async |
37 | (setq-default async-shell-command-buffer 'new-buffer | 37 | (setq-default async-shell-command-buffer 'new-buffer |
38 | async-shell-command-display-buffer nil) | 38 | async-shell-command-display-buffer nil) |
39 | 39 | ||
40 | ;; Scrolling | 40 | ;; Scrolling |
41 | (setq-default auto-hscroll-mode t | 41 | (setq-default auto-hscroll-mode t |
42 | auto-window-vscroll nil | 42 | auto-window-vscroll nil |
43 | fast-but-imprecise-scrolling t | 43 | fast-but-imprecise-scrolling t |
44 | hscroll-margin 1 | 44 | hscroll-margin 1 |
45 | hscroll-step 1 | 45 | hscroll-step 1 |
46 | scroll-conservatively 25 | 46 | scroll-conservatively 25 |
47 | scroll-margin 0 | 47 | scroll-margin 0 |
48 | scroll-preserve-screen-position 1 | 48 | scroll-preserve-screen-position 1 |
49 | scroll-step 1) | 49 | scroll-step 1) |
50 | (scroll-bar-mode -1) | 50 | (scroll-bar-mode -1) |
51 | (horizontal-scroll-bar-mode -1) | 51 | (horizontal-scroll-bar-mode -1) |
52 | (pixel-scroll-precision-mode) | 52 | (pixel-scroll-precision-mode) |
53 | 53 | ||
54 | ;; Cursor | 54 | ;; Cursor |
55 | (setq-default cursor-in-non-selected-windows 'hollow | 55 | (setq-default cursor-in-non-selected-windows 'hollow |
56 | cursor-type 'bar | 56 | cursor-type 'bar |
57 | blink-cursor-blinks 1 | 57 | blink-cursor-blinks 1 |
58 | blink-cursor-interval 0.25 | 58 | blink-cursor-interval 0.25 |
59 | blink-cursor-delay 0.25) | 59 | blink-cursor-delay 0.25) |
60 | (blink-cursor-mode) | 60 | (blink-cursor-mode) |
61 | 61 | ||
62 | ;; Mouse | 62 | ;; Mouse |
63 | (setq-default mouse-drag-copy-region t | 63 | (setq-default mouse-drag-copy-region t |
64 | mouse-wheel-progressive-speed nil | 64 | mouse-wheel-progressive-speed nil |
65 | mouse-yank-at-point t) | 65 | mouse-yank-at-point t) |
66 | 66 | ||
67 | ;; Dialogs | 67 | ;; Dialogs |
68 | (unless (boundp 'use-short-answers) | 68 | (unless (boundp 'use-short-answers) |
69 | (fset 'yes-or-no-p 'y-or-n-p)) | 69 | (fset 'yes-or-no-p 'y-or-n-p)) |
70 | 70 | ||
71 | (setq-default read-answer-short t | 71 | (setq-default read-answer-short t |
72 | use-dialog-box nil | 72 | use-dialog-box nil |
73 | use-file-dialog nil | 73 | use-file-dialog nil |
74 | use-short-answers t) | 74 | use-short-answers t) |
75 | 75 | ||
76 | ;; Minibuffer | 76 | ;; Minibuffer |
77 | (setq-default completion-ignore-case t | 77 | (setq-default completion-ignore-case t |
78 | read-buffer-completion-ignore-case t | 78 | read-buffer-completion-ignore-case t |
79 | read-file-name-completion-ignore-case t | 79 | read-file-name-completion-ignore-case t |
80 | completions-detailed t | 80 | completions-detailed t |
81 | enable-recursive-minibuffers t | 81 | enable-recursive-minibuffers t |
82 | file-name-shadow-properties '(invisible t intangible t) | 82 | file-name-shadow-properties '(invisible t intangible t) |
83 | minibuffer-eldef-shorten-default t | 83 | minibuffer-eldef-shorten-default t |
84 | minibuffer-prompt-properties '( read-only t | 84 | minibuffer-prompt-properties '( read-only t |
85 | cursor-intangible t | 85 | cursor-intangible t |
86 | face minibuffer-prompt)) | 86 | face minibuffer-prompt)) |
87 | (file-name-shadow-mode) | 87 | (file-name-shadow-mode) |
88 | (minibuffer-electric-default-mode) | 88 | (minibuffer-electric-default-mode) |
89 | 89 | ||
@@ -98,15 +98,15 @@ | |||
98 | 98 | ||
99 | (require 'savehist) | 99 | (require 'savehist) |
100 | (setq-default history-length 1024 | 100 | (setq-default history-length 1024 |
101 | history-delete-duplicates t | 101 | history-delete-duplicates t |
102 | ;; savehist-file (etc/ "savehist.el") | 102 | ;; savehist-file (etc/ "savehist.el") |
103 | savehist-save-minibuffer-history t | 103 | savehist-save-minibuffer-history t |
104 | savehist-autosave-interval 30) | 104 | savehist-autosave-interval 30) |
105 | (savehist-mode) | 105 | (savehist-mode) |
106 | 106 | ||
107 | ;; Killing and yanking | 107 | ;; Killing and yanking |
108 | (setq-default kill-do-not-save-duplicates t | 108 | (setq-default kill-do-not-save-duplicates t |
109 | kill-read-only-ok t | 109 | kill-read-only-ok t |
110 | ;; XXX: This setting causes an error message the first time it's | 110 | ;; XXX: This setting causes an error message the first time it's |
111 | ;; called: "Selection owner couldn't convert: TIMESTAMP". I have | 111 | ;; called: "Selection owner couldn't convert: TIMESTAMP". I have |
112 | ;; absolutely no idea why I get this error, but it's generated in | 112 | ;; absolutely no idea why I get this error, but it's generated in |
@@ -114,12 +114,12 @@ | |||
114 | ;; do anything else with it, so for now, I'll just live with the | 114 | ;; do anything else with it, so for now, I'll just live with the |
115 | ;; message. | 115 | ;; message. |
116 | save-interprogram-paste-before-kill t | 116 | save-interprogram-paste-before-kill t |
117 | yank-pop-change-selection t) | 117 | yank-pop-change-selection t) |
118 | (delete-selection-mode) | 118 | (delete-selection-mode) |
119 | 119 | ||
120 | ;; Notifying the user | 120 | ;; Notifying the user |
121 | (setq-default echo-keystrokes 0.01 | 121 | (setq-default echo-keystrokes 0.01 |
122 | ring-bell-function #'ignore) | 122 | ring-bell-function #'ignore) |
123 | 123 | ||
124 | ;; Point and mark | 124 | ;; Point and mark |
125 | (setq-default set-mark-command-repeat-pop t) | 125 | (setq-default set-mark-command-repeat-pop t) |
@@ -129,8 +129,8 @@ | |||
129 | 129 | ||
130 | ;; Startup | 130 | ;; Startup |
131 | (setq-default inhibit-startup-screen t | 131 | (setq-default inhibit-startup-screen t |
132 | initial-buffer-choice t | 132 | initial-buffer-choice t |
133 | initial-scratch-message nil) | 133 | initial-scratch-message nil) |
134 | 134 | ||
135 | (define-advice startup-echo-area-message (:override ()) | 135 | (define-advice startup-echo-area-message (:override ()) |
136 | (if (get-buffer "*Warnings*") | 136 | (if (get-buffer "*Warnings*") |
@@ -143,15 +143,15 @@ | |||
143 | 143 | ||
144 | ;; Text editing | 144 | ;; Text editing |
145 | (setq-default fill-column 80 | 145 | (setq-default fill-column 80 |
146 | sentence-end-double-space t | 146 | sentence-end-double-space t |
147 | tab-width 8 | 147 | tab-width 8 |
148 | tab-always-indent 'complete) | 148 | tab-always-indent 'complete) |
149 | (global-so-long-mode) | 149 | (global-so-long-mode) |
150 | 150 | ||
151 | (setq-default show-paren-delay 0.01 | 151 | (setq-default show-paren-delay 0.01 |
152 | show-paren-style 'parenthesis | 152 | show-paren-style 'parenthesis |
153 | show-paren-when-point-in-periphery t | 153 | show-paren-when-point-in-periphery t |
154 | show-paren-when-point-inside-paren t) | 154 | show-paren-when-point-inside-paren t) |
155 | (show-paren-mode) | 155 | (show-paren-mode) |
156 | (electric-pair-mode) | 156 | (electric-pair-mode) |
157 | 157 | ||
@@ -177,33 +177,33 @@ | |||
177 | 177 | ||
178 | ;; Abbrev | 178 | ;; Abbrev |
179 | (setq-default abbrev-file-name (sync/ "abbrev.el") | 179 | (setq-default abbrev-file-name (sync/ "abbrev.el") |
180 | save-abbrevs 'silently) | 180 | save-abbrevs 'silently) |
181 | 181 | ||
182 | ;; Files | 182 | ;; Files |
183 | (setq-default auto-revert-verbose nil | 183 | (setq-default auto-revert-verbose nil |
184 | global-auto-revert-non-file-buffers t | 184 | global-auto-revert-non-file-buffers t |
185 | create-lockfiles nil | 185 | create-lockfiles nil |
186 | find-file-visit-truename t | 186 | find-file-visit-truename t |
187 | mode-require-final-newline t | 187 | mode-require-final-newline t |
188 | view-read-only t | 188 | view-read-only t |
189 | save-silently t) | 189 | save-silently t) |
190 | (global-auto-revert-mode) | 190 | (global-auto-revert-mode) |
191 | 191 | ||
192 | (setq-default auto-save-default nil | 192 | (setq-default auto-save-default nil |
193 | auto-save-interval 1 | 193 | auto-save-interval 1 |
194 | auto-save-no-message t | 194 | auto-save-no-message t |
195 | auto-save-timeout 1 | 195 | auto-save-timeout 1 |
196 | auto-save-visited-interval 1 | 196 | auto-save-visited-interval 1 |
197 | remote-file-name-inhibit-auto-save-visited t) | 197 | remote-file-name-inhibit-auto-save-visited t) |
198 | (add-to-list 'auto-save-file-name-transforms | 198 | (add-to-list 'auto-save-file-name-transforms |
199 | `(".*" ,(etc/ "auto-save/" t) t)) | 199 | `(".*" ,(etc/ "auto-save/" t) t)) |
200 | (auto-save-visited-mode) | 200 | (auto-save-visited-mode) |
201 | 201 | ||
202 | (setq-default backup-by-copying t | 202 | (setq-default backup-by-copying t |
203 | version-control t | 203 | version-control t |
204 | kept-new-versions 8 | 204 | kept-new-versions 8 |
205 | kept-old-versions 8 | 205 | kept-old-versions 8 |
206 | delete-old-versions t) | 206 | delete-old-versions t) |
207 | 207 | ||
208 | (require 'recentf) | 208 | (require 'recentf) |
209 | (setq-default ;; recentf-save-file (etc/ "recentf" t) | 209 | (setq-default ;; recentf-save-file (etc/ "recentf" t) |
@@ -218,7 +218,7 @@ | |||
218 | (require 'saveplace) | 218 | (require 'saveplace) |
219 | (setq-default ;; save-place-file (etc/ "places.el") | 219 | (setq-default ;; save-place-file (etc/ "places.el") |
220 | save-place-forget-unreadable-files (eq system-type | 220 | save-place-forget-unreadable-files (eq system-type |
221 | 'gnu/linux)) | 221 | 'gnu/linux)) |
222 | (save-place-mode) | 222 | (save-place-mode) |
223 | 223 | ||
224 | (require 'uniquify) | 224 | (require 'uniquify) |
@@ -228,12 +228,18 @@ | |||
228 | uniquify-separator path-separator) | 228 | uniquify-separator path-separator) |
229 | 229 | ||
230 | (setq-local vc-follow-symlinks t | 230 | (setq-local vc-follow-symlinks t |
231 | vc-make-backup-files t) | 231 | vc-make-backup-files t) |
232 | |||
233 | ;; Whitespace | ||
234 | (require 'whitespace) | ||
235 | (setq-default whitespace-style | ||
236 | '(face trailing tabs space-after-tab space-before-tab tab-mark)) | ||
237 | (global-whitespace-mode) | ||
232 | 238 | ||
233 | ;; Native compilation | 239 | ;; Native compilation |
234 | (setq-default native-comp-async-report-warnings-errors 'silent | 240 | (setq-default native-comp-async-report-warnings-errors 'silent |
235 | native-comp-deferred-compilation t | 241 | native-comp-deferred-compilation t |
236 | native-compile-target-directory (etc/ "eln" t)) | 242 | native-compile-target-directory (etc/ "eln" t)) |
237 | (add-to-list 'native-comp-eln-load-path native-compile-target-directory) | 243 | (add-to-list 'native-comp-eln-load-path native-compile-target-directory) |
238 | (when (fboundp 'startup-redirect-eln-cache) | 244 | (when (fboundp 'startup-redirect-eln-cache) |
239 | (startup-redirect-eln-cache native-compile-target-directory)) | 245 | (startup-redirect-eln-cache native-compile-target-directory)) |
@@ -302,13 +308,13 @@ N spaces." | |||
302 | #'+lisp-comment-or-uncomment-sexp))) | 308 | #'+lisp-comment-or-uncomment-sexp))) |
303 | 309 | ||
304 | (define-key emacs-lisp-mode-map (kbd "C-c C-c") | 310 | (define-key emacs-lisp-mode-map (kbd "C-c C-c") |
305 | #'eval-defun) | 311 | #'eval-defun) |
306 | (define-key emacs-lisp-mode-map (kbd "C-c C-k") | 312 | (define-key emacs-lisp-mode-map (kbd "C-c C-k") |
307 | #'elisp-eval-region-or-buffer) | 313 | #'elisp-eval-region-or-buffer) |
308 | (define-key lisp-interaction-mode-map (kbd "C-c C-c") | 314 | (define-key lisp-interaction-mode-map (kbd "C-c C-c") |
309 | #'eval-defun) | 315 | #'eval-defun) |
310 | (define-key lisp-interaction-mode-map (kbd "C-c C-k") | 316 | (define-key lisp-interaction-mode-map (kbd "C-c C-k") |
311 | #'elisp-eval-region-or-buffer) | 317 | #'elisp-eval-region-or-buffer) |
312 | (define-advice eval-region (:around (orig start end &rest args) pulse) | 318 | (define-advice eval-region (:around (orig start end &rest args) pulse) |
313 | (apply orig start end args) | 319 | (apply orig start end args) |
314 | (pulse-momentary-highlight-region start end)) | 320 | (pulse-momentary-highlight-region start end)) |
@@ -320,17 +326,17 @@ N spaces." | |||
320 | (add-hook 'after-save-hook #'executable-make-buffer-file-executable-if-script-p) | 326 | (add-hook 'after-save-hook #'executable-make-buffer-file-executable-if-script-p) |
321 | 327 | ||
322 | (add-hook 'find-file-not-found-functions | 328 | (add-hook 'find-file-not-found-functions |
323 | (defun create-missing-directories () | 329 | (defun create-missing-directories () |
324 | "Automatically create missing directories." | 330 | "Automatically create missing directories." |
325 | (let ((target-dir (file-name-directory buffer-file-name))) | 331 | (let ((target-dir (file-name-directory buffer-file-name))) |
326 | (unless (file-exists-p target-dir) | 332 | (unless (file-exists-p target-dir) |
327 | (make-directory target-dir :parents))))) | 333 | (make-directory target-dir :parents))))) |
328 | 334 | ||
329 | (add-hook 'find-file-hook | 335 | (add-hook 'find-file-hook |
330 | (defun vc-remote-off () | 336 | (defun vc-remote-off () |
331 | "Turn VC off when remote." | 337 | "Turn VC off when remote." |
332 | (when (file-remote-p (buffer-file-name)) | 338 | (when (file-remote-p (buffer-file-name)) |
333 | (setq-local vc-handled-backends nil)))) | 339 | (setq-local vc-handled-backends nil)))) |
334 | 340 | ||
335 | ;;; Advice | 341 | ;;; Advice |
336 | 342 | ||
@@ -555,15 +561,15 @@ See also `with-region-or-to-eol'." | |||
555 | ;; Optionally make narrowing help available in the minibuffer. | 561 | ;; Optionally make narrowing help available in the minibuffer. |
556 | ;; You may want to use `embark-prefix-help-command' or which-key instead. | 562 | ;; You may want to use `embark-prefix-help-command' or which-key instead. |
557 | (define-key consult-narrow-map (vconcat consult-narrow-key "?") | 563 | (define-key consult-narrow-map (vconcat consult-narrow-key "?") |
558 | #'consult-narrow-help)) | 564 | #'consult-narrow-help)) |
559 | 565 | ||
560 | (use-package orderless | 566 | (use-package orderless |
561 | :ensure t :demand t | 567 | :ensure t :demand t |
562 | :init | 568 | :init |
563 | (setopt completion-styles '(substring orderless basic) | 569 | (setopt completion-styles '(substring orderless basic) |
564 | completion-category-defaults nil | 570 | completion-category-defaults nil |
565 | completion-category-overrides | 571 | completion-category-overrides |
566 | '((file (styles basic partial-completion))))) | 572 | '((file (styles basic partial-completion orderless))))) |
567 | 573 | ||
568 | (use-package marginalia | 574 | (use-package marginalia |
569 | :ensure t :demand t | 575 | :ensure t :demand t |
@@ -593,8 +599,8 @@ See also `with-region-or-to-eol'." | |||
593 | :ensure t | 599 | :ensure t |
594 | :config | 600 | :config |
595 | (setq undo-fu-session-incompatible-files | 601 | (setq undo-fu-session-incompatible-files |
596 | '("/COMMIT_EDITMSG\\'" | 602 | '("/COMMIT_EDITMSG\\'" |
597 | "/git-rebase-todo\\'")) | 603 | "/git-rebase-todo\\'")) |
598 | (global-undo-fu-session-mode)) | 604 | (global-undo-fu-session-mode)) |
599 | 605 | ||
600 | ;;; basics.el ends here | 606 | ;;; basics.el ends here |
diff --git a/early-init.el b/early-init.el index d59fe64..70b61a8 100644 --- a/early-init.el +++ b/early-init.el | |||
@@ -9,9 +9,9 @@ | |||
9 | 9 | ||
10 | ;; Frames | 10 | ;; Frames |
11 | (setq default-frame-alist '((tool-bar-lines . 0) | 11 | (setq default-frame-alist '((tool-bar-lines . 0) |
12 | (menu-bar-lines . 0) | 12 | (menu-bar-lines . 0) |
13 | (vertical-scroll-bars . nil) | 13 | (vertical-scroll-bars . nil) |
14 | (horizontal-scroll-bars . nil)) | 14 | (horizontal-scroll-bars . nil)) |
15 | frame-inhibit-implied-resize t | 15 | frame-inhibit-implied-resize t |
16 | frame-resize-pixelwise t | 16 | frame-resize-pixelwise t |
17 | window-resize-pixelwise t | 17 | window-resize-pixelwise t |
@@ -22,12 +22,12 @@ | |||
22 | ;; Packages | 22 | ;; Packages |
23 | (require 'package) | 23 | (require 'package) |
24 | (add-to-list 'package-archives | 24 | (add-to-list 'package-archives |
25 | '("melpa" . "https://melpa.org/packages/") :append) | 25 | '("melpa" . "https://melpa.org/packages/") :append) |
26 | (add-to-list 'package-archives | 26 | (add-to-list 'package-archives |
27 | '("melpa-stable" . "https://stable.melpa.org/packages/") :append) | 27 | '("melpa-stable" . "https://stable.melpa.org/packages/") :append) |
28 | (setq package-priorities '(("melpa" . 3) | 28 | (setq package-priorities '(("melpa" . 3) |
29 | ("nongnu" . 2) | 29 | ("nongnu" . 2) |
30 | ("gnu" . 1) | 30 | ("gnu" . 1) |
31 | ("melpa-stable" . 0))) | 31 | ("melpa-stable" . 0))) |
32 | (package-initialize) | 32 | (package-initialize) |
33 | (unless package-archive-contents | 33 | (unless package-archive-contents |
diff --git a/init.el b/init.el index f4eac89..f114adf 100644 --- a/init.el +++ b/init.el | |||
@@ -9,58 +9,71 @@ | |||
9 | ;;; Built-ins | 9 | ;;; Built-ins |
10 | 10 | ||
11 | (use-package emacs ; Misc. config | 11 | (use-package emacs ; Misc. config |
12 | :custom-face | ||
13 | (fixed-pitch ((t :family ,(find-font "Comic Code" | ||
14 | "DejaVu Sans Mono") | ||
15 | :height 100))) | ||
16 | (variable-pitch ((t :family ,(find-font "Atkinson Hyperlegible" | ||
17 | "DejaVu Serif") | ||
18 | :height 1.4))) | ||
19 | (default ((t :family ,(find-font "Comic Code" | ||
20 | "DejaVu Sans Mono") | ||
21 | :height 100))) | ||
22 | (font-lock-comment-face ((t :slant italic))) | ||
23 | :config | 12 | :config |
24 | (setopt tab-bar-show 1 | 13 | (setopt tab-bar-show 1 |
25 | recenter-positions '(top middle bottom)) | 14 | recenter-positions '(top middle bottom) |
26 | (keymap-global-unset "C-\\")) | 15 | initial-scratch-message |
16 | (mapconcat (lambda (s) (format ";; %s" s)) | ||
17 | (process-lines "fortune") | ||
18 | "\n")) | ||
19 | (keymap-global-unset "C-\\") | ||
20 | (add-hook 'kill-buffer-query-functions | ||
21 | (defun scratch@immortal () | ||
22 | (if (equal (buffer-name) "*scratch*") | ||
23 | (progn (bury-buffer) nil) | ||
24 | t)))) | ||
27 | 25 | ||
28 | (use-package faces | 26 | (use-package faces |
29 | :defer 2 ; This is sort of expensive | ||
30 | :config | 27 | :config |
31 | ;; Emojis | 28 | (add-hook 'server-after-make-frame-hook |
32 | (cl-loop with ffl = (font-family-list) | 29 | (defun first-frame@set-fonts () |
33 | for font in '("Noto Emoji" "Noto Color Emoji" | 30 | (face-spec-set 'fixed-pitch |
34 | "Segoe UI Emoji" "Apple Color Emoji" | 31 | `((t :family ,(find-font "Comic Code" |
35 | "FreeSans" "FreeMono" "FreeSerif" | 32 | "DejaVu Sans Mono") |
36 | "Unifont" "Symbola") | 33 | :height 100))) |
37 | if (member font ffl) | 34 | (face-spec-set 'variable-pitch |
38 | do (set-fontset-font t 'symbol font)) | 35 | `((t :family ,(find-font "Atkinson Hyperlegible" |
39 | ;; International scripts | 36 | "DejaVu Serif") |
40 | (cl-loop with ffl = (font-family-list) | 37 | :height 1.4))) |
41 | for (charset . font) in '((latin . "Noto Sans") | 38 | (face-spec-set 'default |
42 | (han . "Noto Sans CJK SC Regular") | 39 | `((t :family ,(find-font "Comic Code" |
43 | (kana . "Noto Sans CJK JP Regular") | 40 | "DejaVu Sans Mono") |
44 | (hangul . "Noto Sans CJK KR Regular") | 41 | :height 100))) |
45 | (cjk-misc . "Noto Sans CJK KR Regular") | 42 | (face-spec-set 'font-lock-comment-face |
46 | (khmer . "Noto Sans Khmer") | 43 | `((t :slant italic))) |
47 | (lao . "Noto Sans Lao") | 44 | ;; Emojis |
48 | (burmese . "Noto Sans Myanmar") | 45 | (cl-loop with ffl = (font-family-list) |
49 | (thai . "Noto Sans Thai") | 46 | for font in '("Noto Emoji" "Noto Color Emoji" |
50 | (ethiopic . "Noto Sans Ethiopic") | 47 | "Segoe UI Emoji" "Apple Color Emoji" |
51 | (hebrew . "Noto Sans Hebrew") | 48 | "FreeSans" "FreeMono" "FreeSerif" |
52 | (arabic . "Noto Sans Arabic") | 49 | "Unifont" "Symbola") |
53 | (gujarati . "Noto Sans Gujarati") | 50 | if (member font ffl) |
54 | (devanagari . "Noto Sans Devanagari") | 51 | do (set-fontset-font t 'symbol font)) |
55 | (kannada . "Noto Sans Kannada") | 52 | ;; International scripts |
56 | (malayalam . "Noto Sans Malayalam") | 53 | (cl-loop with ffl = (font-family-list) |
57 | (oriya . "Noto Sans Oriya") | 54 | for (charset . font) in '((latin . "Noto Sans") |
58 | (sinhala . "Noto Sans Sinhala") | 55 | (han . "Noto Sans CJK SC Regular") |
59 | (tamil . "Noto Sans Tamil") | 56 | (kana . "Noto Sans CJK JP Regular") |
60 | (telugu . "Noto Sans Telugu") | 57 | (hangul . "Noto Sans CJK KR Regular") |
61 | (tibetan . "Noto Sans Tibetan")) | 58 | (cjk-misc . "Noto Sans CJK KR Regular") |
62 | if (member font ffl) | 59 | (khmer . "Noto Sans Khmer") |
63 | do (set-fontset-font t charset font))) | 60 | (lao . "Noto Sans Lao") |
61 | (burmese . "Noto Sans Myanmar") | ||
62 | (thai . "Noto Sans Thai") | ||
63 | (ethiopic . "Noto Sans Ethiopic") | ||
64 | (hebrew . "Noto Sans Hebrew") | ||
65 | (arabic . "Noto Sans Arabic") | ||
66 | (gujarati . "Noto Sans Gujarati") | ||
67 | (devanagari . "Noto Sans Devanagari") | ||
68 | (kannada . "Noto Sans Kannada") | ||
69 | (malayalam . "Noto Sans Malayalam") | ||
70 | (oriya . "Noto Sans Oriya") | ||
71 | (sinhala . "Noto Sans Sinhala") | ||
72 | (tamil . "Noto Sans Tamil") | ||
73 | (telugu . "Noto Sans Telugu") | ||
74 | (tibetan . "Noto Sans Tibetan")) | ||
75 | if (member font ffl) | ||
76 | do (set-fontset-font t charset font))))) | ||
64 | 77 | ||
65 | (use-package text-mode | 78 | (use-package text-mode |
66 | :config | 79 | :config |
@@ -71,11 +84,11 @@ | |||
71 | (add-hook 'prog-mode-hook #'auto-fill-mode) | 84 | (add-hook 'prog-mode-hook #'auto-fill-mode) |
72 | (add-hook 'prog-mode-hook | 85 | (add-hook 'prog-mode-hook |
73 | (defun prog@indent-tabs-maybe () | 86 | (defun prog@indent-tabs-maybe () |
74 | (indent-tabs-mode | 87 | (indent-tabs-mode |
75 | (if (derived-mode-p 'emacs-lisp-mode | 88 | (if (derived-mode-p 'emacs-lisp-mode |
76 | 'python-mode | 89 | 'python-mode |
77 | 'haskell-mode) | 90 | 'haskell-mode) |
78 | -1 1))))) | 91 | -1 1))))) |
79 | 92 | ||
80 | (use-package eshell | 93 | (use-package eshell |
81 | :preface | 94 | :preface |
@@ -201,15 +214,15 @@ | |||
201 | :after custom-allowed | 214 | :after custom-allowed |
202 | :config | 215 | :config |
203 | (add-hook 'custom-allowed-after-load-hook | 216 | (add-hook 'custom-allowed-after-load-hook |
204 | (defun dawn-modus () | 217 | (defun dawn-modus () |
205 | (dawn-schedule-themes 'modus-operandi | 218 | (dawn-schedule-themes 'modus-operandi |
206 | 'modus-vivendi)))) | 219 | 'modus-vivendi)))) |
207 | 220 | ||
208 | (use-package electric-cursor | 221 | (use-package electric-cursor |
209 | :load-path "~/src/emacs/electric-cursor/" | 222 | :load-path "~/src/emacs/electric-cursor/" |
210 | :config | 223 | :config |
211 | (setopt electric-cursor-alist '((overwrite-mode . box) | 224 | (setopt electric-cursor-alist '((overwrite-mode . box) |
212 | (t . bar))) | 225 | (t . bar))) |
213 | (electric-cursor-mode)) | 226 | (electric-cursor-mode)) |
214 | 227 | ||
215 | (use-package mode-line-bell | 228 | (use-package mode-line-bell |
@@ -378,10 +391,10 @@ With prefix ARG, toggle the value of | |||
378 | (define-advice load-theme (:after (&rest _) mlscroll) | 391 | (define-advice load-theme (:after (&rest _) mlscroll) |
379 | (mlscroll-mode -1) | 392 | (mlscroll-mode -1) |
380 | (when (seq-intersection '(modus-vivendi modus-operandi) | 393 | (when (seq-intersection '(modus-vivendi modus-operandi) |
381 | custom-enabled-themes) | 394 | custom-enabled-themes) |
382 | (modus-themes-with-colors | 395 | (modus-themes-with-colors |
383 | (setq mlscroll-in-color fg-dim | 396 | (setq mlscroll-in-color fg-dim |
384 | mlscroll-out-color bg-inactive))) | 397 | mlscroll-out-color bg-inactive))) |
385 | (run-with-idle-timer 1 nil #'mlscroll-mode)) | 398 | (run-with-idle-timer 1 nil #'mlscroll-mode)) |
386 | :config | 399 | :config |
387 | (load-theme@mlscroll)) | 400 | (load-theme@mlscroll)) |
@@ -399,8 +412,8 @@ With prefix ARG, toggle the value of | |||
399 | :config | 412 | :config |
400 | (setopt ws-butler-trim-predicate | 413 | (setopt ws-butler-trim-predicate |
401 | (lambda (begin end) | 414 | (lambda (begin end) |
402 | (not (eq 'font-lock-string-face | 415 | (not (eq 'font-lock-string-face |
403 | (get-text-property end 'face))))) | 416 | (get-text-property end 'face))))) |
404 | (ws-butler-global-mode)) | 417 | (ws-butler-global-mode)) |
405 | 418 | ||
406 | (use-package wgrep | 419 | (use-package wgrep |
@@ -408,16 +421,16 @@ With prefix ARG, toggle the value of | |||
408 | :config | 421 | :config |
409 | (setopt wgrep-enable-key (kbd "C-x C-q")) | 422 | (setopt wgrep-enable-key (kbd "C-x C-q")) |
410 | :bind (:map grep-mode-map | 423 | :bind (:map grep-mode-map |
411 | ("C-x C-q" . wgrep-change-to-wgrep-mode))) | 424 | ("C-x C-q" . wgrep-change-to-wgrep-mode))) |
412 | 425 | ||
413 | (use-package avy | 426 | (use-package avy |
414 | :ensure t | 427 | :ensure t |
415 | :init | 428 | :init |
416 | (setopt avy-background t | 429 | (setopt avy-background t |
417 | avy-keys (string-to-list "asdfghjklqwertyuiopzxcvbnm")) | 430 | avy-keys (string-to-list "asdfghjklqwertyuiopzxcvbnm")) |
418 | :bind (("M-j" . avy-goto-char-timer) | 431 | :bind (("M-j" . avy-goto-char-timer) |
419 | :map isearch-mode-map | 432 | :map isearch-mode-map |
420 | ("M-j" . avy-isearch))) | 433 | ("M-j" . avy-isearch))) |
421 | 434 | ||
422 | (use-package zzz-to-char | 435 | (use-package zzz-to-char |
423 | :ensure t | 436 | :ensure t |
@@ -426,16 +439,16 @@ With prefix ARG, toggle the value of | |||
426 | (use-package anzu | 439 | (use-package anzu |
427 | :ensure t | 440 | :ensure t |
428 | :bind (("M-%" . anzu-query-replace-regexp) | 441 | :bind (("M-%" . anzu-query-replace-regexp) |
429 | ("C-M-%" . anzu-query-replace))) | 442 | ("C-M-%" . anzu-query-replace))) |
430 | 443 | ||
431 | (use-package isearch-mb | 444 | (use-package isearch-mb |
432 | :ensure t | 445 | :ensure t |
433 | :config | 446 | :config |
434 | (setopt isearch-lazy-count t | 447 | (setopt isearch-lazy-count t |
435 | isearch-regexp-lax-whitespace t | 448 | isearch-regexp-lax-whitespace t |
436 | search-whitespace-regexp "\\W+" | 449 | search-whitespace-regexp "\\W+" |
437 | search-default-mode t ; Search regexp by default | 450 | search-default-mode t ; Search regexp by default |
438 | isearch-wrap-pause 'no) | 451 | isearch-wrap-pause 'no) |
439 | (define-advice isearch-cancel (:before (&rest _) add-search-to-history) | 452 | (define-advice isearch-cancel (:before (&rest _) add-search-to-history) |
440 | "Add search string to history when canceling." | 453 | "Add search string to history when canceling." |
441 | (unless (equal "" isearch-string) | 454 | (unless (equal "" isearch-string) |
@@ -444,11 +457,11 @@ With prefix ARG, toggle the value of | |||
444 | "Don't exit replace for any key that's not in `query-replace-map'." | 457 | "Don't exit replace for any key that's not in `query-replace-map'." |
445 | (save-window-excursion | 458 | (save-window-excursion |
446 | (cl-letf* ((lookup-key-orig (symbol-function 'lookup-key)) | 459 | (cl-letf* ((lookup-key-orig (symbol-function 'lookup-key)) |
447 | ((symbol-function 'lookup-key) | 460 | ((symbol-function 'lookup-key) |
448 | (lambda (map key &optional accept-default) | 461 | (lambda (map key &optional accept-default) |
449 | (or (apply lookup-key-orig map key accept-default) | 462 | (or (apply lookup-key-orig map key accept-default) |
450 | (when (eq map query-replace-map) 'help))))) | 463 | (when (eq map query-replace-map) 'help))))) |
451 | (apply orig r)))) | 464 | (apply orig r)))) |
452 | ;; Consult | 465 | ;; Consult |
453 | (autoload 'consult-line "consult" nil t) | 466 | (autoload 'consult-line "consult" nil t) |
454 | (autoload 'consult-isearch-history "consult" nil t) | 467 | (autoload 'consult-isearch-history "consult" nil t) |