Function: eglot--hierarchy-label
eglot--hierarchy-label is a byte-compiled function defined in
eglot.el.gz.
Signature
(eglot--hierarchy-label NODE PARENT-URI)
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/eglot.el.gz
(defun eglot--hierarchy-label (node parent-uri)
(eglot--dbind ((HierarchyItem) name uri _detail ((:range item-range))) node
(with-temp-buffer
(insert (propertize
(or (get-text-property
0 'eglot--hierarchy-bullet name)
" ∘ ")
'face 'shadow))
(insert-text-button
name
:type 'eglot--hierarchy-item
'eglot--hierarchy-node node
'help-echo "mouse-1, RET: goto definition, mouse-3: center on node"
'keymap eglot-hierarchy-label-map
'action
(lambda (_btn)
(let* ((method
(get-text-property 0 'eglot--hierarchy-method name))
(target-uri
(if (eq method :callHierarchy/outgoingCalls)
;; We probably want `parent-uri' for this edge case
;; because that's where the call site we want
;; lives. (bug#78250, bug#78367).
(or parent-uri uri)
uri)))
(pop-to-buffer (find-file-noselect (eglot-uri-to-path target-uri)))
(eglot--goto
(or
(elt
(get-text-property 0 'eglot--hierarchy-call-sites name)
0)
item-range)))))
(buffer-string))))