;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\210\305\306\307\310\311\312\311\313\311\314\315\316\315\317& \210\320\321\322\323\324DD\325\326\327\311\314&\210\320\330\322\323\331DD\332\326\327\333\334\311\306& \210\320\335\322\323\336DD\337\326\340\311\306&\210\320\341\322\323\342DD\343\326\340\311\306&\210\320\344\322\323\345DD\346\326\347\311\306&\210\320\350\322\323\351DD\352\326\327\311\306&\210\353\354\355\356\311\306%\210\353\357\360\361\311\306%\210\353\362\363\364\311\306%\210\353\365\366\367\311\306%\210\353\370\371\372\311\306%\210\353\373\374\375\311\306%\210\353\376\377\201@\311\306%\210\353\201A\201B\201C\311\306%\207" [require lsp-protocol lsp-mode xref dash custom-declare-group lsp-ui-peek nil "Improve version of xref with peek feature." :group tools convenience lsp-ui :link (custom-manual "(lsp-ui-peek) Top") (info-link "(lsp-ui-peek) Customizing") custom-declare-variable lsp-ui-peek-enable funcall function #[0 "\300\207" [t] 1] "Whether or not to enable ‘lsp-ui-peek’." :type boolean lsp-ui-peek-show-directory #[0 "\300\207" [t] 1] "Whether or not to show the directory of files." :safe t lsp-ui-peek-peek-height #[0 "\300\207" [20] 1] "Height of the peek code." integer lsp-ui-peek-list-width #[0 "\300\207" [50] 1] "Width of the right panel." lsp-ui-peek-fontify #[0 "\300\207" [on-demand] 1] "Whether to fontify chunks of code (use semantics colors).\nWARNING: 'always can heavily slow the processing when\n`lsp-ui-peek-expand-function' expands more than 1 file.\nIt is recommended to keep the default value of `lsp-ui-peek-expand-function'\nwhen this variable is set to 'always." (choice (const :tag "Never" never) (const :tag "On demand" on-demand) (const :tag "Always" always)) lsp-ui-peek-always-show #[0 "\300\207" [nil] 1] "Show the peek view even if there is only 1 cross reference.\nBy default, the peek view isn't shown if there is 1 xref." custom-declare-face lsp-ui-peek-peek ((((background light)) :background "light gray") (t :background "#031A25")) "Face used for the peek." lsp-ui-peek-list ((((background light)) :background "light gray") (t :background "#181818")) "Face used to list references." lsp-ui-peek-filename ((((background light)) :foreground "red") (t :foreground "dark orange")) "Face used for the filename's reference in the list." lsp-ui-peek-line-number ((t :foreground "grey25")) "Line number face." lsp-ui-peek-highlight ((((background light)) :background "yellow" :box (:line-width -1 :color "red")) (t :background "white" :foreground "black" :distant-foreground "white" :box (:line-width -1 :color "red"))) "Face used to highlight the reference/definition.\nDo not use box, underline or overline prop. If you want to use\nbox, use a negative value for its width. Those properties deform\nthe whole overlay." lsp-ui-peek-header ((((background light)) :background "grey30" :foreground "white") (t :background "white" :foreground "black")) "Face used for the headers." lsp-ui-peek-footer ((t :inherit lsp-ui-peek-header)) "Face used for the footers. Only the background of this face is used." lsp-ui-peek-selection ((((background light)) :background "grey30" :foreground "white") (t :background "white" :foreground "black")) "Face used for the current selection.\nDo not use box, underline or overline prop. If you want to use\nbox, use a negative value for its width. Those properties\ndeform the whole overlay."] 14) #@443 A function used to determinate which file(s) to expand in the list of xrefs. The function takes one parameter: a list of cons where the car is the filename and the cdr is the number of references in that file. It should returns a list of filenames to expand. WARNING: If you change this variable and expand more than 1 file, it is recommended to set `lsp-ui-peek-fontify' to 'never or 'on-demand, otherwise it will cause performances issues. (defvar lsp-ui-peek-expand-function 'lsp-ui-peek--expand-buffer (#$ . 3508)) (defvar lsp-ui-peek--overlay nil nil) (make-variable-buffer-local 'lsp-ui-peek--overlay) (defvar lsp-ui-peek--list nil nil) (make-variable-buffer-local 'lsp-ui-peek--list) (defvar lsp-ui-peek--last-xref nil nil) (make-variable-buffer-local 'lsp-ui-peek--last-xref) (defvar lsp-ui-peek--selection 0 nil) (make-variable-buffer-local 'lsp-ui-peek--selection) (defvar lsp-ui-peek--offset 0 nil) (make-variable-buffer-local 'lsp-ui-peek--offset) (defvar lsp-ui-peek--size-list 0 nil) (make-variable-buffer-local 'lsp-ui-peek--size-list) (defvar lsp-ui-peek--win-start nil nil) (make-variable-buffer-local 'lsp-ui-peek--win-start) (defvar lsp-ui-peek--method nil nil) (make-variable-buffer-local 'lsp-ui-peek--method) (defvar lsp-ui-peek--deactivate-keymap-fn nil nil) (make-variable-buffer-local 'lsp-ui-peek--deactivate-keymap-fn) #@40 Stores the major mode for lsp ui peek. (defvar lsp--peek-save-major-mode nil (#$ . 4860)) #@57 Hashtable which stores all jumps on a per window basis. (defvar lsp-ui-peek--jumps (make-hash-table) (#$ . 4956)) #@78 Make `evil-jumps.el' commands work on `lsp-ui-peek--jumps'. (fn &rest BODY) (defalias 'lsp-ui-peek--with-evil-jumps '(macro . #[128 "\300\301BB\207" [let ((evil--jumps-window-jumps lsp-ui-peek--jumps))] 4 (#$ . 5076)])) (byte-code "\300\301\302\303#\304\305\306\"\207" [function-put lsp-ui-peek--with-evil-jumps lisp-indent-function 1 eval-after-load evil-jumps #[0 "\300\301\302\"\207" [eval (progn (evil-define-motion lsp-ui-peek-jump-backward (count) (lsp-ui-peek--with-evil-jumps (evil--jump-backward count) (run-hooks 'xref-after-return-hook))) (evil-define-motion lsp-ui-peek-jump-forward (count) (lsp-ui-peek--with-evil-jumps (evil--jump-forward count) (run-hooks 'xref-after-return-hook)))) t] 3]] 4) #@30 (fn PROP &optional STRING) (defalias 'lsp-ui-peek--prop '(macro . #[513 "\300\301\302\303BBF\207" [get-text-property 0 or ((lsp-ui-peek--get-text-selection) "")] 8 (#$ . 5793)])) #@30 (fn PROP &optional STRING) (defalias 'lsp-ui-peek--add-prop '(macro . #[513 "\300\301\302\303BBDC\304\305\306\307BBBB\310BBB\207" [let obj or ((lsp-ui-peek--get-text-selection)) add-text-properties 0 (length obj) (obj) (obj)] 9 (#$ . 5982)])) #@14 (fn LEN S) (defalias 'lsp-ui-peek--truncate #[514 "\300!V\203\301\302Z\303]\"\304P\207\207" [string-width truncate-string-to-width 2 0 ".."] 6 (#$ . 6236)]) #@20 (fn &optional N) (defalias 'lsp-ui-peek--get-text-selection #[256 "\211\206\302 \303\302\211\203-\211A\262\242\262\262T\262\304\303\305#\204\nB\262\202\n\266\211\237\2628\207" [lsp-ui-peek--selection lsp-ui-peek--list nil 0 get-text-property lsp-ui-peek-hidden] 11 (#$ . 6407)]) (defalias 'lsp-ui-peek--get-selection #[0 "\300\301\302\303 \206 \304#\207" [get-text-property 0 lsp-ui-peek lsp-ui-peek--get-text-selection ""] 4]) (defalias 'lsp-ui-peek--visual-index #[0 " Z\207" [lsp-ui-peek--selection lsp-ui-peek--offset] 2]) #@18 (fn INDEX SRC) (defalias 'lsp-ui-peek--make-line #[514 "\211\211A\262\242GG\301 TU\302U\203\303\202\304\203&\305\2022\302U\2031\303\2022\306\203E\307!\262\310\302\311\n%\210\312\302\313#\204h\310\302\314\n%\210\315\302\316 $\210\310\302\317\314\n%\210\310\302\314 %\210\310\302\317\314 %\210\320\321\322\323\324\325\326\327TEE%\330\320\321\322\323\331%\320\332\322#\260\207" [lsp-ui-peek-list-width lsp-ui-peek--visual-index 0 lsp-ui-peek-header lsp-ui-peek-peek lsp-ui-peek-selection lsp-ui-peek-list copy-sequence add-face-text-property nil get-text-property lsp-ui-peek-faced t add-text-properties (lsp-ui-peek-faced t) default propertize "_" face display space :align-to - right-fringe " " (space :align-to (- right-fringe 1)) "\n"] 21 (#$ . 6964)]) #@22 (fn WIDTH STRINGS) (defalias 'lsp-ui-peek--adjust #[514 "\211\211A\262\242\301TZ\"\301\302Z\"B\207" [lsp-ui-peek-list-width lsp-ui-peek--truncate 2] 9 (#$ . 7782)]) (defalias 'lsp-ui-peek--make-footer #[0 "\301 \205D\302\303\304\305\306\307\310\311#\312BB\313\314\315\316\317TEE%\302\303\304\320\313\314\315\316\317EE%\302\303\304\305\306\307\310\311#\321BB\313\322%\302\323\304\324#\302\323\304\325#\260C\207" [lsp-ui-peek-list-width display-graphic-p propertize " " face :background face-background lsp-ui-peek-footer nil t (:height 1) display space :align-to - right-fringe (:height 1) (:height 1) (space :align-to (- right-fringe 0)) "\n" (:height 1) (:height 0.5)] 11]) #@18 (fn SRC1 SRC2) (defalias 'lsp-ui-peek--peek-new #[514 "\302 \303\300!\203\203\304\305 \\\202\306Z\307\310#\211\205(\211\311\312\313\"\"\262\262\211\2055\211\314\315\"\262\262\211\205C\211\316\317 \"\262\262\320\304!\321 !\203R \206V\322\211\"\211\323\324\325\326\310##\210\323\327\330#\210\323\331\332 #\207" [display-line-numbers-mode lsp-ui-peek--overlay window-text-width boundp 2 line-number-display-width 0 -zip-fill "" mapcar make-closure #[257 "\301\300\"\207" [V0 lsp-ui-peek--adjust] 4 "\n\n(fn IT)"] -map-indexed lsp-ui-peek--make-line -concat lsp-ui-peek--make-footer line-beginning-position overlayp make-overlay overlay-put after-string mapconcat identity display-line-numbers-disable t window get-buffer-window] 13 (#$ . 8477)]) #@14 (fn FILES) (defalias 'lsp-ui-peek--expand-buffer #[257 "\301\302\301\211\211\2033\211A\262\242\262\262\211\262\2033@\232\211\262\2043\262\262T\262\202\266\211\262\203>C\207\211@@C\207" [buffer-file-name nil 0] 9 (#$ . 9260)]) #@14 (fn XREFS) (defalias 'lsp-ui-peek--expand #[257 "\303\304\"!\305 \n8\203<\306\307\310\311 \206\312#\2035\306\307\313\311 \206#\312#\235\2035\211\2041 T\262\314\315!\210 T\211\202\211\206A\307\316 \207" [lsp-ui-peek-expand-function lsp-ui-peek--selection lsp-ui-peek--list mapcar #[257 "\300\301\"\300\302\"B\207" [plist-get :file :count] 5 "\n\n(fn IT)"] nil get-text-property 0 xrefs lsp-ui-peek--get-text-selection "" file lsp-ui-peek--toggle-file t lsp-ui-peek--recenter] 8 (#$ . 9521)]) #@103 Create a window to list references/defintions. XREFS is a list of references/definitions. (fn XREFS) (defalias 'lsp-ui-peek--show #[257 "\306 \307\211\307\310\311 \312\"\312=\203 T\313\314 !\313 Z \315\\W\203)\316\317!\210\320\321\"\262\211\307\310\211\203\216\211A\262\242\262\262T\262\322\323\"\322\324\"\322\325\"\326! \\\327&\203e\330!\202h\331!\332\333\334\335 &\327\336\337\340\341\342\343GTEE#\327\332\333#Q\fB\266\2023\266\f\237\344!\210\345 \207" [lsp-ui-peek--win-start lsp-ui-peek--selection lsp-ui-peek--offset lsp-ui-peek--size-list lsp-ui-peek--list lsp-ui-peek-peek-height window-start 0 nil logand 1 line-number-at-pos window-end 3 recenter 15 -sort #[514 "\300\301\"\300\301\"\231\207" [plist-get :file] 6 "\n\n(fn IT OTHER)"] plist-get :file :xrefs :count number-to-string propertize lsp-ui--workspace-path file-name-nondirectory face lsp-ui-peek-filename file xrefs " " display space :align-to - right-fringe lsp-ui-peek--expand lsp-ui-peek--peek lsp-ui-peek-show-directory] 19 (#$ . 10039)]) (defalias 'lsp-ui-peek--recenter #[0 "\303\245 V\205 SZ\211\207" [lsp-ui-peek-peek-height lsp-ui-peek--selection lsp-ui-peek--offset 2] 3]) #@21 (fn MIN-LEN LIST) (defalias 'lsp-ui-peek--fill #[514 "\211G\211W\203\300\301Z\302\"\"\207\207" [append -repeat ""] 8 (#$ . 11250)]) #@21 (fn MAJOR STRING) (defalias 'lsp-ui-peek--render #[514 "\302\303\304\"r\211q\210\305\306\"\216c\210\307\300!\210\304\211 \210)\3101'\311 0\210\202(\210)\312 *\207" [delay-mode-hooks inhibit-message generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] make-local-variable (error) font-lock-ensure buffer-string] 7 (#$ . 11397)]) #@33 Show reference's chunk of code. (defalias 'lsp-ui-peek--peek #[0 "\306 \211\206\307\310\"\307\311\"\312\313!\314Q\315\316 \317\320\n\321\"\203,\211G\322O\266\202\202.\262\321\"\203?\211G\322O\266\202\202A\262#\323\324\325#P\326\314\"\262\262\262\327C\330 S\331 S\332\f\322 \333\322\211\203\221\211A\262\242\262\262T\262\334\333\335\206\205\336 \206\205\337#\204eB\262\202e\266\211\237\262\"\"\"\"\206\241\340\"\210\341\342!\205\257\342 \207" [lsp-ui-peek--last-xref lsp-ui-peek--size-list lsp-ui-peek--method lsp-ui-peek-peek-height lsp-ui-peek--offset lsp-ui-peek--list lsp-ui-peek--get-selection plist-get :file :chunk " " lsp-ui--workspace-path "\n" format " %s %s" "workspace/" "textDocument/" string-prefix-p nil subst-char-in-string 9 32 split-string -concat lsp-ui-peek--fill -take -drop 0 get-text-property lsp-ui-peek-hidden lsp-ui-peek--get-text-selection "" lsp-ui-peek--peek-new fboundp lsp-ui-doc--hide-frame] 24 (#$ . 11799)]) #@10 (fn S) (defalias 'lsp-ui-peek--toggle-text-prop #[257 "\300\301\302\206 \303 \206 \304#\206\303 \305\301G\302?D$\210\207" [get-text-property 0 lsp-ui-peek-hidden lsp-ui-peek--get-text-selection "" add-text-properties] 8 (#$ . 12800)]) #@13 (fn FILE) (defalias 'lsp-ui-peek--toggle-hidden #[257 "\301\302\301\211\203?\211A\262\242\262\262T\262\303\304\302\305\206&\306 \206&\307#\310\"\230\2037\311!\210\2028B\262\202\266\211\237\262\211\207" [lsp-ui-peek--list nil 0 plist-get get-text-property lsp-ui-peek lsp-ui-peek--get-text-selection "" :file lsp-ui-peek--toggle-text-prop] 11 (#$ . 13052)]) #@13 (fn FILE) (defalias 'lsp-ui-peek--remove-hidden #[257 "\301\302\301\211\203J\211A\262\242\262\262T\262\303\304\302\305\206&\306 \206&\307#\310\"\230\203B\211\2066\306 \311\302G\312$\266\202CB\262\202\266\211\237\262\211\207" [lsp-ui-peek--list nil 0 plist-get get-text-property lsp-ui-peek lsp-ui-peek--get-text-selection "" :file add-text-properties (lsp-ui-peek-hidden nil)] 13 (#$ . 13444)]) #@13 (fn XREF) (defalias 'lsp-ui-peek--make-ref-line #[257 "\300\301\"\300\302\"\300\303\"\304\305\306\307T!\310\311#\312!#\211\206!\313 \314\315G\316 \317F$\210\207" [plist-get :summary :line :file format "%-3s %s" propertize number-to-string face lsp-ui-peek-line-number string-trim lsp-ui-peek--get-text-selection add-text-properties 0 lsp-ui-peek file] 13 (#$ . 13877)]) #@29 (fn XREFS FILENAME INDEX) (defalias 'lsp-ui-peek--insert-xrefs #[771 "\301B!\302\303\"\304T#\305!\262\262\262\306 \307\310G\311$\210\207" [lsp-ui-peek--list lsp-ui-peek--get-xrefs-in-file -map lsp-ui-peek--make-ref-line -insert-at -flatten lsp-ui-peek--get-text-selection add-text-properties 0 (xrefs nil)] 9 (#$ . 14267)]) #@28 (fn &optional NO-UPDATE) (defalias 'lsp-ui-peek--toggle-file #[256 "\301\302\303\304 \206 \305#\211\203\203\301\302\306\304 \206\305#\211\203Z\307\310\311\"\"\211\2031\312#\266\202\251\301\302\306\304 \206:\305#\313!\210\211\301\302\306\304 \206I\305#\232\204U\314\315!\210\202?\266\202\251\301\302\306\304 \206c\305#\313!\210\211\301\302\306\304 \206r\305#\232\204~\314\315!\210\202h\266\202\251\301\302\306\304 \206\214\305#\313!\210\211\301\302\306\304 \206\233\305#\232\204\247\314\315!\210\202\221\266\211?\205\260\316 \207" [lsp-ui-peek--list get-text-property 0 xrefs lsp-ui-peek--get-text-selection #1="" file -find-index make-closure #[257 "\301\302\303\206 \304 \206 \305#\300\232\207" [V0 get-text-property 0 file lsp-ui-peek--get-text-selection #1#] 5 "\n\n(fn IT)"] lsp-ui-peek--insert-xrefs lsp-ui-peek--toggle-hidden lsp-ui-peek--select-prev t lsp-ui-peek--peek] 10 (#$ . 14612) nil]) #@14 (fn INDEX) (defalias 'lsp-ui-peek--select #[257 "\\\211\207" [lsp-ui-peek--selection] 3 (#$ . 15557)]) #@28 (fn &optional NO-UPDATE) (defalias 'lsp-ui-peek--select-next #[256 "\303T!\205!\304\305!\210\306 \307ZV\203\nT\202 \211?\205!\310 \207" [lsp-ui-peek--selection lsp-ui-peek-peek-height lsp-ui-peek--offset lsp-ui-peek--get-text-selection lsp-ui-peek--select 1 lsp-ui-peek--visual-index 2 lsp-ui-peek--peek] 4 (#$ . 15671) nil]) #@28 (fn &optional NO-UPDATE) (defalias 'lsp-ui-peek--select-prev #[256 "\302V\203\303\304!\210\305 \302W\203 S\202\n\211?\205\306 \207" [lsp-ui-peek--selection lsp-ui-peek--offset 0 lsp-ui-peek--select -1 lsp-ui-peek--visual-index lsp-ui-peek--peek] 3 (#$ . 16013) nil]) #@11 (fn FN) (defalias 'lsp-ui-peek--skip-refs #[257 "\301\302\303\304 \206 \305#\306\307 \2050\301\302\303\304 \206\305#\232\2050\211\232?\2050\262\310!\210\202\207" [lsp-ui-peek--selection get-text-property 0 file lsp-ui-peek--get-text-selection "" nil lsp-ui-peek--get-selection t] 7 (#$ . 16297)]) (defalias 'lsp-ui-peek--select-prev-file #[0 "\301 \204 \302 \210\202\"\303\302!\210\301 \203\"\303\302!\210\304U\204\"\305\306!\210\307\304\310\311 \206+\312#\2035\313 \210\202B\314\307\304\315\311 \206?\312#!\210\305\306!\210\316 \210\317 \207" [lsp-ui-peek--selection lsp-ui-peek--get-selection lsp-ui-peek--select-prev lsp-ui-peek--skip-refs 0 lsp-ui-peek--select-next t get-text-property xrefs lsp-ui-peek--get-text-selection "" lsp-ui-peek--toggle-file lsp-ui-peek--remove-hidden file lsp-ui-peek--recenter lsp-ui-peek--peek] 5 nil nil]) (defalias 'lsp-ui-peek--select-next-file #[0 "\300\301!\210\302\303\304\305 \206 \306#\203\307 \210\202$\310\302\303\311\305 \206!\306#!\210\301\312!\210\313 \210\314 \207" [lsp-ui-peek--skip-refs lsp-ui-peek--select-next get-text-property 0 xrefs lsp-ui-peek--get-text-selection "" lsp-ui-peek--toggle-file lsp-ui-peek--remove-hidden file t lsp-ui-peek--recenter lsp-ui-peek--peek] 5 nil nil]) #@52 Hide the chunk of code and restore previous state. (defalias 'lsp-ui-peek--peek-hide #[0 "\303!\203\n\304!\210\305\211\n\205\306\307 \n\"\207" [lsp-ui-peek--overlay lsp-ui-peek--last-xref lsp-ui-peek--win-start overlayp delete-overlay nil set-window-start get-buffer-window] 4 (#$ . 17568)]) #@20 Deactivate keymap. (defalias 'lsp-ui-peek--deactivate-keymap #[0 "\211\205 \301\211 \207" [lsp-ui-peek--deactivate-keymap-fn nil] 2 (#$ . 17873)]) #@62 Go to a reference/definition. (fn &optional X OTHER-WINDOW) (defalias 'lsp-ui-peek--goto-xref #[512 "\206\302 \211\203\226\211p\303\304\"\303\305\"\303\306\"\307!\204$\310\311\"\207\312\313 \210r\314!\2063\315!q\210\214~\210\212\\\316V\203J\317b\210y\210u\210\320 +\321\301!\205T  \203c\322\323!\324\"\210\202i\325\323!!\210rq\210\326\327!\210) \204\217\211\330\317!\210\211\211\203\216\211@\331!\210A\266\202\202}\210b\210\332\333!\207\334 \207" [lsp-ui-peek--win-start lsp--buffer-workspaces lsp-ui-peek--get-selection plist-get :file :line :column file-readable-p user-error "File not readable: %s" nil lsp-ui-peek--abort get-file-buffer find-file-noselect 0 1 point-marker boundp pop-to-buffer marker-buffer t switch-to-buffer lsp-ui-peek-mode -1 lsp-mode lsp--open-in-workspace run-hooks xref-after-jump-hook lsp-ui-peek--toggle-file] 15 (#$ . 18029) nil]) (defalias 'lsp-ui-peek--goto-xref-other-window #[0 "\300\301\302\"\207" [lsp-ui-peek--goto-xref nil t] 3 nil nil]) #@36 Keymap for ‘lsp-ui-peek-mode’. (defvar lsp-ui-peek-mode-map (byte-code "\300 \301\302\"\210\303\304\305#\210\303\306\305#\210\303\307\310#\210\303\311\310#\210\303\312\313#\210\303\314\313#\210\303\315\316#\210\303\317\316#\210\303\320\316#\210\303\321\322#\210\303\323\322#\210\303\324\322#\210\303\325\326#\210\303\327\305#\210\303\330\331#\210\303\332\333#\210\207" [make-sparse-keymap suppress-keymap t define-key "" lsp-ui-peek--abort "" [134217838] lsp-ui-peek--select-next-file [right] [134217840] lsp-ui-peek--select-prev-file [left] "" lsp-ui-peek--select-next "n" [down] "" lsp-ui-peek--select-prev "p" [up] " " lsp-ui-peek--toggle-file "q" " " lsp-ui-peek--goto-xref [134217741] lsp-ui-peek--goto-xref-other-window] 5) (#$ . 19047)) #@63 Do not call this function, call `lsp-ui-peek--abort' instead. (defalias 'lsp-ui-peek--disable #[0 "\301\300!\205\205\300\302!\210\303 \207" [lsp-ui-peek-mode boundp -1 lsp-ui-peek--peek-hide] 2 (#$ . 19824)]) #@13 Abort peek. (defalias 'lsp-ui-peek--abort #[0 "\300\301\302\303#\207" [run-with-idle-timer 0 nil lsp-ui-peek--disable] 4 (#$ . 20044) nil]) #@101 Non-nil if Lsp-Ui-Peek mode is enabled. Use the command `lsp-ui-peek-mode' to change this variable. (defvar lsp-ui-peek-mode nil (#$ . 20191)) (make-variable-buffer-local 'lsp-ui-peek-mode) #@579 Mode for lsp-ui-peek. This is a minor mode. If called interactively, toggle the `Lsp-Ui-Peek mode' mode. If the prefix argument is positive, enable the mode, and if it is zero or negative, disable the mode. If called from Lisp, toggle the mode if ARG is `toggle'. Enable the mode if ARG is nil, omitted, or is a positive number. Disable the mode if ARG is a negative number. To check whether the minor mode is enabled in the current buffer, evaluate `lsp-ui-peek-mode'. The mode's hook is called both when the mode is enabled and when it is disabled. (fn &optional ARG) (defalias 'lsp-ui-peek-mode #[256 "\304 \305=\203 ?\202\247\203\306W\203\307\202\310\311\301!\2031\312\300 \"\2031\300 B\203>\313\n\310\314#\202D\315 \210\316 \210\317\320\203N\321\202O\322\"\210\323\324!\203q\304 \203c\211\304 \232\203q\325\326\203m\327\202n\330\331#\210\210\332 \210\207" [lsp-ui-peek-mode local-minor-modes lsp-ui-peek-mode-map lsp-ui-peek--deactivate-keymap-fn current-message toggle 1 nil t boundp delq set-transient-map lsp-ui-peek--abort lsp-ui-peek--deactivate-keymap lsp-ui-peek--peek-hide run-hooks lsp-ui-peek-mode-hook lsp-ui-peek-mode-on-hook lsp-ui-peek-mode-off-hook called-interactively-p any message "Lsp-Ui-Peek mode %sabled%s" "en" "dis" " in current buffer" force-mode-line-update] 6 (#$ . 20388) (byte-code "\203\n\301!\202 \302C\207" [current-prefix-arg prefix-numeric-value toggle] 2)]) (defvar lsp-ui-peek-mode-hook nil) (byte-code "\301\302N\204\f\303\301\302\304#\210\303\301\305\306#\210\303\301\307\310C#\210\311\312\310\313\300!\205#\310\211%\207" [lsp-ui-peek-mode-map lsp-ui-peek-mode-hook variable-documentation put "Hook run after entering or leaving `lsp-ui-peek-mode'.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" custom-type hook standard-value nil add-minor-mode lsp-ui-peek-mode boundp] 6) #@160 Find INPUT references. METHOD is ‘references’, ‘definitions’, `implementation` or a custom kind. PARAM is the request params. (fn INPUT METHOD PARAM) (defalias 'lsp-ui-peek--find-xrefs #[771 "\304\"\211\204\305\306\"\210\307 \210\310\311!\203 \312 \210) \204\203\211A\204\203\313@\314\"G\315U\203\203\313@\314\"@\316!\211\203]\317!\320\321\"\320\322\"\320\323\"\324\325\326!\327\330\257!\207\331!\206f\332!\320\321\"\320\322\"\320\323\"\324\325\326\333 !!\327\330\257!\207\334 \210\335!\207" [lsp-ui-peek--method lsp-ui-peek--jumps evil--jumps-window-jumps lsp-ui-peek-always-show lsp-ui-peek--get-references user-error "Not found for: %s" xref-push-marker-stack featurep evil-jumps evil-set-jump plist-get :xrefs 1 lsp:location-uri lsp:location-range gethash "start" "line" "character" lsp-ui-peek--goto-xref :file lsp--uri-to-path :line :column lsp:location-link-target-selection-range lsp:location-link-target-range lsp:location-link-target-uri lsp-ui-peek-mode lsp-ui-peek--show] 17 (#$ . 22341)]) #@87 Find references to the IDENTIFIER at point. (fn &optional INCLUDE-DECLARATION EXTRA) (defalias 'lsp-ui-peek-find-references #[512 "\300\301 \302\303\304\305\"\"#\207" [lsp-ui-peek--find-xrefs symbol-at-point "textDocument/references" append lsp--make-reference-params nil] 10 (#$ . 23397) nil]) #@68 Find definitions to the IDENTIFIER at point. (fn &optional EXTRA) (defalias 'lsp-ui-peek-find-definitions #[256 "\300\301 \302\303\304 \"#\207" [lsp-ui-peek--find-xrefs symbol-at-point "textDocument/definition" append lsp--text-document-position-params] 7 (#$ . 23702) nil]) #@77 Find implementation locations of the symbol at point. (fn &optional EXTRA) (defalias 'lsp-ui-peek-find-implementation #[256 "\300\301 \302\303\304 \"#\207" [lsp-ui-peek--find-xrefs symbol-at-point "textDocument/implementation" append lsp--text-document-position-params] 7 (#$ . 23985) nil]) #@102 Find symbols in the worskpace. The symbols are found matching PATTERN. (fn PATTERN &optional EXTRA) (defalias 'lsp-ui-peek-find-workspace-symbol #[513 "\300\301\302\303\304\"\"#\207" [lsp-ui-peek--find-xrefs "workspace/symbol" append lsp-make-workspace-symbol-params :query] 10 (#$ . 24285) (byte-code "\300\301\302\303#C\207" [read-string "workspace/symbol: " nil xref--read-pattern-history] 4)]) #@223 Find custom references. KIND is a symbol to name the references (definition, reference, ..). REQUEST is the method string to send the the language server. EXTRA is a plist of extra parameters. (fn METHOD &optional EXTRA) (defalias 'lsp-ui-peek-find-custom #[513 "\300\301 \302\303 \"#\207" [lsp-ui-peek--find-xrefs symbol-at-point append lsp--text-document-position-params] 8 (#$ . 24695)]) #@137 Return the chunk of code pointed to by POS (a Position object) in the current buffer. START and END are delimiters. (fn POS START END) (defalias 'lsp-ui-peek--extract-chunk-from-buffer #[771 "\304!\305\306 \307\245ZT \307\245\212b\210\310!\310 {\310 \311 {\311 \311!{GQG\n\312=\2037\313 \"\262\314 ^\\ \204G\202K ^\\\315$\210\316 ^\\ \204a\202e ^\\\317\305%\210\211\\OB\266\206*\207" [inhibit-field-text-motion lsp-ui-peek-peek-height lsp-ui-peek-fontify lsp--peek-save-major-mode lsp--position-to-point t 1 2 line-beginning-position line-end-position on-demand lsp-ui-peek--render remove-text-properties (face nil) add-face-text-property lsp-ui-peek-highlight] 18 (#$ . 25096)]) #@122 Return an item from FILENAME given a LOC. LOCATION can be either a LSP Location or SymbolInformation. (fn FILENAME LOC) (defalias 'lsp-ui-peek--xref-make-item #[514 "\300!\206\211\301!\206\302!\206\303!\304\305\"\304\306\"\304\307\"\304\310\"\304\307\"\304\310\"\311U\205:#\211A\262\242\312\206I \313\206P\314\315 \316\257\n\207" [lsp:symbol-information-location lsp:location-range lsp:location-link-target-selection-range lsp:location-link-target-range gethash "start" "end" "line" "character" lsp-ui-peek--extract-chunk-from-buffer :summary :chunk :file :line :column] 23 (#$ . 25824)]) #@17 (fn FILENAME) (defalias 'lsp-ui-peek--fontify-buffer #[257 "\305=\205 \204\306\302!\210\211\307\310\211\311 \210,\312 \207" [lsp-ui-peek-fontify buffer-file-name delay-mode-hooks inhibit-message enable-local-variables always make-local-variable nil t set-auto-mode font-lock-ensure] 5 (#$ . 26459)]) #@269 Return all references that contain a file. FILE is a cons where its car is the filename and the cdr is a list of Locations within the file. We open and/or create the file/buffer only once for all references. The function returns a list of `ls-xref-item'. (fn FILE) (defalias 'lsp-ui-peek--get-xrefs-in-file #[257 "\211@\302!\303\304\"\203,\305\306\307\"r\211q\210\303\310\"\216\311!\210\312!\210\313A\"*\207\314!\203O\305\306\307\"r\211q\210\303\315\"\216\316!\210\312!\210\313A\"*\207\317\320\"\207" [major-mode lsp--peek-save-major-mode find-buffer-visiting make-closure #[257 "\301\300\"\207" [V0 lsp-ui-peek--xref-make-item] 4 "\n\n(fn LOC)"] generate-new-buffer " *temp*" t #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] insert-buffer-substring-no-properties lsp-ui-peek--fontify-buffer mapcar file-readable-p #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] insert-file-contents-literally user-error "Cannot read %s"] 8 (#$ . 26777)]) #@44 Return a list of xrefs in FILE. (fn FILE) (defalias 'lsp-ui-peek--get-xrefs-list #[257 "\211\211A\262\242\300\301\302G\257\207" [:file :xrefs :count] 10 (#$ . 27787)]) #@97 Get all references/definitions for the symbol under point. Returns item(s). (fn METHOD PARAMS) (defalias 'lsp-ui-peek--get-references #[514 "\300\"\211\205\314\211<\203\211\202 \301!\203\302\303\"\202 \211C\211\205\312\304\305\306\307\310@!\203}\311\312\303\313\303\211\203s\211A\262\242\262\262T\262\314\310!!\315\"\211\203b\211AB\241\210\202jDB\262\266\202\262\2027\266\211\262\"\237\202\310\311\316\303\313\303\211\203\301\211A\262\242\262\262T\262\314\317!!\315\"\211\203\260\211AB\241\210\202\270DB\262\266\202\262\202\205\266\211\262\"\237\"\"\262\207" [lsp-request vectorp append nil -filter #[257 "\300\301\"\302!\206\303\304\305\"\210\207" [plist-get :file f-file\? nil lsp-log "The following file %s is missing, ignoring from the results."] 6 "\n\n(fn INPUT0)"] mapcar lsp-ui-peek--get-xrefs-list lsp:location-uri -map #[257 "\211@A\237B\207" #1=[] 3 "\n\n(fn N)"] 0 lsp--uri-to-path assoc #[257 "\211@A\237B\207" #1# 3 "\n\n(fn N)"] lsp:location-link-target-uri] 20 (#$ . 27969)]) #@15 (fn ENABLE) (defalias 'lsp-ui-peek-enable #[257 "\301\300!\205?\205\302\303!\207" [lsp-ui-mode-map boundp user-error "Please load lsp-ui before trying to enable lsp-ui-peek"] 3 (#$ . 29051) nil]) (provide 'lsp-ui-peek)