Created
June 14, 2016 08:02
-
-
Save PharaohKJ/cc849ad12ca613fec9604e5e91012ffc to your computer and use it in GitHub Desktop.
textlint for emacs flycheck
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; ref https://github.com/amperser/proselint/issues/37 | |
;; textlint | |
(flycheck-define-checker textlint | |
"A linter for prose." | |
:command ("textlint" "--format" "unix" "--rule" "no-mix-dearu-desumasu" "--rule" "max-ten" "--rule" "spellcheck-tech-word" source-inplace) | |
:error-patterns | |
((warning line-start (file-name) ":" line ":" column ": " | |
(id (one-or-more (not (any " ")))) | |
(message (one-or-more not-newline) | |
(zero-or-more "\n" (any " ") (one-or-more not-newline))) | |
line-end)) | |
:modes (text-mode markdown-mode gfm-mode)) | |
(add-to-list 'flycheck-checkers 'textlint) | |
(add-hook 'gfm-mode-hook 'flycheck-mode) | |
(add-hook 'markdown-mode-hook 'flycheck-mode) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment