feat(emacs): highlight flycheck and eldoc output

This commit is contained in:
Sebastian Ullrich 2017-09-18 17:09:33 +02:00 committed by Leonardo de Moura
parent f0bf1624fe
commit d54c4e11c2
3 changed files with 10 additions and 2 deletions

View file

@ -57,7 +57,7 @@
("warning" 'warning)
("information" 'info)
(_ 'info))
text
(lean-highlight-string text)
:filename file_name
:checker checker :buffer buffer))

View file

@ -56,6 +56,14 @@
;; current window of current buffer is selected (i.e., in focus)
(eq (current-buffer) (window-buffer))))
(defun lean-highlight-string (str)
"Returns 'str' highlighted in lean-info-mode"
(lean-ensure-info-buffer " Lean tmp buffer")
(lean-with-info-output-to-buffer (get-buffer " Lean tmp buffer")
(princ str)
(font-lock-fontify-buffer)
(buffer-string)))
(defun lean-get-info-record-at-point (cont)
"Get info-record at the current point"
(with-demoted-errors "lean get info: %s"

View file

@ -55,7 +55,7 @@
(propertize expr 'face 'font-lock-variable-name-face)
type))))
(when type
(setq type-str type))
(setq type-str (lean-highlight-string type)))
(when tactic_params
(setq tactic_params (-map-indexed (lambda (i param)
(if (eq i tactic_param_idx)