diff options
author | sterni <sternenseemann@systemli.org> | 2022-01-10T23·21+0100 |
---|---|---|
committer | sterni <sternenseemann@systemli.org> | 2022-01-10T23·24+0000 |
commit | e11899487346bdb8ca3a5e775e466aab993d7d1e (patch) | |
tree | 576e3210a759353b3f49ea96cc75d29c36f39f89 /users/sterni | |
parent | 2b6e8f027779c99f535723d46e0b2d68cc3cf9c1 (diff) |
feat(users/sterni/emacs): set up LanguageTool r/3583
Consequently, my emacs config now depends on Java… Change-Id: I26c63558494fd9a9a7ad5beb4442e50c6a5d89f5 Reviewed-on: https://cl.tvl.fyi/c/depot/+/4863 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
Diffstat (limited to 'users/sterni')
-rw-r--r-- | users/sterni/emacs/default.nix | 6 | ||||
-rw-r--r-- | users/sterni/emacs/init.el | 11 |
2 files changed, 17 insertions, 0 deletions
diff --git a/users/sterni/emacs/default.nix b/users/sterni/emacs/default.nix index a3946a47972a..606fcb14e09e 100644 --- a/users/sterni/emacs/default.nix +++ b/users/sterni/emacs/default.nix @@ -16,6 +16,7 @@ let epkgs.melpaPackages.dockerfile-mode epkgs.melpaPackages.haskell-mode epkgs.melpaPackages.jq-mode + epkgs.melpaPackages.languagetool epkgs.melpaPackages.markdown-mode epkgs.melpaPackages.nix-mode epkgs.melpaPackages.sly @@ -40,8 +41,13 @@ let name = "injected-emacs.d"; destination = "/nix-inject.el"; text = '' + ;; bqn-mode (setq bqn-interpreter-path "${pkgs.cbqn}/bin/BQN") + ;; languagetool + (setq languagetool-java-bin "${pkgs.jre}/bin/java") + (setq languagetool-language-tool-jar "${pkgs.languagetool}/share/languagetool-commandline.jar") + (provide 'nix-inject) ''; }) diff --git a/users/sterni/emacs/init.el b/users/sterni/emacs/init.el index 16116f247216..b19701b503c1 100644 --- a/users/sterni/emacs/init.el +++ b/users/sterni/emacs/init.el @@ -178,6 +178,17 @@ :mode (("\\.md\\'" . markdown-mode))) (use-package adoc-mode :mode (("\\.adoc\\'" . adoc-mode))) +(use-package languagetool + :after evil + :custom + languagetool-java-arguments '("-Dfile.encoding=UTF-8") + languagetool-default-language "en-GB" + languagetool-mother-tongue "de-DE" + :config + (evil-define-key 'normal 'global (kbd "<leader>ll") 'languagetool-check) + (evil-define-key 'normal 'global (kbd "<leader>lc") 'languagetool-correct-at-point) + (evil-define-key 'normal 'global (kbd "<leader>ls") 'languagetool-set-language) + (evil-define-key 'normal 'global (kbd "<leader>lr") 'languagetool-clear-buffer)) (require 'subscriptions) (require 'nix-inject) |