feat(users/sterni/emacs): set up LanguageTool
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>
This commit is contained in:
parent
2b6e8f0277
commit
e118994873
2 changed files with 17 additions and 0 deletions
|
@ -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)
|
||||
'';
|
||||
})
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue