Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
textlint for emacs flycheck
;; 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