about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--init.el70
1 files changed, 37 insertions, 33 deletions
diff --git a/init.el b/init.el index 28caf4a..9297a78 100644 --- a/init.el +++ b/init.el
@@ -369,39 +369,39 @@
369;; https://github.com/kaushalmodi/.emacs.d/blob/master/init.el#L376 369;; https://github.com/kaushalmodi/.emacs.d/blob/master/init.el#L376
370;; modi/font-check 370;; modi/font-check
371(defun acdw/setup-fonts () 371(defun acdw/setup-fonts ()
372 (let* ((fixed-pitch-sans-serif-family 372 (let* ((fixed-pitch-sans-serif-family
373 (cond ((x-list-fonts "Fira Code") '(:family "Fira Code")) 373 (cond ((x-list-fonts "Fira Code") '(:family "Fira Code"))
374 ((x-list-fonts "Consolas") '(:family "Consolas")) 374 ((x-list-fonts "Consolas") '(:family "Consolas"))
375 ((x-list-fonts "DejaVu Sans Mono") '(:family "DejaVu Sans Mono")) 375 ((x-list-fonts "DejaVu Sans Mono") '(:family "DejaVu Sans Mono"))
376 ((x-list-fonts "Fixed") '(:family "Fixed")) 376 ((x-list-fonts "Fixed") '(:family "Fixed"))
377 (nil (warn "Can't find a good fixed pitch sans-serif font.")))) 377 (nil (warn "Can't find a good fixed pitch sans-serif font."))))
378 (fixed-pitch-serif-family 378 (fixed-pitch-serif-family
379 (cond ((x-list-fonts "Go Mono") '(:family "Go Mono")) 379 (cond ((x-list-fonts "Go Mono") '(:family "Go Mono"))
380 ((x-list-fonts "Courier Prime") '(:family "Courier Prime")) 380 ((x-list-fonts "Courier Prime") '(:family "Courier Prime"))
381 ((x-list-fonts "Courier New") '(:family "Courier New")) 381 ((x-list-fonts "Courier New") '(:family "Courier New"))
382 ((x-list-fonts "Courier") '(:family "Courier")) 382 ((x-list-fonts "Courier") '(:family "Courier"))
383 (nil (warn "Can't find a good fixed pitch serif font.")))) 383 (nil (warn "Can't find a good fixed pitch serif font."))))
384 (variable-pitch-sans-serif-family 384 (variable-pitch-sans-serif-family
385 (cond ((x-list-fonts "DejaVu Sans") '(:family "DejaVu Sans")) 385 (cond ((x-list-fonts "DejaVu Sans") '(:family "DejaVu Sans"))
386 ((x-list-fonts "Go") '(:family "Go")) 386 ((x-list-fonts "Go") '(:family "Go"))
387 ((x-list-fonts "Arial") '(:family "Arial")) 387 ((x-list-fonts "Arial") '(:family "Arial"))
388 (nil (warn "Cant't find a good variable pitch sans-serif font.")))) 388 (nil (warn "Cant't find a good variable pitch sans-serif font."))))
389 (variable-pitch-serif-family 389 (variable-pitch-serif-family
390 (cond ((x-list-fonts "DejaVu Serif") '(:family "DejaVu Serif")) 390 (cond ((x-list-fonts "DejaVu Serif") '(:family "DejaVu Serif"))
391 ((x-list-fonts "Georgia") '(:family "Georgia")) 391 ((x-list-fonts "Georgia") '(:family "Georgia"))
392 ((x-list-fonts "Times New Roman") '(:family "Times New Roman")) 392 ((x-list-fonts "Times New Roman") '(:family "Times New Roman"))
393 ((x-list-fonts "Times") '(:family "Times")) 393 ((x-list-fonts "Times") '(:family "Times"))
394 (nil (warn "Can't find a good variable pitch serif font.")))) 394 (nil (warn "Can't find a good variable pitch serif font."))))
395 395
396 (fixed-pitch-family fixed-pitch-sans-serif-family) 396 (fixed-pitch-family fixed-pitch-sans-serif-family)
397 (variable-pitch-family variable-pitch-serif-family) 397 (variable-pitch-family variable-pitch-serif-family)
398 (default-family fixed-pitch-family)) 398 (default-family fixed-pitch-family))
399 (custom-theme-set-faces 399 (custom-theme-set-faces
400 'user 400 'user
401 `(fixed-pitch ((t (,@fixed-pitch-family)))) 401 `(fixed-pitch ((t (,@fixed-pitch-family))))
402 `(fixed-pitch-serif ((t (,@fixed-pitch-serif-family)))) 402 `(fixed-pitch-serif ((t (,@fixed-pitch-serif-family))))
403 `(variable-pitch ((t (,@variable-pitch-family)))) 403 `(variable-pitch ((t (,@variable-pitch-family))))
404 `(default ((t (,@default-family)))))) 404 `(default ((t (,@default-family))))))
405 (remove-hook 'focus-in-hook #'acdw/setup-fonts)) 405 (remove-hook 'focus-in-hook #'acdw/setup-fonts))
406(add-hook 'focus-in-hook #'acdw/setup-fonts) 406(add-hook 'focus-in-hook #'acdw/setup-fonts)
407 407
@@ -561,6 +561,10 @@
561 :hook 561 :hook
562 (prog-mode-hook . aggressive-indent-mode)) 562 (prog-mode-hook . aggressive-indent-mode))
563 563
564(use-package format-all
565 :hook
566 (prog-mode-hook . format-all-mode))
567
564;;;;;; Smartly deal with pairs 568;;;;;; Smartly deal with pairs
565(use-package smartparens 569(use-package smartparens
566 :init 570 :init