summary refs log tree commit diff stats
path: root/init.el
diff options
context:
space:
mode:
Diffstat (limited to 'init.el')
-rw-r--r--init.el120
1 files changed, 79 insertions, 41 deletions
diff --git a/init.el b/init.el index 0cd9c59..e17917b 100644 --- a/init.el +++ b/init.el
@@ -414,45 +414,73 @@ like a dumbass."
414 (defun unfocused@save-buffers () 414 (defun unfocused@save-buffers ()
415 (save-some-buffers t)))) 415 (save-some-buffers t))))
416 416
417(setup flyspell 417;; (setup flyspell
418 ;; follow the directions here: https://old.reddit.com/r/emacs/comments/dgj0ae 418;; ;; follow the directions here: https://old.reddit.com/r/emacs/comments/dgj0ae
419 ;; in short: 419;; ;; in short:
420 ;; - download hunspell from GitHub and put in ~/usr/bin 420;; ;; - download hunspell from GitHub and put in ~/usr/bin
421 ;; - download LibreOffice English dictionaries and put in 421;; ;; - download LibreOffice English dictionaries and put in
422 ;; ~/usr/share/hunspell 422;; ;; ~/usr/share/hunspell
423 (setq-default 423;; (setq-default
424 flyspell-issue-message-flag nil 424;; flyspell-issue-message-flag nil
425 ispell-program-name "hunspell" 425;; ispell-program-name "hunspell"
426 ispell-dictionary "en_US" 426;; ispell-dictionary "default"
427 ispell-personal-dictionary "~/.hunspell_personal" 427;; ispell-personal-dictionary "~/.hunspell_personal"
428 ispell-local-dictionary-alist '(("en_US" 428;; ispell-local-dictionary-alist '(("default"
429 "[[:alpha:]]" "[^[:alpha:]]" 429;; "[[:alpha:]]" "[^[:alpha:]]"
430 "[']" nil 430;; "[']" nil
431 ("-d" "en_US") nil utf-8))) 431;; ("-d" "en_US") nil utf-8)))
432 432
433 (acdw/system 433;; (acdw/system
434 (:work (setenv "DICPATH" (expand-file-name "~/usr/share/hunspell")))) 434;; (:work (let ((dicpath (expand-file-name "~/usr/share/hunspell/")))
435 435;; (setenv "DICPATH" dicpath))))
436 (when (boundp 'ispell-hunspell-dictionary-alist) 436
437 (setq-default 437;; ;; new variable `ispell-hunspell-dictionary-alist' is defined in Emacs
438 ispell-hunspell-dictionary-alist ispell-local-dictionary-alist)) 438;; ;; If it's nil, Emacs tries to automatically set up the dictionaries.
439 (:needs ispell-program-name) ; don't proceed if not installed 439;; (when (boundp 'ispell-hunspell-dictionary-alist)
440 440;; (setq ispell-hunspell-dictionary-alist ispell-local-dictionary-alist))
441 (unless (file-exists-p ispell-personal-dictionary) 441
442 (write-region "" nil ispell-personal-dictionary nil 0)) 442;; (:needs ispell-program-name) ; don't proceed if not installed
443 443
444 (when (executable-find ispell-program-name) 444;; (unless (file-exists-p ispell-personal-dictionary)
445 (add-hook 'text-mode-hook #'flyspell-mode) 445;; (write-region "" nil ispell-personal-dictionary nil 0))
446 (add-hook 'prog-mode-hook #'flyspell-prog-mode)) 446
447 447;; (when (executable-find ispell-program-name)
448 (:when-loaded 448;; (add-hook 'text-mode-hook #'flyspell-mode)
449 (setup (:straight flyspell-correct) 449;; (add-hook 'prog-mode-hook #'flyspell-prog-mode))
450 (:with-map flyspell-mode-map 450
451 (:bind "C-;" flyspell-correct-wrapper 451;; (:when-loaded
452 ;; Remove all other binds 452;; (setup (:straight flyspell-correct)
453 "C-," nil 453;; (:with-map flyspell-mode-map
454 "C-." nil 454;; (:bind "C-;" flyspell-correct-wrapper
455 "C-M-i" nil))))) 455;; ;; Remove all other binds
456;; "C-," nil
457;; "C-." nil
458;; "C-M-i" nil)))))
459
460;; (setup flyspell
461;; (:option
462;; flyspell-issue-message-flag nil
463;; ispell-program-name "aspell"
464;; ispell-dictionary "en_US"
465;; ispell-personal-dictionary "~/.dictionary"
466;; ispell-extra-args '("--sug-mode=ultra" "--lang=en_US"))
467
468;; (:needs ispell-program-name)
469
470;; (unless (file-exists-p ispell-personal-dictionary)
471;; (write-region "" nil ispell-personal-dictionary nil 0))
472
473;; (add-hook 'text-mode-hook #'flyspell-mode)
474;; (add-hook 'prog-mode-hook #'flyspell-prog-mode)
475
476;; (:when-loaded
477;; (setup (:straight flyspell-correct)
478;; (:with-map flyspell-mode-map
479;; (:bind "C-;" flyspell-correct-wrapper
480;; ;; Remove other binds
481;; "C-," nil
482;; "C-." nil
483;; "C-M-i" nil)))))
456 484
457(setup frames 485(setup frames
458 (:option frame-title-format '("%b@" 486 (:option frame-title-format '("%b@"
@@ -820,7 +848,7 @@ like a dumbass."
820 848
821(setup (:straight (0x0 :host gitlab 849(setup (:straight (0x0 :host gitlab
822 :repo "willvaughn/emacs-0x0")) 850 :repo "willvaughn/emacs-0x0"))
823 (:option 0x0-default-host 'ttm)) 851 (:option 0x0-default-server 'ttm))
824 852
825(setup (:straight (apheleia :host github 853(setup (:straight (apheleia :host github
826 :repo "raxod502/apheleia")) 854 :repo "raxod502/apheleia"))
@@ -1117,11 +1145,21 @@ successive invocations."
1117 (add-to-list 'auto-mode-alist '("\\.fb\\'" . forth-block-mode)))) 1145 (add-to-list 'auto-mode-alist '("\\.fb\\'" . forth-block-mode))))
1118 1146
1119(setup (:straight helpful) 1147(setup (:straight helpful)
1148 (:option helpful-max-buffers 5
1149 ;;helpful-switch-buffer-function #'pop-to-buffer
1150 helpful-switch-buffer-function
1151 (lambda (buf)
1152 (pop-to-buffer buf
1153 '((display-buffer-reuse-mode-window
1154 display-buffer-pop-up-window)
1155 (mode . helpful-mode))
1156 :norecord)))
1120 (:global "<help> f" helpful-callable 1157 (:global "<help> f" helpful-callable
1121 "<help> v" helpful-variable 1158 "<help> v" helpful-variable
1122 "<help> k" helpful-key 1159 "<help> k" helpful-key
1123 "<help> o" helpful-symbol 1160 "<help> o" helpful-symbol
1124 "C-c C-d" helpful-at-point)) 1161 "C-c C-d" helpful-at-point)
1162 (:bind "q" kill-buffer-and-window))
1125 1163
1126(setup (:straight iscroll) 1164(setup (:straight iscroll)
1127 (:hook-into text-mode)) 1165 (:hook-into text-mode))