;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\300\305!\210\300\306!\210\300\307!\210\310\311!\203&\300\312!\210\313\314\315\316\317\320\317\321\317\322\323\324\323\325& \210\326\327\330\331\332DD\333\334\335\317\322&\210\326\336\330\331\337DD\340\334\335\317\314&\210\326\341\330\331\342DD\343\334\335\317\314&\210\326\344\330\331\345DD\346\334\347\317\314&\210\326\350\330\331\351DD\352\334\353\317\314&\210\326\354\330\331\355DD\356\334\357\317\314&\210\326\360\330\331\361DD\362\334\363\317\314&\210\326\364\330\331\365DD\366\334\363\317\314&\210\326\367\330\331\370DD\371\334\335\317\314&\210\326\372\330\331\373DD\374\334\335\317\314&\210\326\375\330\331\376DD\377\334\201@\317\314&\210\326\201A\330\331\201BDD\201C\334\335\317\314&\210\201D\201E\201F\201G\317\314%\210\201D\336\201H\201I\317\314%\210\201D\201J\201K\201L\317\314%\207" [require lsp-protocol lsp-mode dash dash-functional goto-addr markdown-mode cl-lib featurep xwidget-internal xwidget custom-declare-group lsp-ui-doc nil "Display informations of the current line." :group tools convenience lsp-ui :link (custom-manual "(lsp-ui-doc) Top") (info-link "(lsp-ui-doc) Customizing") custom-declare-variable lsp-ui-doc-enable funcall function #[0 "\300\207" [t] 1] "Whether or not to enable lsp-ui-doc." :type boolean lsp-ui-doc-header #[0 "\300\207" [nil] 1] "Whether or not to enable the header which display the symbol string." lsp-ui-doc-include-signature #[0 "\300\207" [nil] 1] "Whether or not to include the object signature/type in the frame." lsp-ui-doc-position #[0 "\300\207" [at-point] 1] "Where to display the doc." (choice (const :tag "Top" top) (const :tag "Bottom" bottom) (const :tag "At point" at-point)) lsp-ui-doc-alignment #[0 "\300\207" [frame] 1] "How to align the doc.\nThis only takes effect when `lsp-ui-doc-position' is 'top or 'bottom." (choice (const :tag "Frame" frame) (const :tag "Window" window)) lsp-ui-doc-border #[0 "\300\207" [#1="white"] 1 #1#] "Border color of the frame." color lsp-ui-doc-max-width #[0 "\300\207" [150] 1] "Maximum number of columns of the frame." integer lsp-ui-doc-max-height #[0 "\300\207" [30] 1] "Maximum number of lines in the frame." lsp-ui-doc-use-childframe #[0 "\300\207" [t] 1] "Whether to display documentation in a child-frame or the current frame.\nChild frames requires GNU/Emacs version >= 26 and graphical frames." lsp-ui-doc-use-webkit #[0 "\300\207" [nil] 1] "Whether to display documentation in a WebKit widget in a child-frame.\nThis requires GNU/Emacs version >= 26 and built with the `--with-xwidgets`\noption." lsp-ui-doc-delay #[0 "\300\207" [0.2] 1] "Number of seconds before showing the doc." number lsp-ui-doc-winum-ignore #[0 "\300\207" [t] 1] "Whether to ignore lsp-ui-doc buffers in winum." custom-declare-face lsp-ui-doc-background ((((background light)) :background "#b3b3b3") (t :background "#272A36")) "Background color of the documentation.\nOnly the `background' is used in this face." ((t :foreground "black" :background "deep sky blue")) "Face used on the header." lsp-ui-doc-url ((t :inherit link)) "Face used on links."] 14) #@44 Frame parameters used to create the frame. (defvar lsp-ui-doc-frame-parameters '((left . -1) (no-focus-on-map . t) (min-width . 0) (width . 0) (min-height . 0) (height . 0) (internal-border-width . 1) (vertical-scroll-bars) (horizontal-scroll-bars) (right-fringe . 0) (menu-bar-lines . 0) (tool-bar-lines . 0) (line-spacing . 0) (unsplittable . t) (undecorated . t) (top . -1) (visibility) (mouse-wheel-frame) (no-other-frame . t) (inhibit-double-buffering . t) (drag-internal-border . t) (no-special-glyphs . t) (desktop-dont-save . t)) (#$ . 3223)) #@202 Function called to format the documentation. The function takes a string as parameter and should return a string. If this variable is nil (the default), the documentation will be rendered as markdown. (defvar lsp-ui-doc-render-function nil (#$ . 3781)) #@98 Hooks run on child-frame creation. The functions receive 2 parameters: the frame and its window. (defvar lsp-ui-doc-frame-hook nil (#$ . 4040)) #@58 Path to the page loaded when a WebKit widget is created. (defvar lsp-ui-doc-webkit-client-path (byte-code "\302\303\206 !\304Q\207" [load-file-name buffer-file-name "file://" file-name-directory "lsp-ui-doc.html"] 3) (#$ . 4190)) #@112 Variables from the parents frame that we want to access in the child. Because some variables are buffer local. (defvar lsp-ui-doc--parent-vars nil (#$ . 4430)) (make-variable-buffer-local 'lsp-ui-doc--parent-vars) #@58 Overlay used to display the documentation in the buffer. (defvar lsp-ui-doc--inline-ov nil (#$ . 4650)) (make-variable-buffer-local 'lsp-ui-doc--inline-ov) (defvar lsp-ui-doc--bounds nil nil) (make-variable-buffer-local 'lsp-ui-doc--bounds) (defvar lsp-ui-doc--timer nil nil) (make-variable-buffer-local 'lsp-ui-doc--timer) (defconst lsp-ui-doc--buffer-prefix " *lsp-ui-doc-") #@57 Execute BODY in the lsp-ui-doc buffer. (fn &rest BODY) (defalias 'lsp-ui-doc--with-buffer '(macro . #[128 "\300\301\302\303\304\305\300\306BB\307BBFE\207" [let ((parent-vars (list :buffer (current-buffer) :window (get-buffer-window)))) with-current-buffer (get-buffer-create (lsp-ui-doc--make-buffer-name)) (setq lsp-ui-doc--parent-vars parent-vars) prog1 ((buffer-read-only nil)) ((setq buffer-read-only t))] 10 (#$ . 5033)])) #@52 Return VAR in `lsp-ui-doc--parent-vars'. (fn VAR) (defalias 'lsp-ui-doc--get-parent '(macro . #[257 "\300\301E\207" [plist-get lsp-ui-doc--parent-vars] 4 (#$ . 5470)])) #@70 Set the frame parameter ‘lsp-ui-doc-frame’ to FRAME. (fn FRAME) (defalias 'lsp-ui-doc--set-frame '(macro . #[257 "\300\301\302F\207" [set-frame-parameter nil 'lsp-ui-doc-frame] 5 (#$ . 5647)])) #@43 Return the child frame. (fn &optional _) (defalias 'lsp-ui-doc--get-frame #[256 "\300\301\302\"\303!\205 \211\207" [frame-parameter nil lsp-ui-doc-frame frame-live-p] 4 (#$ . 5853)]) #@32 Return child frame visibility. (defalias 'lsp-ui-doc--frame-visible-p #[0 "\300 \211\205 \301!\207" [lsp-ui-doc--get-frame frame-visible-p] 3 (#$ . 6045)]) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put lsp-ui-doc--frame-visible-p speed -1 put byte-optimizer byte-compile-inline-expand] 5) #@64 Construct the buffer name, it should be unique for each frame. (defalias 'lsp-ui-doc--make-buffer-name #[0 "\301\302\303\"\206\f\301\302\304\"\305Q\207" [lsp-ui-doc--buffer-prefix frame-parameter nil window-id name "*"] 4 (#$ . 6362)]) #@55 Wraps a line of text for inline display. (fn STRING) (defalias 'lsp-ui-doc--inline-wrapped-line #[257 "\300 \211\301\230\262\203 \301\207GW\203\207\302\303ZO\304\305\306\303Z\307O!!Q\207" [lsp-ui-doc--inline-window-width "" 0 4 "\n" string-trim-left lsp-ui-doc--inline-wrapped-line nil] 9 (#$ . 6606)]) #@51 Formats STRING for inline rendering. (fn STRING) (defalias 'lsp-ui-doc--inline-formatted-string #[257 "\300\301\302\303\"\304#\207" [mapconcat #[257 "\300\301!!\207" [lsp-ui-doc--inline-wrapped-line string-trim-right] 4 "\n\n(fn LINE)"] split-string "[\n \f ]" "\n"] 6 (#$ . 6928)]) #@66 Render the MARKED-STRING. (fn MARKED-STRING &optional LANGUAGE) (defalias 'lsp-ui-doc--extract-marked-string #[513 "\301;\203\n\202 \302!\303!\211\203 \304!\206!\305!\206!\203?\211\2039\211\306\230\2049\307\310#\266\203\202F\266\203\202F\311\312!!\266\203!\207" [lsp-ui-doc-use-webkit string-trim-right lsp:markup-content-value lsp-marked-string\? lsp:marked-string-language lsp:markup-content-kind "text" format "```%s\n%s\n```" lsp--render-element lsp-ui-doc--inline-formatted-string] 10 (#$ . 7220)]) #@27 (fn LIST-MARKED-STRING) (defalias 'lsp-ui-doc--filter-marked-string #[257 "\301\211\302\301\"\303\301\211\203;\211A\262\242\262\262T\262\304!\2033\305\306!!\2033B\262\202 B\262\202 \266\237\237D\266\202\203J\207\211A@\207" [lsp-ui-doc-include-signature nil append 0 lsp-marked-string\? lsp-get-renderer lsp:marked-string-language] 10 (#$ . 7753)]) #@238 Extract the documentation from CONTENTS. CONTENTS can be differents type of values: MarkedString | MarkedString[] | MarkupContent (as defined in the LSP). We don't extract the string that `lps-line' is already displaying. (fn CONTENTS) (defalias 'lsp-ui-doc--extract #[257 "\302!\203\303\304\305\306\307\"!\310#\207\311!\203&\312!\203&\304\313!\312!\"\207\311!\2030\304!\207\314!\203E\315!\230\203E\304\316!\"\207\314!\205V\315! \230\205V\316!\207" [lsp/markup-kind-markdown lsp/markup-kind-plain-text vectorp mapconcat lsp-ui-doc--extract-marked-string lsp-ui-doc--filter-marked-string seq-filter identity "\n\n" lsp-marked-string\? lsp:marked-string-language lsp:marked-string-value lsp-markup-content\? lsp:markup-content-kind lsp:markup-content-value] 7 (#$ . 8139)]) #@34 Launch embedded WebKit instance. (defalias 'lsp-ui-doc--webkit-run-xwidget #[0 "\304p\305\306 Fr\307\310 !q\210\211\311\312\313c\210\314b\210\315\316\311\314\211\311\317 &\320\311\"\210\321``T\322\323\324E$\210\325 \210\326\327\314! \"\210\330 \210\331 \262*\312)\207" [lsp-ui-doc--parent-vars buffer-read-only inhibit-read-only lsp-ui-doc-webkit-client-path :buffer :window get-buffer-window get-buffer-create lsp-ui-doc--make-buffer-name nil t " " 1 make-xwidget webkit buffer-name set-xwidget-query-on-exit-flag put-text-property display xwidget :xwidget xwidget-webkit-mode xwidget-webkit-goto-uri xwidget-at lsp-ui-doc--webkit-set-background lsp-ui-doc--webkit-set-foreground] 9 (#$ . 8943)]) #@44 Set background color of the WebKit widget. (defalias 'lsp-ui-doc--webkit-set-background #[0 "\300\301\302\303\"!\207" [lsp-ui-doc--webkit-execute-script format "document.body.style.background = '%s';" "#fdfdfd"] 4 (#$ . 9656)]) #@44 Set foreground color of the WebKit widget. (defalias 'lsp-ui-doc--webkit-set-foreground #[0 "\300\301\302\303\304\305\"\"!\207" [lsp-ui-doc--webkit-execute-script format "document.body.style.color = '%s';" face-attribute default :foreground] 6 (#$ . 9890)]) #@26 Return Xwidget instance. (defalias 'lsp-ui-doc--webkit-get-xwidget #[0 "\302p\303\304 Fr\305\306 !q\210\211\307\310\311!)\312)\207" [lsp-ui-doc--parent-vars buffer-read-only :buffer :window get-buffer-window get-buffer-create lsp-ui-doc--make-buffer-name nil xwidget-at 1 t] 4 (#$ . 10154)]) #@92 Execute SCRIPT in embedded Xwidget and run optional callback FN. (fn SCRIPT &optional FN) (defalias 'lsp-ui-doc--webkit-execute-script #[513 "\300 \211\205 \301#\207" [lsp-ui-doc--webkit-get-xwidget xwidget-webkit-execute-script] 7 (#$ . 10455)]) #@64 Execute SCRIPT in embedded Xwidget synchronously. (fn SCRIPT) (defalias 'lsp-ui-doc--webkit-execute-script-rv #[257 "\300 \211\205\n\301\"\207" [lsp-ui-doc--webkit-get-xwidget xwidget-webkit-execute-script-rv] 5 (#$ . 10713)]) #@17 Hide the frame. (defalias 'lsp-ui-doc--hide-frame #[0 "\305\306 !\203\f\307 !\210\310 \2052\n\204.\311p\312\313 Fr\314\315 !q\210\211\305\316 \210)\317)\210\320\310 !\207" [lsp-ui-doc--bounds lsp-ui-doc--inline-ov lsp-ui-doc-use-webkit lsp-ui-doc--parent-vars buffer-read-only nil overlayp delete-overlay lsp-ui-doc--get-frame :buffer :window get-buffer-window get-buffer-create lsp-ui-doc--make-buffer-name erase-buffer t make-frame-invisible] 4 (#$ . 10950)]) #@37 Calcul the max width of the buffer. (defalias 'lsp-ui-doc--buffer-width #[0 "\302p\303\304 Fr\305\306 !q\210\211\307\212\310eb\210m\204/\311 \312 Z\211V\203(\211\262\210\313y\210\202\211\262*\314)\207" [lsp-ui-doc--parent-vars buffer-read-only :buffer :window get-buffer-window get-buffer-create lsp-ui-doc--make-buffer-name nil 0 line-end-position line-beginning-position 1 t] 5 (#$ . 11425)]) #@72 Return the pos-y of the LINE on screen, in pixel. (fn &optional LINE) (defalias 'lsp-ui-doc--line-height #[256 "\300\301!\206\302\303!\205\301!8\206\304\207" [2 window-line-height redisplay t 0] 4 (#$ . 11836)]) (defalias 'lsp-ui-doc--sideline-pos-y #[0 "\301\302\303\300!\205\205\304!!!\207" [lsp-ui-sideline--occupied-lines lsp-ui-doc--line-height line-number-at-pos boundp -min] 4]) #@13 (fn SIZE) (defalias 'lsp-ui-doc--webkit-resize-callback #[257 "\300\301H!\300\302H!\303\304 #\266\305\306 !\207" [round 0 1 xwidget-resize lsp-ui-doc--webkit-get-xwidget lsp-ui-doc--move-frame lsp-ui-doc--get-frame] 7 (#$ . 12243)]) #@68 If the buffer's width is larger than the current frame, resize it. (defalias 'lsp-ui-doc--resize-buffer #[0 "\203 \305\306\307\"\207\310 \311Z^\312 ^V\2055\313p\314\315 Fr\316\317 !q\210\211\320\321ed\")\322)\262)\207" [lsp-ui-doc-use-webkit lsp-ui-doc-max-width fill-column lsp-ui-doc--parent-vars buffer-read-only lsp-ui-doc--webkit-execute-script "[document.querySelector('#lsp-ui-webkit').offsetWidth, document.querySelector('#lsp-ui-webkit').offsetHeight];" lsp-ui-doc--webkit-resize-callback frame-width 5 lsp-ui-doc--buffer-width :buffer :window get-buffer-window get-buffer-create lsp-ui-doc--make-buffer-name nil fill-region t] 5 (#$ . 12489)]) #@463 Move FRAME to be where the point is. WIDTH is the child frame width. HEIGHT is the child frame height. START-X is the position x of the current window. START-Y is the position y of the current window. The algorithm prefers to position FRAME just above the symbol at point, to not obstruct the view of the code that follows. If there's no space above in the current window, it places FRAME just below the symbol at point. (fn FRAME WIDTH HEIGHT START-X START-Y) (defalias 'lsp-ui-doc--mv-at-point #[1285 "\300\301!\302@!\3038\262\262\211A\262\242\\\\\304 \305  \\X\2033 \\\305 ZZ\2064 X\203B\nZ\206E\\\306\307!\203P\307 \202Q\310\\\311  \\ \\#\207" [bounds-of-thing-at-point symbol posn-at-point 2 frame-char-height frame-outer-width fboundp window-tab-line-height 0 set-frame-position] 18 (#$ . 13162)]) #@40 Place our FRAME on screen. (fn FRAME) (defalias 'lsp-ui-doc--move-frame #[257 "\304\305\211\211\306$\211A\262\242\211A\262\242\211A\262\242\305\307!\310\305\211\311\211\306&\211A\262\242\312 !\313_\\\314 _\315\245Z^ \316\267\202P\317 \202Q\202Q\305\306\320\306$\210 \321=\203n\322%\202\224\323\324\325\312 $\325] \326\267\202\222 \325\\\202\223\327\330!Z\325Z\202\223\305#)\207" [lsp-ui-doc-max-height lsp-ui-doc-alignment frame-resize-pixelwise lsp-ui-doc-position window-edges nil t frame-root-window window-text-pixel-size 10000 frame-char-width 1 frame-char-height 2 #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (frame 70 window 75)) frame-pixel-width set-frame-size at-point lsp-ui-doc--mv-at-point set-frame-position - 10 #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (top 129 bottom 136)) lsp-ui-doc--line-height mode-line] 21 (#$ . 14007)]) #@52 Visit FILENAME in the parent frame. (fn FILENAME) (defalias 'lsp-ui-doc--visit-file #[257 "\301!\211\205\302\303\304\"\"\207" [lsp-ui-doc--parent-vars find-file-noselect set-window-buffer plist-get :window] 6 (#$ . 14991)]) #@139 Add text properties on text to make it clickable. The text delimiters are BOUNDS. FN is the function to call on click. (fn START END FN) (defalias 'lsp-ui-doc--put-click #[771 "\300 \301\302#\210\303\304$\210\303\305\306\307\310\311\312\313\314\307!FF$\210\315\307#\207" [make-sparse-keymap define-key [down-mouse-1] put-text-property keymap mouse-face :inherit lsp-ui-doc-url :box :line-width -1 :color face-foreground add-face-text-property] 16 (#$ . 15228)]) #@60 Find paths and urls in the buffer and make them clickable. (defalias 'lsp-ui-doc--make-clickable-link #[0 "eb\210\212eb\210\302\303 \302\304#\205!\305\225Tb\210\306\305\224\305\225\307#\210\202 *\207" [case-fold-search goto-address-url-regexp nil re-search-forward t 0 lsp-ui-doc--put-click browse-url-at-mouse] 4 (#$ . 15706)]) #@49 Set the buffer with STRING. (fn STRING SYMBOL) (defalias 'lsp-ui-doc--render-buffer #[514 "\306p\307\310 Fr\311\312 !q\210\211\313\n\203$\314\315\316\317!#\320\"\210\202G\321 \210\322 \211?\2053\323\324\325\326#\327!?\205@\323\330\325\331#Qc\266\332 \210\333\303!\210\334\333\304!\210\335 \205Z\336P \313\211!\211\")\337)\207" [lsp-ui-doc--parent-vars buffer-read-only lsp-ui-doc-use-webkit face-remapping-alist window-min-height lsp-ui-doc-header :buffer :window get-buffer-window get-buffer-create lsp-ui-doc--make-buffer-name nil lsp-ui-doc--webkit-execute-script format "renderMarkdown('%s', '%s');" url-hexify-string lsp-ui-doc--webkit-resize-callback erase-buffer lsp-ui-doc--inline-p propertize "\n" face (:height 0.2) s-trim "\n\n" (:height 0.3) lsp-ui-doc--make-clickable-link make-local-variable ((header-line lsp-ui-doc-header)) 1 " " t header-line-format mode-line-format cursor-type] 11 (#$ . 16044)]) (defalias 'lsp-ui-doc--inline-height #[0 "\302p\303\304 Fr\305\306 !q\210\211\307\310\311 \312\"G)\313)\207" [lsp-ui-doc--parent-vars buffer-read-only :buffer :window get-buffer-window get-buffer-create lsp-ui-doc--make-buffer-name nil split-string buffer-string "\n" t] 4]) #@53 Remove invisible characters in STRING. (fn STRING) (defalias 'lsp-ui-doc--remove-invisibles #[257 "\300\301G\302\303%\211\2030\301O\304\302#\211\205\303O\262P\262\300\301G\302\303%\262\202\207" [text-property-not-all 0 invisible nil next-single-property-change] 8 (#$ . 17264)]) (defvar lsp-ui-doc--inline-width nil nil) (make-variable-buffer-local 'lsp-ui-doc--inline-width) (defalias 'lsp-ui-doc--inline-window-width #[0 "\301 \302 ^\303\300!\203\203\304\305 \\\202\306ZS\207" [display-line-numbers-mode window-text-width window-body-width boundp 2 line-number-display-width 0] 3]) #@14 (fn S1 S2) (defalias 'lsp-ui-doc--inline-zip #[514 "\301 \211Z\302Z\303\211\304\305$P\304\305$\207" [lsp-ui-doc--inline-width lsp-ui-doc--inline-window-width 2 truncate-string-to-width nil 32] 10 (#$ . 17882)]) #@19 (fn STRING LEN) (defalias 'lsp-ui-doc--inline-padding #[514 "\300\301\302!Z\303\"\300R\304\305G\306\307\310\311\312#D\312%\210\207" [" " make-string string-width 32 add-face-text-property 0 :background face-background lsp-ui-doc-background nil t] 11 (#$ . 18106)]) #@20 (fn DOC-STRINGS) (defalias 'lsp-ui-doc--inline-faking-frame #[257 "\301\302\303\304\"\"\211\305\306\307\"\"\207" [lsp-ui-doc--inline-width -max-by > -map string-width mapcar make-closure #[257 "\301\300\"\207" [V0 lsp-ui-doc--inline-padding] 4 "\n\n(fn IT)"]] 6 (#$ . 18385)]) #@15 (fn STRING) (defalias 'lsp-ui-doc--inline-untab #[257 "\301\302\303\304\"\305\306%\207" [tab-width replace-regexp-in-string " " make-string 32 nil t] 7 (#$ . 18675)]) #@16 (fn STRINGS) (defalias 'lsp-ui-doc--inline-merge #[257 "\302\303\304!!\305\"\302\303\304\306p\307\310 Fr\311\312 !q\210\211\313\314 )\315)\262!!\305\"\316!\317\320#\211\305\321\322#\266\202\211\305P\262\262\262\323\324G\325\315%\210\207" [lsp-ui-doc--parent-vars buffer-read-only split-string lsp-ui-doc--remove-invisibles lsp-ui-doc--inline-untab "\n" :buffer :window get-buffer-window get-buffer-create lsp-ui-doc--make-buffer-name nil buffer-string t lsp-ui-doc--inline-faking-frame -zip-with lsp-ui-doc--inline-zip mapconcat identity add-face-text-property 0 default] 11 (#$ . 18852)]) #@67 Calcul the position at START + forward n LINES. (fn START LINES) (defalias 'lsp-ui-doc--inline-pos-at #[514 "\212b\210\211y\210`)\207" [] 3 (#$ . 19465)]) #@110 Return a cons of positions where to place the doc. HEIGHT is the documentation number of lines. (fn HEIGHT) (defalias 'lsp-ui-doc--inline-pos #[257 "\300 \301\302 \"\301\"\301\303\"`W\203B\207\301[\"\301`\304\"Y\203-\301[\"B\207\301`\304\"\301`\304\\\"B\207" [window-start lsp-ui-doc--inline-pos-at window-body-height 1 2] 9 (#$ . 19629)]) #@32 Display the doc in the buffer. (defalias 'lsp-ui-doc--inline #[0 "\301 \302!\211A\262\242{\303!\203\202\304\"\211\305#\210\306\307\310!#\210\306\311\312#\210\306\313\314 #\207" [lsp-ui-doc--inline-ov lsp-ui-doc--inline-height lsp-ui-doc--inline-pos overlayp make-overlay move-overlay overlay-put display lsp-ui-doc--inline-merge lsp-ui-doc-inline t window selected-window] 11 (#$ . 19992)]) #@80 Return non-nil when the documentation should be display without a child frame. (defalias 'lsp-ui-doc--inline-p #[0 "?\206\301 ?\206\302\303!?\207" [lsp-ui-doc-use-childframe display-graphic-p fboundp display-buffer-in-child-frame] 2 (#$ . 20411)]) #@48 Display the documentation. (fn SYMBOL STRING) (defalias 'lsp-ui-doc--display #[514 "\203\f\301\302!\204\f\303\211\203\211\211\304\230\262\203\305 \207\306\"\210\307 \203)\310 \207\311 \2045\312\303\313\314 #\210\204A\315 \210\316\311 !\210\317\311 !?\205M\320\311 !\207" [lsp-ui-doc-use-webkit featurep xwidget-internal nil "" lsp-ui-doc--hide-frame lsp-ui-doc--render-buffer lsp-ui-doc--inline-p lsp-ui-doc--inline lsp-ui-doc--get-frame set-frame-parameter lsp-ui-doc-frame lsp-ui-doc--make-frame lsp-ui-doc--resize-buffer lsp-ui-doc--move-frame frame-visible-p make-frame-visible] 6 (#$ . 20670)]) #@39 Create the child frame and return it. (defalias 'lsp-ui-doc--make-frame #[0 "\305 \210\306\211\307 \310!\311\n\312\313\314 B\315\316 B\317\320 B\321\322\323\306\324#B\257\"\325\326BC\"\327!rq\210\330\331!\210)\332\306\333#\210\334\324\"\210\335\336!\"\210\337\340 #\210\337\341\306#\210\342\343#\210\f\203k\344\345 \346\347#\210\350 \210*\207" [after-make-frame-functions before-make-frame-hook lsp-ui-doc-frame-parameters lsp-ui-doc-border lsp-ui-doc-use-webkit lsp-ui-doc--delete-frame nil lsp-ui-doc--make-buffer-name get-buffer append (name . "") default-minibuffer-frame selected-frame minibuffer minibuffer-window left-fringe frame-char-width background-color face-background lsp-ui-doc-background t display-buffer-in-child-frame child-frame-parameters window-frame lsp-ui-doc-frame-mode 1 set-frame-parameter lsp-ui-doc-buffer set-window-dedicated-p redirect-frame-focus frame-parent set-face-background internal-border fringe run-hook-with-args lsp-ui-doc-frame-hook define-key current-global-map [xwidget-event] #[0 "A@\211\301=\205\3028\3038!\266\202\207" [last-input-event javascript-callback 3 4] 5 nil nil] lsp-ui-doc--webkit-run-xwidget] 14 (#$ . 21293)]) #@38 Request the documentation to the LS. (defalias 'lsp-ui-doc--make-request #[0 "\305=?\205`\306=?\205`\307\301!\205 ?\205`\310\311!\205`\312 \203*\313\314!\2064\315\316!\2054``TB\211\203\\\n\232?\205^\317 \210 \203J\320 !\210\321\f\322p\323\324#\262#\211\202^\317 \262\207" [this-command lsp-ui-peek-mode lsp-ui-doc--bounds lsp-ui-doc--timer lsp-ui-doc-delay lsp-ui-doc-hide keyboard-quit boundp lsp--capability "hoverProvider" symbol-at-point bounds-of-thing-at-point symbol looking-at "[[:graph:]]" lsp-ui-doc--hide-frame cancel-timer run-with-idle-timer nil make-closure #[0 "\301p\232\205\302\303\304 \305\306\300\301#\307\310\311\312&\207" [V0 V1 lsp-request-async "textDocument/hover" lsp--text-document-position-params make-closure #[257 "\301p\232\205 \302\300p#\207" [V0 V1 lsp-ui-doc--callback] 5 "\n\n(fn HOVER)"] :mode tick :cancel-token :lsp-ui-doc-hover] 8]] 9 (#$ . 22494)]) #@213 Process the received documentation. HOVER is the doc returned by the LS. BOUNDS are points of the symbol that have been requested. BUFFER is the buffer where the request has been made. (fn INPUT0 INPUT1 INPUT2) (defalias 'lsp-ui-doc--callback #[771 "\301!\205 \302\303\"\203C`@Y\203C`AX\203C\211p=\203C\304\305\306\307\"\211\2054\310!\262\211\205?\311\312\313#\262\"\207\314 \207" [lsp-ui-doc--bounds ht\? gethash "contents" lsp-ui-doc--display thing-at-point symbol t lsp-ui-doc--extract replace-regexp-in-string " " "" lsp-ui-doc--hide-frame] 14 (#$ . 23416)]) #@38 Delete the child frame if it exists. (defalias 'lsp-ui-doc--delete-frame #[0 "\300 \211\205\301!\210\302\303\304\303#\207" [lsp-ui-doc--get-frame delete-frame set-frame-parameter nil lsp-ui-doc-frame] 5 (#$ . 24008)]) #@42 Return whether the LSP UI doc is visible (defalias 'lsp-ui-doc--visible-p #[0 "\301!\206\302 \205\303\302 !\207" [lsp-ui-doc--inline-ov overlayp lsp-ui-doc--get-frame frame-visible-p] 2 (#$ . 24235)]) #@211 Delete the child frame if currently selected window changes. Does nothing if the newly-selected window is the same window as before, or if the new window is the minibuffer. (fn FUN WINDOW &optional NO-RECORD) (defalias 'lsp-ui-doc-hide-frame-on-window-change #[770 "\300 \"\2042\301 \2032\300 \302\303 !\304!\2040\232\2040\211\203-\305!\232\2040\306 \210\266\207" [selected-window lsp-ui-doc--visible-p get-buffer lsp-ui-doc--make-buffer-name window-minibuffer-p window-buffer lsp-ui-doc--hide-frame] 9 (#$ . 24448)]) (byte-code "\300\301\302\303#\210\300\304\305\306#\210\307\310\311\"\210\300\312\305\311#\207" [advice-add select-window :around lsp-ui-doc-hide-frame-on-window-change load-theme :before #[128 "\300 \207" [lsp-ui-doc--delete-frame] 2 "\n\n(fn &rest _)"] add-hook window-configuration-change-hook lsp-ui-doc--hide-frame keyboard-quit] 4) #@54 Function called when a FRAME is deleted. (fn FRAME) (defalias 'lsp-ui-doc--on-delete #[257 "\300\301\"\211\205\211\302!\262\262\211\205\211\303!\205\211\262\262\211\205*\211\304!\262\207" [frame-parameter lsp-ui-doc-buffer get-buffer buffer-live-p kill-buffer] 5 (#$ . 25326)]) #@99 Non-nil if Lsp-Ui-Doc mode is enabled. Use the command `lsp-ui-doc-mode' to change this variable. (defvar lsp-ui-doc-mode nil (#$ . 25627)) (make-variable-buffer-local 'lsp-ui-doc-mode) #@612 Minor mode for showing hover information in child frame. This is a minor mode. If called interactively, toggle the `Lsp-Ui-Doc 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-doc-mode'. The mode's hook is called both when the mode is enabled and when it is disabled. (fn &optional ARG) (defalias 'lsp-ui-doc-mode #[256 "\302 \303=\203 ?\202\247\203\304W\203\305\202\306\307\301!\2031\310\300 \"\2031\300 B\203K\311\312\313\"\210\314\315\316\305\306$\210\314\317\320\305\306$\210\202Z\321 \210\322\315\316\306#\210\322\317\320\306#\210\323\324\203d\325\202e\326\"\210\327\330!\203\207\302 \203y\211\302 \232\203\207\331\332\203\203\333\202\204\334\335#\210\210\336 \210\207" [lsp-ui-doc-mode local-minor-modes current-message toggle 1 nil t boundp delq eval-after-load frameset #[0 "\301\236?\205\302!\303B\211\207" [frameset-filter-alist lsp-ui-doc-frame copy-tree (lsp-ui-doc-frame . :never)] 2] add-hook post-command-hook lsp-ui-doc--make-request delete-frame-functions lsp-ui-doc--on-delete lsp-ui-doc-hide remove-hook run-hooks lsp-ui-doc-mode-hook lsp-ui-doc-mode-on-hook lsp-ui-doc-mode-off-hook called-interactively-p any message "Lsp-Ui-Doc mode %sabled%s" "en" "dis" " in current buffer" force-mode-line-update] 7 (#$ . 25820) (byte-code "\203\n\301!\202 \302C\207" [current-prefix-arg prefix-numeric-value toggle] 2)]) (defvar lsp-ui-doc-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-doc-mode-map lsp-ui-doc-mode-hook variable-documentation put "Hook run after entering or leaving `lsp-ui-doc-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-doc-mode boundp] 6) #@102 Enable/disable ‘lsp-ui-doc-mode’. It is supposed to be called from `lsp-ui--toggle' (fn ENABLE) (defalias 'lsp-ui-doc-enable #[257 "\300\203 \301\202\n\302!\207" [lsp-ui-doc-mode 1 -1] 3 (#$ . 28023)]) #@42 Trigger display hover information popup. (defalias 'lsp-ui-doc-show #[0 "\300\301\302\303 \"\304\305!\206``TBp#\207" [lsp-ui-doc--callback lsp-request "textDocument/hover" lsp--text-document-position-params bounds-of-thing-at-point symbol] 4 (#$ . 28239) nil]) #@31 Hide hover information popup. (defalias 'lsp-ui-doc-hide #[0 "\300 \207" [lsp-ui-doc--hide-frame] 1 (#$ . 28508) nil]) (defvar lsp-ui-doc--unfocus-frame-timer nil nil) (make-variable-buffer-local 'lsp-ui-doc--unfocus-frame-timer) #@63 Hook to hide hover information popup for `lsp-ui-doc-glance'. (defalias 'lsp-ui-doc--glance-hide-frame #[0 "\302!\204\303 \211\205\304!\262\205#\305 \210\306\307\310\"\210\311\312\313\314#\211\207" [lsp-ui-doc--inline-ov lsp-ui-doc--unfocus-frame-timer overlayp lsp-ui-doc--get-frame frame-visible-p lsp-ui-doc--hide-frame remove-hook post-command-hook lsp-ui-doc--glance-hide-frame run-at-time 1 nil lsp-ui-doc-unfocus-frame] 4 (#$ . 28744)]) #@69 Trigger display hover information popup and hide it on next typing. (defalias 'lsp-ui-doc-glance #[0 "\301 \210\203 \302!\210\303\304\305\"\207" [lsp-ui-doc--unfocus-frame-timer lsp-ui-doc--make-request cancel-timer add-hook post-command-hook lsp-ui-doc--glance-hide-frame] 3 (#$ . 29203) nil]) #@111 Non-nil if Lsp-Ui-Doc-Frame mode is enabled. Use the command `lsp-ui-doc-frame-mode' to change this variable. (defvar lsp-ui-doc-frame-mode nil (#$ . 29508)) (make-variable-buffer-local 'lsp-ui-doc-frame-mode) #@628 Marker mode to add additional key bind for lsp-ui-doc-frame. This is a minor mode. If called interactively, toggle the `Lsp-Ui-Doc-Frame 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-doc-frame-mode'. The mode's hook is called both when the mode is enabled and when it is disabled. (fn &optional ARG) (defalias 'lsp-ui-doc-frame-mode #[256 "\302 \303=\203 ?\202\247\203\304W\203\305\202\306\307\301!\2031\310\300 \"\2031\300 B\311\312\203;\313\202<\314\"\210\315\316!\203^\302 \203P\211\302 \232\203^\317\320\203Z\321\202[\322\323#\210\210\324 \210\207" [lsp-ui-doc-frame-mode local-minor-modes current-message toggle 1 nil t boundp delq run-hooks lsp-ui-doc-frame-mode-hook lsp-ui-doc-frame-mode-on-hook lsp-ui-doc-frame-mode-off-hook called-interactively-p any message "Lsp-Ui-Doc-Frame mode %sabled%s" "en" "dis" " in current buffer" force-mode-line-update] 6 (#$ . 29725) (byte-code "\203\n\301!\202 \302C\207" [current-prefix-arg prefix-numeric-value toggle] 2)]) (defvar lsp-ui-doc-frame-mode-hook nil) (byte-code "\300\301N\204\f\302\300\301\303#\210\302\300\304\305#\210\302\300\306\307C#\207" [lsp-ui-doc-frame-mode-hook variable-documentation put "Hook run after entering or leaving `lsp-ui-doc-frame-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] 4) #@37 Keymap for `lsp-ui-doc-frame-mode'. (defvar lsp-ui-doc-frame-mode-map (byte-code "\300\301!\203\207\211<\203\302!\207\303\304\"\207" [(([113] . lsp-ui-doc-unfocus-frame)) keymapp easy-mmode-define-keymap error "Invalid keymap %S"] 4) (#$ . 31477)) (byte-code "\301\302\303\304\211%\207" [lsp-ui-doc-frame-mode-map add-minor-mode lsp-ui-doc-frame-mode "" nil] 6) #@30 Focus into lsp-ui-doc-frame. (defalias 'lsp-ui-doc-focus-frame #[0 "\303 \211\205 \304!\262\205*\305p\306\307 Fr\310\311 !q\210\211\312\313)\313)\210\314\303 !\207" [lsp-ui-doc--parent-vars buffer-read-only cursor-type lsp-ui-doc--get-frame frame-visible-p :buffer :window get-buffer-window get-buffer-create lsp-ui-doc--make-buffer-name nil t select-frame-set-input-focus] 4 (#$ . 31853) nil]) #@32 Unfocus from lsp-ui-doc-frame. (defalias 'lsp-ui-doc-unfocus-frame #[0 "\300\301 !\211\205 \302!\207" [frame-parent lsp-ui-doc--get-frame select-frame-set-input-focus] 3 (#$ . 32262) nil]) (provide 'lsp-ui-doc)