feat(emacs): highlight flycheck and eldoc output
This commit is contained in:
parent
f0bf1624fe
commit
d54c4e11c2
3 changed files with 10 additions and 2 deletions
|
|
@ -57,7 +57,7 @@
|
|||
("warning" 'warning)
|
||||
("information" 'info)
|
||||
(_ 'info))
|
||||
text
|
||||
(lean-highlight-string text)
|
||||
:filename file_name
|
||||
:checker checker :buffer buffer))
|
||||
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue