Add a bunch of spelling stuff
This commit is contained in:
parent
5f1ac858a2
commit
55bff4f149
31
init.el
31
init.el
@ -41,7 +41,9 @@
|
|||||||
;; basic stuff
|
;; basic stuff
|
||||||
(use-package emacs
|
(use-package emacs
|
||||||
:hook ((emacs-lisp-mode . my/-emacs-lisp-mode-setup-evil-lookup)
|
:hook ((emacs-lisp-mode . my/-emacs-lisp-mode-setup-evil-lookup)
|
||||||
(prog-mode . electric-pair-local-mode))
|
(prog-mode . electric-pair-local-mode)
|
||||||
|
((text-mode message-mode tex-mode) . flyspell-mode)
|
||||||
|
(prog-mode . flyspell-prog-mode))
|
||||||
:init
|
:init
|
||||||
(defun my/-emacs-lisp-mode-setup-evil-lookup ()
|
(defun my/-emacs-lisp-mode-setup-evil-lookup ()
|
||||||
(setq-local evil-lookup-func
|
(setq-local evil-lookup-func
|
||||||
@ -57,6 +59,12 @@
|
|||||||
;; Terminal mouse support
|
;; Terminal mouse support
|
||||||
(xterm-mouse-mode 1)
|
(xterm-mouse-mode 1)
|
||||||
|
|
||||||
|
;; Spell stuff
|
||||||
|
(setq ispell-program-name "hunspell"
|
||||||
|
flyspell-issue-message-flag nil
|
||||||
|
flyspell-issue-welcome-flag nil)
|
||||||
|
|
||||||
|
|
||||||
;; Better scrolling
|
;; Better scrolling
|
||||||
(setq mouse-scroll-delay 0
|
(setq mouse-scroll-delay 0
|
||||||
scroll-conservatively 10
|
scroll-conservatively 10
|
||||||
@ -343,8 +351,8 @@ visual states."
|
|||||||
|
|
||||||
;; cape (a bunch of capfs!)
|
;; cape (a bunch of capfs!)
|
||||||
(use-package cape
|
(use-package cape
|
||||||
:bind (("M-p" . cape-dabbrev)
|
:bind (("C-c p" . cape-dabbrev)
|
||||||
("M-P" . cape-line))
|
("C-c P" . cape-line))
|
||||||
:hook (text-mode . my/-cape-setup-text-mode)
|
:hook (text-mode . my/-cape-setup-text-mode)
|
||||||
:init
|
:init
|
||||||
(defun my/-cape-setup-text-mode ()
|
(defun my/-cape-setup-text-mode ()
|
||||||
@ -445,18 +453,25 @@ visual states."
|
|||||||
my/project-vterm-hash-table))))
|
my/project-vterm-hash-table))))
|
||||||
(defvar my/project-run-command nil
|
(defvar my/project-run-command nil
|
||||||
"Command to run with `my/project-run'.")
|
"Command to run with `my/project-run'.")
|
||||||
|
(defvar my/project-run-dir nil
|
||||||
|
"Directory to run project in with `my/project-run'.")
|
||||||
(defvar my/-project-run-history '()
|
(defvar my/-project-run-history '()
|
||||||
"Commands previously run with `my/project-run'")
|
"Commands previously run with `my/project-run'")
|
||||||
|
(defun my/project-get-root-dir ()
|
||||||
|
"Get the root dir for the current project"
|
||||||
|
(let ((proj (project-current nil)))
|
||||||
|
(or my/project-run-dir
|
||||||
|
(if proj (project-root proj) default-directory))))
|
||||||
(defun my/project-run (command comint)
|
(defun my/project-run (command comint)
|
||||||
"Like `project-compile', but for running a project.
|
"Like `project-compile', but for running a project.
|
||||||
COMMAND and COMINT are like `compile'."
|
COMMAND and COMINT are like `compile'."
|
||||||
(interactive (list (or my/project-run-command
|
(interactive (list (or my/project-run-command
|
||||||
(read-shell-command "Run Command: "
|
(let ((default-directory (my/project-get-root-dir)))
|
||||||
(car my/-project-run-history)
|
(read-shell-command "Run Command: "
|
||||||
'(my/-project-run-history . 1)))
|
(car my/-project-run-history)
|
||||||
|
'(my/-project-run-history . 1))))
|
||||||
(consp current-prefix-arg)))
|
(consp current-prefix-arg)))
|
||||||
(let* ((proj (project-current nil))
|
(let* ((default-directory (my/project-get-root-dir))
|
||||||
(default-directory (if proj (project-root proj) default-directory))
|
|
||||||
(compilation-buffer-name-function (lambda (_)
|
(compilation-buffer-name-function (lambda (_)
|
||||||
(progn "*run project*")))
|
(progn "*run project*")))
|
||||||
(compilation-directory default-directory)
|
(compilation-directory default-directory)
|
||||||
|
Loading…
Reference in New Issue
Block a user