]> xn--ix-yja.es Git - alex.git/commitdiff
Add Vale spell checking, including Rust code
authorAlex <alex.corcoles@veecle.io>
Fri, 28 Feb 2025 18:30:19 +0000 (19:30 +0100)
committeralexpdp7 <alex@corcoles.net>
Fri, 28 Feb 2025 18:34:43 +0000 (19:34 +0100)
* Use built-in support of use-package for Git repos
* Modernize the Emacs RH configuration

emacs/emacs-rh.el
emacs/emacs.el

index 0948a3662133942ed6ce59e58ecd15748487d8d0..67de770fa983f34fd6b6de7298597ff98f3761e9 100644 (file)
   :config
   (add-hook 'adoc-mode-hook #'abbrev-mode))
 
-(cl-defun slot/vc-install (&key (fetcher "github") repo name rev backend)
-  (let* ((url (format "https://www.%s.com/%s" fetcher repo))
-         (iname (when name (intern name)))
-         (pac-name (or iname (intern (file-name-base repo)))))
-    (unless (package-installed-p pac-name)
-      (package-vc-install url iname rev backend))))
-
 (use-package flymake-vale
-  :init (slot/vc-install :fetcher "github" :repo "tpeacock19/flymake-vale")
-  :ensure t)
-
-(add-hook 'adoc-mode-hook #'flymake-vale-load)
-(add-hook 'find-file-hook 'flymake-vale-maybe-load)
-(add-hook 'adoc-mode-hook 'flymake-mode)
+  :vc (:url "https://github.com/tpeacock19/flymake-vale.git"
+            :rev :newest)
+  :config
+  (add-to-list 'flymake-vale-modes 'adoc-mode)
+  (add-hook 'find-file-hook 'flymake-vale-maybe-load)
+  )
 
 (use-package flymake-aspell
   :ensure t)
index 0e6713f96e06921a1ef1d6974abf08c736ea3094..860e7b7740d698e0a02dfad376b334d971c5d98a 100644 (file)
 (setq prolog-system 'swi)
 (setq auto-mode-alist (append '(("\\.pl\\'" . prolog-mode))
                               auto-mode-alist))
+
+(use-package flymake-vale
+  :vc (:url "https://github.com/tpeacock19/flymake-vale.git"
+            :rev :newest)
+  :config
+  (add-to-list 'flymake-vale-modes 'rust-mode)
+  (add-hook 'find-file-hook 'flymake-vale-maybe-load)
+  )