Follow ElDoc convension
Instead of clearing childframe on pre-command hook, clear when display function is passed a nil argument
This commit is contained in:
parent
34004bf492
commit
317cd2ddfc
@ -74,7 +74,10 @@
|
|||||||
(defun eldoc-box-help-at-point ()
|
(defun eldoc-box-help-at-point ()
|
||||||
"Display hover info at point in a childframe."
|
"Display hover info at point in a childframe."
|
||||||
(interactive)
|
(interactive)
|
||||||
(eldoc-message (funcall eldoc-documentation-function)))
|
(let ((doc (funcall eldoc-documentation-function)))
|
||||||
|
(when doc
|
||||||
|
(eldoc-box--display doc)
|
||||||
|
(eldoc-box--inject-quit-func))))
|
||||||
|
|
||||||
(defun eldoc-box-quit-frame ()
|
(defun eldoc-box-quit-frame ()
|
||||||
"Hide childframe used by eglot doc."
|
"Hide childframe used by eglot doc."
|
||||||
@ -101,8 +104,7 @@
|
|||||||
(setq mode-line-format nil)
|
(setq mode-line-format nil)
|
||||||
(erase-buffer)
|
(erase-buffer)
|
||||||
(insert str)
|
(insert str)
|
||||||
(eldoc-box--get-frame doc-buffer))
|
(eldoc-box--get-frame doc-buffer))))
|
||||||
(eldoc-box--inject-quit-func)))
|
|
||||||
|
|
||||||
(defun eldoc-box-quit-hook ()
|
(defun eldoc-box-quit-hook ()
|
||||||
"Quit eglot doc childframe and remove self from hook."
|
"Quit eglot doc childframe and remove self from hook."
|
||||||
|
Loading…
Reference in New Issue
Block a user