mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
Note that we are pinned to the latest release of `seagle0128/grip-mode`,
which supports¹ alternate grip-like programs, namely `mdopen` and
`go-grip`. Although a specific one can be configured, `grip-mode` will
try and load any of the three (the two mentioned plus `grip`).
I’ve added them in the same order that `grip-mode` searches for them².
¹: https://github.com/seagle0128/grip-mode?tab=readme-ov-file#alternative-markdown-preview-without-accessing-github-api
²: 96a927dce6/grip-mode.el (L177-L179)
25 lines
1.3 KiB
EmacsLisp
25 lines
1.3 KiB
EmacsLisp
;; -*- lexical-binding: t; no-byte-compile: t; -*-
|
|
;;; lang/markdown/doctor.el
|
|
|
|
(when (require 'markdown-mode nil t)
|
|
(cond ((eq markdown-command #'+markdown-compile)
|
|
(unless (cl-loop for (exe . cmd) in (list (cons "marked" '+markdown-compile-marked)
|
|
(cons "pandoc" '+markdown-compile-pandoc)
|
|
(cons "markdown" '+markdown-compile-markdown)
|
|
(cons "multimarkdown" '+markdown-compile-multimarkdown))
|
|
if (and (memq cmd +markdown-compile-functions)
|
|
(executable-find exe))
|
|
return t)
|
|
(warn! "Couldn't find a markdown compiler, `markdown-preview' won't work")))
|
|
((stringp markdown-command)
|
|
(let ((cmd (car (split-string markdown-command " "))))
|
|
(unless (executable-find cmd)
|
|
(warn! "Couldn't find %S. markdown-preview command won't work"
|
|
cmd))))))
|
|
|
|
(when (modulep! +grip)
|
|
(unless (or (executable-find "mdopen")
|
|
(executable-find "go-grip")
|
|
(executable-find "grip"))
|
|
(warn! "Couldn't find the mdopen, go-grip or grip binaries. grip-mode will not work")))
|