doomemacs/modules/lang/ocaml/doctor.el
Jeetaditya Chatterjee 547860e847
docs(tree-sitter): add doctor checks for flag
add in a check ala lsp, this has been applied to every module with tree
sitter support
2022-05-22 21:26:00 +01:00

28 lines
1,001 B
EmacsLisp

;; -*- lexical-binding: t; no-byte-compile: t; -*-
;;; lang/ocaml/doctor.el
(assert! (or (not (featurep! +lsp))
(featurep! :tools lsp))
"This module requires (:tools lsp)")
(assert! (or (not (featurep! +tree-sitter))
(featurep! :tools tree-sitter))
"This module requires (:tools tree-sitter)")
(unless (executable-find "ocamlmerlin")
(warn! "Couldn't find ocamlmerlin. Lookup, completion and syntax checking won't work"))
;; Tuareg can still indent
(unless (executable-find "ocp-indent")
(warn! "Couldn't find ocp-indent. Auto-indentation will be less precise"))
(when (featurep! :tools eval)
(unless (executable-find "utop")
(warn! "Couldn't find utop. REPL won't be available")))
(unless (executable-find "dune")
(warn! "Couldn't find dune. Won't be able to highlight dune files"))
(when (featurep! :editor format)
(unless (executable-find "ocamlformat")
(warn! "Couldn't find ocamlformat. Code-formatting will be unavailable")))