Add more explaination in README

This commit is contained in:
Yuan Fu 2018-12-26 16:42:42 -05:00
parent 7b2768a6c5
commit 179350f563
No known key found for this signature in database
GPG Key ID: 1CF5ECABEC37A901

View File

@ -11,10 +11,10 @@ Get the file, add to load path, and
#+END_SRC #+END_SRC
* Usage * Usage
** Function ** Function
Enable either mode will make eldoc display documentation on a popup childframe. The difference is the position of the childframe — the first minor mode displays the childframe on (left or right) upper corner, while the second displays the childframe right below point. Enable either mode will make eldoc display documentation on a popup childframe. The difference is the position of the childframe — the first minor mode displays the childframe on the (left or right) upper corner, while the second displays the childframe right below point.
- =eldoc-box-hover-mode= :: Display documentation of the symbol at point in a childframe on upper corner. - =eldoc-box-hover-mode= :: Display documentation of the symbol at point in a childframe on upper corner.
- =eldoc-box-hover-at-point-mode= :: Display documentation of the symbol at point in a childframe below point. - =eldoc-box-hover-at-point-mode= :: Display documentation of the symbol at point in a childframe below point. (That's what the =at-point= part mean)
** Face ** Face
- =eldoc-box-border= :: Adjust =:background= of this face for border color. - =eldoc-box-border= :: Adjust =:background= of this face for border color.
- =eldoc-box-body= :: Adjust =:background= of this face for background color of childframe. - =eldoc-box-body= :: Adjust =:background= of this face for background color of childframe.
@ -28,7 +28,7 @@ As of writing this README, eglot doesn't have a public mode hook, use this hook:
(add-hook 'eglot--managed-mode-hook #'eldoc-box-hover-mode t) (add-hook 'eglot--managed-mode-hook #'eldoc-box-hover-mode t)
#+END_SRC #+END_SRC
** Help at point hack ** Help at point hack
If all you need is a "help at point" popup to be used with eglot, here is my hack: If all you need is a "help at point" popup to be used with eglot, here is my hack. You don't need to enable any minor mode, just call this command on the symbol.
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(defun moon-help-at-point () (defun moon-help-at-point ()
(interactive) (interactive)
@ -43,5 +43,6 @@ If all you need is a "help at point" popup to be used with eglot, here is my hac
(eglot--hover-info contents range)))) (eglot--hover-info contents range))))
(add-hook 'pre-command-hook #'eldoc-box-quit-frame t t))) (add-hook 'pre-command-hook #'eldoc-box-quit-frame t t)))
#+END_SRC #+END_SRC
* Contributors * Contributors
- [[https://github.com/joaotavora][João Távora]] - [[https://github.com/joaotavora][João Távora]]