proselint is a prose linter which returns error/warning messages like this:
2020-09-09-still-processing.md:18:14: typography.symbols.curly_quotes Use curly quotes “”, not straight quotes "".
I know there is a proselint checker in Flycheck, but I am trying to configure Flymake. For this task, I am using flymake-easy like this:
(defconst flymake-proselint-err-line-patterns
'(("^\\(.*\.md\\):\\([0-9]+\\):\\([0-9]+\\): \\(.*\\)$" 1 2 3 4)))
(defvar flymake-proselint-executable "proselint"
"The proselint executable to use for syntax checking.")
(defun flymake-proselint-command (filename)
"Construct a command that flymake can use to check Markdown in FILENAME."
(list flymake-proselint-executable filename))
(defun flymake-proselint-load ()
"Configure flymake mode to check the current buffer's ruby syntax."
(interactive)
(flymake-easy-load 'flymake-proselint-command
flymake-proselint-err-line-patterns
'tempdir
"md"))
(defun flymake-proselint-maybe-load ()
"Call `flymake-proselint-load' if this file appears to be Markdown."
(interactive)
(if (and buffer-file-name
(string= "md" (file-name-extension buffer-file-name)))
(flymake-proselint-load)))
I added flymake-proselint-maybe-load
to markdown-mode-hook
but flymake-show-diagnostics-buffer
shows an empty buffer instead of the above-mentioned message from proselint
.
My guess is I am setting flymake-proselint-err-line-patterns
, but I am not sure if this is the problem.