summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/init-markdown.el11
1 files changed, 11 insertions, 0 deletions
diff --git a/lisp/init-markdown.el b/lisp/init-markdown.el
index f8f029f..03214ee 100644
--- a/lisp/init-markdown.el
+++ b/lisp/init-markdown.el
@@ -2,6 +2,17 @@
;;; Commentary:
;;; Code:
+(defun mpolden/browse-help-at-point ()
+ "Browse help URL at point.
+
+The URL is extracted from the help text found at point, if any."
+ ;; markdown-mode fontifies links by adding them to the help-echo property
+ ;; allows visiting links in documentation shown by eglot/eldoc
+ (interactive)
+ (let ((url (get-text-property (point) 'help-echo)))
+ (if url (browse-url url)
+ (error "No URL found"))))
+
(use-package markdown-mode
:ensure t
:commands gfm-mode