feat(org): display link at point in eldoc

This commit is contained in:
Henrik Lissner 2024-07-11 15:18:30 -04:00
parent 250f3a3899
commit 11cf61fef2
No known key found for this signature in database
GPG key ID: B60957CA074D39A3

View file

@ -1126,6 +1126,15 @@ between the two."
:hook (org-mode . org-eldoc-load) :hook (org-mode . org-eldoc-load)
:init (setq org-eldoc-breadcrumb-separator "") :init (setq org-eldoc-breadcrumb-separator "")
:config :config
(defadvice! +org-eldoc--display-link-at-point-a (&rest _)
"Display help for doom-*: links in minibuffer when cursor/mouse is over it."
:before-until #'org-eldoc-documentation-function
(if-let ((url (thing-at-point 'url t)))
(format "LINK: %s" url)
(and (eq (get-text-property (point) 'help-echo)
#'+org-link-doom--help-echo-from-textprop)
(+org-link-doom--help-echo-from-textprop nil (current-buffer) (point)))))
;; HACK Fix #2972: infinite recursion when eldoc kicks in 'org' or 'python' ;; HACK Fix #2972: infinite recursion when eldoc kicks in 'org' or 'python'
;; src blocks. ;; src blocks.
;; TODO Should be reported upstream! ;; TODO Should be reported upstream!