Emacs-langtool
Emacs-langtool copied to clipboard
Anyone know how to make 2 spaces after a period/stop legal?
For now I have to do a global search and replace to make my documents single-spaced after the period before running langtool, then change them back to 2 spaces after the period. :-)
You could use the --disable
feature. This lets you disable langtool rules which are inappropriate. For example, I customize langtool as follows for my Markdown documents:
(setq langtool-user-arguments '("-b" "--line-by-line" "--disable" "EN_QUOTES,MULTIPLICATION_SIGN,WORD_CONTAINS_UNDERSCORE,ET_AL,SENTENCE_WHITESPACE,DASH_RULE,MORFOLOGIK_RULE_EN_US,EN_UNPAIRED_BRACKETS,WHITESPACE_RULE"))
To get a rule name, you can run the CLI version which will helpfully print out the relevant rule. (The Emacs interface seems to omit it.) You can also check https://community.languagetool.org/rule/list In your case, I think it's covered by WHITESPACE_RULE
, so it might work to try just
(setq langtool-user-arguments '("--disable" "WHITESPACE_RULE"))
?
(Note that each string must be separate, it's space-delimited. If you try "disable WHITESPACE_RULE"
, the Emacs code will throw an error even though it's fine on the CLI.)