Skip to content

Commit

Permalink
Merge pull request #697 from AllTheLife/master
Browse files Browse the repository at this point in the history
Let the reference display in the center to view the relevant above.
  • Loading branch information
manateelazycat committed Aug 5, 2023
2 parents 2495ed8 + 34a5383 commit cfbda35
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions lsp-bridge-peek.el
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,11 @@ The beginnings of each symbol are replaced by ace strings with
(setq pos (list :line (string-to-number line) :character (string-to-number char)))
(push filename (nth 1 lsp-bridge-peek-symbol-at-point))
(push pos (nth 2 lsp-bridge-peek-symbol-at-point))
(push 0 (nth 6 lsp-bridge-peek-symbol-at-point)))))
(setf (nth 6 lsp-bridge-peek-symbol-at-point)
(nreverse (nth 6 lsp-bridge-peek-symbol-at-point)))
(push (- (/ lsp-bridge-peek-file-content-height 2)) (nth 6 lsp-bridge-peek-symbol-at-point))
(setf (nth 6 lsp-bridge-peek-symbol-at-point)
(nreverse (nth 6 lsp-bridge-peek-symbol-at-point))))))
(setf (nth 1 lsp-bridge-peek-symbol-at-point)
(nreverse (nth 1 lsp-bridge-peek-symbol-at-point))
(nth 2 lsp-bridge-peek-symbol-at-point)
Expand Down Expand Up @@ -767,13 +771,16 @@ The buffer and the point is returned in a cons cell."
(selected-symbol (nth lsp-bridge-peek-selected-symbol lsp-bridge-peek-symbol-tree))
(path-list (nth 1 selected-symbol))
(pos-list (nth 2 selected-symbol))
(content-move-list (nth 6 selected-symbol))
(file (nth selected-id path-list))
(buf (format "*lsp-bridge-peek-%s*" file))
(pos (nth selected-id pos-list)))
(pos (nth selected-id pos-list))
(content-move (nth selected-id content-move-list)))
(setq lsp-bridge-peek--symbol-bounds
(with-current-buffer buf
(save-excursion
(goto-char (acm-backend-lsp-position-to-point pos))
(forward-line content-move)
(beginning-of-line 1)
(cons (point)
(lsp-bridge-peek--search-symbols
Expand Down

0 comments on commit cfbda35

Please sign in to comment.