diff --git a/manifests/workstation.pp b/manifests/workstation.pp index 5416735..a97ebdf 100644 --- a/manifests/workstation.pp +++ b/manifests/workstation.pp @@ -26,6 +26,7 @@ node default { include core::emacs include core::terminal include core::mkcert + include core::language_tool # # Add the private puppet module for all the proprietary bits only if the diff --git a/site-modules/core/files/emacs/init.el b/site-modules/core/files/emacs/init.el index ebae7e3..55ccd5b 100644 --- a/site-modules/core/files/emacs/init.el +++ b/site-modules/core/files/emacs/init.el @@ -36,6 +36,7 @@ (load-file (expand-file-name "src/projectile.el" user-emacs-directory)) (load-file (expand-file-name "src/treemacs.el" user-emacs-directory)) (load-file (expand-file-name "src/term.el" user-emacs-directory)) +(load-file (expand-file-name "src/language-tool.el" user-emacs-directory)) ;; Set up puppet for editing the dotfiles config (load-file (expand-file-name "src/puppet.el" user-emacs-directory)) diff --git a/site-modules/core/files/emacs/src/language-tool.el b/site-modules/core/files/emacs/src/language-tool.el new file mode 100644 index 0000000..c0124d0 --- /dev/null +++ b/site-modules/core/files/emacs/src/language-tool.el @@ -0,0 +1,14 @@ +;;; language-tool.el --- AMACS -*- lexical-binding: t; -*- +;; +;; Copyright 2021 Practically.io All rights reserved +;; +;; Use of this source is governed by a BSD-style +;; licence that can be found in the LICENCE file or at +;; https://www.practically.io/copyright/ + +(use-package languagetool + :quelpa t + :config + (setq languagetool-default-language "en-GB") + (setq languagetool-language-tool-jar + "/.local/share/LanguageTool/LanguageTool-5.6/languagetool-commandline.jar")) diff --git a/site-modules/core/manifests/language_tool.pp b/site-modules/core/manifests/language_tool.pp new file mode 100644 index 0000000..cf761c9 --- /dev/null +++ b/site-modules/core/manifests/language_tool.pp @@ -0,0 +1,16 @@ +# Module to install the languagetool service locally for creating spelling and +# grammar checking +class core::language_tool { + file { "${user_home}/.local/share/LanguageTool": + ensure => 'directory' + } + + archive { 'LanguageTool-5.6.zip': + path => '/tmp/LanguageTool-5.6.zip', + source => 'https://languagetool.org/download/LanguageTool-5.6.zip', + extract => true, + extract_path => "${user_home}/.local/share/LanguageTool", + creates => "${user_home}/.local/share/LanguageTool/LanguageTool-5.6", + require => File["${user_home}/.local/share/LanguageTool"], + } +}