emacs: add grammar checking

This commit is contained in:
Julian Mutter 2022-10-11 14:22:59 +02:00
parent ea3cfcadde
commit 23a2993e84
5 changed files with 41 additions and 8 deletions

View File

@ -71,7 +71,7 @@
(setq org-directory "~/org" (setq org-directory "~/org"
org-roam-directory "~/org/roam") org-roam-directory "~/org/roam")
;; (setq org-agenda-files (list "~/org")) (setq org-agenda-files (list "~/org"))
;; (custom-set-variables ;; (custom-set-variables
;; '(org-directory "~/org") ;; '(org-directory "~/org")
;; '(org-agenda-files (list org-directory))) ;; '(org-agenda-files (list org-directory)))
@ -79,8 +79,8 @@
;; (add-to-list 'org-agenda-files "~/org/anothertest.org" 'append) ;; (add-to-list 'org-agenda-files "~/org/anothertest.org" 'append)
;; Adding my org-agenda files ;; Adding my org-agenda files
(after! org ;; (after! org
(setq org-agenda-files (expand-file-name "org-agenda-files" doom-private-dir))) ;; (setq org-agenda-files (expand-file-name "org-agenda-files" doom-private-dir)))
(setq org-export-allow-bind-keywords t) (setq org-export-allow-bind-keywords t)
@ -98,6 +98,20 @@
(map! :map TeX-mode-map :nvi "C-h" #'outline-up-heading) (map! :map TeX-mode-map :nvi "C-h" #'outline-up-heading)
(map! :map TeX-mode-map :nvi "C-l" #'outline-next-heading) (map! :map TeX-mode-map :nvi "C-l" #'outline-next-heading)
(add-hook 'LaTeX-mode-hook 'langtool-ignore-fonts-minor-mode)
(setq langtool-default-language "de-DE")
(use-package! langtool-ignore-fonts
:config
(langtool-ignore-fonts-add 'latex-mode '(font-lock-comment-face
;; font-latex-math-face
;; font-latex-string-face
font-lock-keyword-face
font-lock-constant-face
font-lock-function-name-face
font-lock-variable-name-face
;; font-lock-type-face ;; figure captions
)))
;; Spell checking settings ;; Spell checking settings
;; TODO make toggling of spell checking ('SPC t s') use flyspell-mode in text modesm and flyspell-prog-mode in programming modes (see hooks below) ;; TODO make toggling of spell checking ('SPC t s') use flyspell-mode in text modesm and flyspell-prog-mode in programming modes (see hooks below)
;; Removing hooks for automatic spell checking set here: https://github.com/hlissner/doom-emacs/blob/develop/modules/checkers/spell/config.el ;; Removing hooks for automatic spell checking set here: https://github.com/hlissner/doom-emacs/blob/develop/modules/checkers/spell/config.el
@ -116,6 +130,7 @@
#'flyspell-prog-mode) #'flyspell-prog-mode)
(setq ispell-dictionary "english") (setq ispell-dictionary "english")
(setq ispell-personal-dictionary "~/ispell-personal-dictionary")
(map! :map doom-leader-toggle-map :desc "Toggle dictionary" "d" #'fd-switch-dictionary) (map! :map doom-leader-toggle-map :desc "Toggle dictionary" "d" #'fd-switch-dictionary)

View File

@ -89,7 +89,7 @@
(setq org-directory "~/org" (setq org-directory "~/org"
org-roam-directory "~/org/roam") org-roam-directory "~/org/roam")
;; (setq org-agenda-files (list "~/org")) (setq org-agenda-files (list "~/org"))
;; (custom-set-variables ;; (custom-set-variables
;; '(org-directory "~/org") ;; '(org-directory "~/org")
;; '(org-agenda-files (list org-directory))) ;; '(org-agenda-files (list org-directory)))
@ -97,8 +97,8 @@
;; (add-to-list 'org-agenda-files "~/org/anothertest.org" 'append) ;; (add-to-list 'org-agenda-files "~/org/anothertest.org" 'append)
;; Adding my org-agenda files ;; Adding my org-agenda files
(after! org ;; (after! org
(setq org-agenda-files (expand-file-name "org-agenda-files" doom-private-dir))) ;; (setq org-agenda-files (expand-file-name "org-agenda-files" doom-private-dir)))
(setq org-export-allow-bind-keywords t) (setq org-export-allow-bind-keywords t)
@ -118,6 +118,21 @@
(map! :map TeX-mode-map :nvi "C-j" #'outline-forward-same-level) (map! :map TeX-mode-map :nvi "C-j" #'outline-forward-same-level)
(map! :map TeX-mode-map :nvi "C-h" #'outline-up-heading) (map! :map TeX-mode-map :nvi "C-h" #'outline-up-heading)
(map! :map TeX-mode-map :nvi "C-l" #'outline-next-heading) (map! :map TeX-mode-map :nvi "C-l" #'outline-next-heading)
(add-hook 'LaTeX-mode-hook 'langtool-ignore-fonts-minor-mode)
(setq langtool-default-language "de-DE")
(use-package! langtool-ignore-fonts
:config
(langtool-ignore-fonts-add 'latex-mode '(font-lock-comment-face
;; font-latex-math-face
;; font-latex-string-face
font-lock-keyword-face
font-lock-constant-face
font-lock-function-name-face
font-lock-variable-name-face
;; font-lock-type-face ;; figure captions
)))
#+end_src #+end_src
** Spell Checking ** Spell Checking
@ -141,6 +156,7 @@
#'flyspell-prog-mode) #'flyspell-prog-mode)
(setq ispell-dictionary "english") (setq ispell-dictionary "english")
(setq ispell-personal-dictionary "~/ispell-personal-dictionary")
(map! :map doom-leader-toggle-map :desc "Toggle dictionary" "d" #'fd-switch-dictionary) (map! :map doom-leader-toggle-map :desc "Toggle dictionary" "d" #'fd-switch-dictionary)

View File

@ -82,7 +82,7 @@
:checkers :checkers
syntax ; tasing you for every semicolon you forget syntax ; tasing you for every semicolon you forget
(spell +flyspell +everywhere) ; tasing you for misspelling mispelling (spell +flyspell +everywhere) ; tasing you for misspelling mispelling
;;grammar ; tasing grammar mistake every you make grammar ; tasing grammar mistake every you make
:tools :tools
;;ansible ;;ansible

View File

@ -13,6 +13,7 @@
(unpin! org-roam) (unpin! org-roam)
(package! org-roam-ui) (package! org-roam-ui)
(package! langtool-ignore-fonts)
;; To install a package directly from a remote git repo, you must specify a ;; To install a package directly from a remote git repo, you must specify a
;; `:recipe'. You'll find documentation on what `:recipe' accepts here: ;; `:recipe'. You'll find documentation on what `:recipe' accepts here:

View File

@ -332,7 +332,7 @@ exec --no-startup-id jgmenu --at-pointer --hide-on-startup
exec --no-startup-id nm-applet exec --no-startup-id nm-applet
exec --no-startup-id blueman-applet exec --no-startup-id blueman-applet
exec --no-startup-id xfce4-power-manager exec --no-startup-id xfce4-power-manager
# exec --no-startup-id nextcloud exec --no-startup-id nextcloud
# Authentication agent # Authentication agent
exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
# Notify about software updates # Notify about software updates
@ -343,6 +343,7 @@ exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec --no-startup-id start-pulseaudio-x11 exec --no-startup-id start-pulseaudio-x11
# Background # Background
#exec --no-startup-id feh --randomize --bg-fill /home/julian/Pictures/Hintergrundbilder/* #exec --no-startup-id feh --randomize --bg-fill /home/julian/Pictures/Hintergrundbilder/*
exec_always --no-startup-id ~/.screenlayout/2desktop-vga.sh
exec --no-startup-id feh --bg-fill /home/julian/Bilder/background.jpg exec --no-startup-id feh --bg-fill /home/julian/Bilder/background.jpg
# Notifications # Notifications
exec --no-startup-id dunst -config /home/julian/.config/dunst/dunstrc exec --no-startup-id dunst -config /home/julian/.config/dunst/dunstrc