Skip to content

Commit 192c8f5

Browse files
committed
Add lsp-treemacs-go-to
1 parent 6dd0e54 commit 192c8f5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lsp-treemacs.el

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,12 @@ this hook will be run after having jumped to the target."
248248
(goto-char (lsp--position-to-point location))
249249
(run-hooks 'lsp-treemacs-after-jump-hook))
250250

251+
(lsp-treemacs-define-action lsp-treemacs-go-to (:uri :position)
252+
"Goto POSITION in URL."
253+
(lsp-treemacs--open-file-in-mru (lsp--uri-to-path uri))
254+
(goto-char (lsp--position-to-point position))
255+
(run-hooks 'xref-after-jump-hook))
256+
251257
(defun lsp-treemacs--symbols->tree (items parent-key)
252258
"Convert ITEMS and PARENT-KEY to a treemacs tree."
253259
(-sort (lambda (left right)

0 commit comments

Comments
 (0)