branch: elpa/eldoc-mouse
commit 1105c7895ee7d2372f5f9689032778bcacd7bef4
Author: huangfeiyu <[email protected]>
Commit: GitHub <[email protected]>
Revise eldoc-mouse usage section in README
Updated usage instructions for eldoc-mouse in Emacs.
---
README.md | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/README.md b/README.md
index 46f814704cd..37763b4b9ba 100644
--- a/README.md
+++ b/README.md
@@ -30,10 +30,14 @@ You can install `eldoc-mouse` with the following command.
## Usage
### Enable eldoc-mouse:
Add the following in your Emacs configuration:
-```
-;; The following two lines are both optional, but you would like to add at
least one of them to your Emacs configuration.
-(use-package eldoc-mouse :hook (eglot-managed-mode emacs-lisp-mode)) ;; enable
mouse hover for eglot managed buffers, and emacs lisp buffers.
-(global-set-key (kbd "<f1> <f1>") 'eldoc-mouse-pop-doc-at-cursor) ;; replace
<f1> <f1> to a key you like. Displaying document on a popup when you press a
key.
+
+``` elisp
+(use-package eldoc-mouse
+ ;; replace <f1> <f1> to a key you like, "C-h ." maybe. Displaying document
on a popup when you press a key.
+ :bind (:map eldoc-mouse-mode-map
+ ("<f1> <f1>" . eldoc-mouse-pop-doc-at-cursor)) ;; optional
+ ;; enable mouse hover for eglot managed buffers, and emacs lisp buffers. ;;
optional
+ :hook (eglot-managed-mode emacs-lisp-mode))
```
### Supported modes
* eglot-managed-mode