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