Add: extend +write module

This commit is contained in:
fuxialexander 2018-02-11 17:04:30 +08:00
parent c3fb916435
commit 562b8ba431
4 changed files with 102 additions and 1 deletions

View file

@ -134,7 +134,7 @@
;irc ; how neckbeards socialize
;rss ; emacs as an RSS reader
;twitter ; twitter client https://twitter.com/vnought
;write ; emacs as a word processor (latex + org + markdown)
;; (write +synosaurus +wordnut +langtool) ; emacs as a word processor (latex + org + markdown)
;; Private modules are where you place your personal configuration files.
;; By default, they are not tracked. There is one module included here,

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

@ -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)