67 |
67 |
68 ;;;; Packages ;;;; |
68 ;;;; Packages ;;;; |
69 (require 'package-require) |
69 (require 'package-require) |
70 (package-require '(rg company exec-path-from-shell expand-region vertico |
70 (package-require '(rg company exec-path-from-shell expand-region vertico |
71 orderless consult marginalia magit forge magit-todos markdown-mode hgignore-mode move-text paredit |
71 orderless consult marginalia magit forge magit-todos markdown-mode hgignore-mode move-text paredit |
72 rainbow-delimiters json-mode json-reformat flycheck treesit-auto ibuffer-project |
72 rainbow-delimiters json-mode json-reformat flycheck treesit-auto ibuffer-project jinx |
73 solarized-theme terraform-mode visual-regexp yasnippet yaml-mode |
73 solarized-theme terraform-mode visual-regexp yasnippet yaml-mode |
74 emmet-mode)) |
74 emmet-mode)) |
75 |
75 |
76 |
76 |
77 ;;; custom requires |
77 ;;; custom requires |
78 (require 'c-init) |
78 (require 'c-init) |
79 (require 'ansible-init) |
79 (require 'ansible-init) |
80 |
80 |
81 |
81 |
|
82 ;;; jinx spellcheck setup |
|
83 (with-eval-after-load 'jinx |
|
84 (unless (executable-find "enchant-2") |
|
85 (display-warning |
|
86 'jinx |
|
87 (concat "Enchant library not found. Jinx spell-checking requires enchant.\n\n" |
|
88 "To install:\n" |
|
89 (if (eq system-type 'darwin) |
|
90 " macOS: brew install enchant\n" |
|
91 " Ubuntu/Debian: sudo apt install libenchant-2-dev\n") |
|
92 "\nAfter installation, restart Emacs.") |
|
93 :warning))) |
|
94 |
|
95 |
82 ;;; text-mode |
96 ;;; text-mode |
83 (add-hook 'fundamental-mode-hook 'flyspell-mode) ; spellcheck text |
97 (add-hook 'fundamental-mode-hook 'jinx-mode) ; spellcheck text |
84 (add-hook 'fundamental-mode-hook 'turn-on-auto-fill) ; autofill text |
98 (add-hook 'fundamental-mode-hook 'turn-on-auto-fill) ; autofill text |
85 |
99 |
86 |
100 |
87 ;;; whitespace-mode |
101 ;;; whitespace-mode |
88 (global-whitespace-mode t) ; show whitespace |
102 (global-whitespace-mode t) ; show whitespace |
192 (setq-default yas-prompt-functions '(yas-completing-read yas-dropdown-prompt)) ; use completing-read for multiple snippets |
206 (setq-default yas-prompt-functions '(yas-completing-read yas-dropdown-prompt)) ; use completing-read for multiple snippets |
193 (yas-global-mode t) |
207 (yas-global-mode t) |
194 |
208 |
195 |
209 |
196 ;;; markdown-mode |
210 ;;; markdown-mode |
197 (add-hook 'markdown-mode-hook 'flyspell-mode) |
211 (add-hook 'markdown-mode-hook 'jinx-mode) |
198 (setq-default markdown-command "pandoc -f gfm") |
212 (setq-default markdown-command "pandoc -f gfm") |
199 |
213 |
200 |
214 |
201 ;;; treesit-auto (automatically use tree-sitter modes and install grammars) |
215 ;;; treesit-auto (automatically use tree-sitter modes and install grammars) |
202 (with-eval-after-load 'treesit-auto |
216 (with-eval-after-load 'treesit-auto |