Merge pull request #416 from fuxialexander/write

Enhance +write module
This commit is contained in:
Henrik Lissner 2018-02-13 14:57:06 -05:00 committed by GitHub
commit 896ca67076
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 103 additions and 1 deletions

View file

@ -0,0 +1,39 @@
* +langtool
:PROPERTIES:
:ID: AE6DA5B3-6859-47D9-A483-972D42F0E11B
:END:
Support for languagetool
For installation of languagetool, please checkout https://languagetool.org/. Noted that you need Java to run languagetool.
MacOS users can install languagetool using ~brew~:
#+BEGIN_SRC bash
brew install languagetool
#+END_SRC
After installation, you need to find out the path of the ~jar~ file and set it as ~+langtool-jar-path~.
* +wordnut
:PROPERTIES:
:ID: 005E9DD8-DE23-4A69-B423-8950B5E23059
:END:
This use ~wordnut~ package to provide a dictionary in Emacs.
Commands avaliable:
- ~wordnut-search~
- ~wordnut-lookup-curent-word~
* +synosaurus
:PROPERTIES:
:ID: 005E9DD8-DE23-4A69-B423-8950B5E23059
:END:
This use ~synosaurus~ package to provide a dictionary in Emacs.
Commands avaliable:
- ~synosaurus-mode~
- ~synosaurus-lookup~
- ~synosaurus-choose-and-replace~
* mixed-pitch
:PROPERTIES:
:ID: 417B004D-2E33-4071-894F-0792CB22B3D5
:END:
This package enable fixed-width font and variable-pitch font coexist in the same buffer": you can use ~Fira code~ for code blocks in org mode file where use ~Ariel~ for main content (if you want...).

View file

@ -13,6 +13,7 @@
(visual-fill-column-mode arg)
(visual-line-mode arg)
(when (eq major-mode 'org-mode)
(mixed-pitch-mode arg)
(+org-pretty-mode arg))
(setq line-spacing (if +write-mode 4))))

View file

@ -0,0 +1,51 @@
;;; app/write/config.el -*- lexical-binding: t; -*-
(when (featurep! +langtool)
(defvar +langtool-default-lang "en-US"
"default language for langtool")
(defvar +langtool-mother-tongue nil
"mother tongue of user")
(defvar +langtool-jar-path "/usr/local/Cellar/languagetool/4.0/libexec/languagetool-commandline.jar"
"TODO")
(def-package! langtool
:commands (langtool-check
langtool-check-done
langtool-switch-default-language
langtool-show-message-at-point
langtool-correct-buffer)
:init
(setq langtool-default-language +langtool-default-lang
langtool-mother-tongue +langtool-mother-tongue
langtool-language-tool-jar +langtool-jar-path)))
(when (featurep! +wordnut)
(def-package! wordnut
:commands (wordnut-search
wordnut-lookup-current-word)))
(when (featurep! +synosaurus)
(def-package! synosaurus
:commands (synosaurus-mode
synosaurus-lookup
synosaurus-choose-and-replace)
:init
(require 'synosaurus-wordnet)
:config
(setq synosaurus-choose-method 'default)))
(def-package! mixed-pitch
:config
(setq mixed-pitch-fixed-pitch-faces
(append mixed-pitch-fixed-pitch-faces
'(org-todo-keyword-todo
org-todo-keyword-habt
org-todo-keyword-done
org-todo-keyword-wait
org-todo-keyword-kill
org-todo-keyword-outd
org-special-keyword
org-date
org-property-value
org-special-keyword
org-property-value
org-ref-cite-face
org-tag
font-lock-comment-face))))

View file

@ -0,0 +1,11 @@
;; -*- no-byte-compile: t; -*-
;;; app/write/packages.el
(when (featurep! +langtool)
(package! langtool))
(when (featurep! +wordnut)
(package! wordnut))
(when (featurep! +synosaurus)
(package! synosaurus))
(package! mixed-pitch)