adding languagetool

This commit is contained in:
Chris Cochrun 2023-04-07 14:37:19 -05:00
parent 3679fe904b
commit 9e16c36629
2 changed files with 64 additions and 4 deletions

View file

@ -889,7 +889,8 @@ Part of this config includes some special capture templates for my work as a you
"S" 'org-schedule "S" 'org-schedule
"t" 'org-todo "t" 'org-todo
"gf" 'org-footnote-action "gf" 'org-footnote-action
"gl" 'org-id-copy) "gl" 'org-id-copy
"gk" 'languagetool-correct-at-point)
('visual org-mode-map ('visual org-mode-map
"gf" 'org-footnote-action) "gf" 'org-footnote-action)
('insert org-mode-map ('insert org-mode-map
@ -2870,6 +2871,20 @@ I'm making a small function in here to open files in the appropriate program usi
(message file) (message file)
(call-process "xdg-open" nil 0 nil file))) (call-process "xdg-open" nil 0 nil file)))
(defun chris/dired-open-wm ()
"Open dired as file-manager in wm"
(interactive)
(with-selected-frame (make-frame '((name . "dired")))
(dired-jump)
(toggle-truncate-lines +1)))
(defun chris/dired-open-videos ()
"Open dired in Videos as file-manager in wm"
(interactive)
(with-selected-frame (make-frame '((name . "dired")))
(dired "~/Videos/")
(toggle-truncate-lines +1)))
(defun chris/setup-dired () (defun chris/setup-dired ()
"setup dired" "setup dired"
(setq truncate-lines t) (setq truncate-lines t)
@ -3946,8 +3961,22 @@ I like to track my time with ActivityWatch so I can notice and kill bad habits.
** LanguageTool ** LanguageTool
I am going to try and use LanguageTool to fix grammatical issues. I am going to try and use LanguageTool to fix grammatical issues.
#+begin_src emacs-lisp :tangle no #+begin_src emacs-lisp
(use-package langtool) (use-package languagetool
:ensure t
:defer t
:commands (languagetool-check
languagetool-clear-suggestions
languagetool-correct-at-point
languagetool-correct-buffer
languagetool-set-language
languagetool-server-mode
languagetool-server-start
languagetool-server-stop)
:config
(setq languagetool-java-arguments '("-Dfile.encoding=UTF-8")
languagetool-console-command "/home/chris/.emacs.d/languagetool/languagetool-commandline.jar"
languagetool-server-command "/home/chris/.emacs.d/languagetool/languagetool-server.jar"))
#+end_src #+end_src
** qrencode ** qrencode

33
init.el
View file

@ -616,7 +616,8 @@ much faster. The hope is to also make this a faster version of imenu."
"S" 'org-schedule "S" 'org-schedule
"t" 'org-todo "t" 'org-todo
"gf" 'org-footnote-action "gf" 'org-footnote-action
"gl" 'org-id-copy) "gl" 'org-id-copy
"gk" 'languagetool-correct-at-point)
('visual org-mode-map ('visual org-mode-map
"gf" 'org-footnote-action) "gf" 'org-footnote-action)
('insert org-mode-map ('insert org-mode-map
@ -2066,6 +2067,20 @@ targets."
(message file) (message file)
(call-process "xdg-open" nil 0 nil file))) (call-process "xdg-open" nil 0 nil file)))
(defun chris/dired-open-wm ()
"Open dired as file-manager in wm"
(interactive)
(with-selected-frame (make-frame '((name . "dired")))
(dired-jump)
(toggle-truncate-lines +1)))
(defun chris/dired-open-videos ()
"Open dired in Videos as file-manager in wm"
(interactive)
(with-selected-frame (make-frame '((name . "dired")))
(dired "~/Videos/")
(toggle-truncate-lines +1)))
(defun chris/setup-dired () (defun chris/setup-dired ()
"setup dired" "setup dired"
(setq truncate-lines t) (setq truncate-lines t)
@ -2932,6 +2947,22 @@ interfere with the default `bongo-playlist-buffer'."
"v" 'chris/elfeed-bongo-insert-item "v" 'chris/elfeed-bongo-insert-item
"N" 'mastodon-notifications--timeline)) "N" 'mastodon-notifications--timeline))
(use-package languagetool
:ensure t
:defer t
:commands (languagetool-check
languagetool-clear-suggestions
languagetool-correct-at-point
languagetool-correct-buffer
languagetool-set-language
languagetool-server-mode
languagetool-server-start
languagetool-server-stop)
:config
(setq languagetool-java-arguments '("-Dfile.encoding=UTF-8")
languagetool-console-command "/home/chris/.emacs.d/languagetool/languagetool-commandline.jar"
languagetool-server-command "/home/chris/.emacs.d/languagetool/languagetool-server.jar"))
(use-package qrencode) (use-package qrencode)
;; Reduce rendering/line scan work for Emacs by not rendering cursors or regions ;; Reduce rendering/line scan work for Emacs by not rendering cursors or regions