53 lines
1.7 KiB
EmacsLisp
53 lines
1.7 KiB
EmacsLisp
;;; $DOOMDIR/lisp/windows-nt.el --- Windows specific configuration -*- lexical-binding: t; -*-
|
|
;;; Commentary:
|
|
;;; Code:
|
|
(require 'doom)
|
|
|
|
;; Windows path
|
|
(when (eq system-type 'windows-nt)
|
|
|
|
;; https://emacs.stackexchange.com/a/29949
|
|
;; Make sure Unix tools are in front of `exec-path`
|
|
;; (let ((bash (executable-find "bash")))
|
|
;; (when bash
|
|
;; (push (file-name-directory bash) exec-path)))
|
|
;;
|
|
;; version of bash found is incorrect, so just use the system git path instead
|
|
(push "C:/Program Files/Git/usr/bin/" exec-path)
|
|
|
|
;; Update PATH from exec-path
|
|
(let ((path
|
|
(mapcar
|
|
'file-truename
|
|
(append exec-path (split-string (getenv "PATH") path-separator t)))))
|
|
(setenv "PATH" (mapconcat 'identity (delete-dups path) path-separator))))
|
|
|
|
|
|
;; TODO: Find out what _actually_ needs to be set here
|
|
;; i.e. shouldn't need to set both ispell-dictionary and ispell-local-dictionary
|
|
(after!
|
|
ispell
|
|
(setq ispell-dictionary "en_US")
|
|
(setq ispell-local-dictionary "en_US")
|
|
(setq ispell-extra-args '("-d" "en_US"))
|
|
(setq ispell-local-dictionary-alist
|
|
'(("en_US" "[A-Za-z]" "[^A-Za-z]" "[']" nil nil nil utf-8)))
|
|
(setq ispell-hunspell-dictionary-alist
|
|
'(("en_US"
|
|
"C:/hunspell/en_US.aff"
|
|
"C:/hunspell/en_US.dic"
|
|
nil
|
|
nil
|
|
nil
|
|
"utf-8")))
|
|
;; This is the default hunspell personal dictionary
|
|
;; Hunspell won't create it, and ispell needs this file specified to work
|
|
(setq ispell-personal-dictionary "~/.hunspell_en_US"))
|
|
|
|
;; For elisp-autofmt
|
|
;; Local variables:
|
|
;; elisp-autofmt-load-packages-local: ("use-package" "use-package-core")
|
|
;; end:
|
|
(provide 'windows-nt)
|
|
;;; windows-nt.el ends here
|