;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\303\304\305\306\307\310\307\311\307\312\313\314\313\315& \210\316\317\320\321\322DD\323\324\325\307\312&\210\316\326\320\321\327DD\330\324\331\307\304&\210\316\332\320\321\333DD\334\324\335\307\336&\210\316\337\320\321\340DD\341\324\342\307\336&\210\316\343\320\321\344DD\345\324\346\307\336&\207" [require lsp-mode dash custom-declare-group lsp-ui-imenu nil "Display imenu entries." :group tools convenience lsp-ui :link (custom-manual "(lsp-ui-imenu) Top") (info-link "(lsp-ui-imenu) Customizing") custom-declare-variable lsp-ui-imenu-enable funcall function #[0 "\300\207" [t] 1] "Whether or not to enable ‘lsp-ui-imenu’." :type boolean lsp-ui-imenu-kind-position #[0 "\300\207" [top] 1] "Where to show the entries kind." (choice (const :tag "Top" top) (const :tag "Left" left)) lsp-ui-imenu-colors #[0 "\300\207" [("deep sky blue" "green3")] 1] "Color list to cycle through for entry groups." (repeat color) lsp-ui-menu lsp-ui-imenu-window-width #[0 "\300\207" [0] 1] "When not 0, don't fit window to buffer and use value as window-width." number lsp-ui-imenu--custom-mode-line-format #[0 "\300\207" [nil] 1] "Custom mode line format to be used in `lsp-ui-menu-mode'." sexp] 14) (defconst lsp-ui-imenu--max-bars 8) #@55 (fn S LEN BARS DEPTH COLOR-INDEX FOR-TITLE IS-LAST) (defalias 'lsp-ui-imenu--pad #[1799 "GZ\300\301\302\303\"\304 \305\306\307 !D#\310 \311\211W\203D\211\304\312%\305\306\307\\!D#B\262\210\211T\262\202\266\313!\262$\207" [apply concat make-string 32 propertize face :foreground lsp-ui-imenu--get-color nil 0 lsp-ui-imenu--get-bar reverse] 23 (#$ . 1354)]) #@43 (fn BARS INDEX DEPTH FOR-TITLE IS-LAST) (defalias 'lsp-ui-imenu--get-bar #[1285 "Y\203\301\207H\204\301\207\302U\203\204\303\207TW\203%\303\207\211\203+\304\207\2031\305\207\303\207" [lsp-ui-imenu--max-bars " " 1 " ┃ " " ┗ " " ┣ "] 7 (#$ . 1748)]) #@14 (fn INDEX) (defalias 'lsp-ui-imenu--get-color #[257 "\301G\"8\207" [lsp-ui-imenu-colors mod] 4 (#$ . 2032)]) #@65 (fn TITLE INDEX ENTRY PADDING BARS DEPTH COLOR-INDEX IS-LAST) (defalias 'lsp-ui-imenu--make-line #[2056 "\301U\203\302=\203\202\303\304\305&\306@\307\310#\311Q\211G\312\301\313 \314\315A\316\317\257\n$\210\207" [lsp-ui-imenu-kind-position 0 left " " lsp-ui-imenu--pad nil propertize face default "\n" add-text-properties index title marker padding depth] 24 (#$ . 2152)]) (defvar lsp-ui-imenu-ov nil nil) (make-variable-buffer-local 'lsp-ui-imenu-ov) (defalias 'lsp-ui-imenu--make-ov #[0 "\301!\203\n\206\302\303\211\"\211\207" [lsp-ui-imenu-ov overlayp make-overlay 1] 3]) (defalias 'lsp-ui-imenu--post-command #[0 "m\203\302y\210\303 \210\304=\205n\212\305 !\203\306 \307\310#\210\311 \210\312 b\210\313`\314\"\315U\204d\316 \313`\317\"\313`\320\"\321 \\\322 {\323\321 \322 #\210\306\307\324GZ\325\326\327\"P!\262PD#\266\204\202m\305 !\205m\330 !)\207" [lsp-ui-imenu-kind-position lsp-ui-imenu-ov -1 lsp-ui-imenu--move-to-name-beginning left overlayp overlay-put display nil redisplay window-start get-text-property index 0 lsp-ui-imenu--make-ov padding title line-beginning-position line-end-position move-overlay string propertize make-string 32 delete-overlay] 13]) (defalias 'lsp-ui-imenu--move-to-name-beginning #[0 "\300`\301\"\211\205\300`\302\"\211\205\211\303_\304 \\\\b\262\207" [get-char-property padding depth 3 line-beginning-position] 4]) (defvar lsp-ui-imenu--origin nil) (defalias 'lsp-ui-imenu--put-separator #[0 "\300``\"\301\302\303\304\305\306##\207" [make-overlay overlay-put after-string propertize "\n" face (:height 0.6)] 8]) #@26 (fn TITLE COLOR-INDEX) (defalias 'lsp-ui-imenu--put-toplevel-title #[514 "\301=\203'\302``\"\303!\304\305\306\307\310\311#\306\310\312D#\307\306\307\310\313#R#\207\314 \207" [lsp-ui-imenu-kind-position top make-overlay lsp-ui-imenu--get-color overlay-put after-string propertize "\n" face (:height 0.6) :foreground (:height 0.6) lsp-ui-imenu--put-separator] 14 (#$ . 3783)]) #@53 (fn TITLE PADDING BARS DEPTH COLOR-INDEX IS-LAST) (defalias 'lsp-ui-imenu--put-subtitle #[1542 "\300``\"\301\\!\302\303\304\305    \306\f&\307\f\310\311D#\307\312\310\313#Q#\207" [make-overlay lsp-ui-imenu--get-color overlay-put after-string lsp-ui-imenu--pad " " t propertize face :foreground "\n" (:height 1)] 19 (#$ . 4174)]) #@433 Insert ITEMS for TITLE. PADDING is the length of whitespaces to the left of the first bar. BARS is a bool vector of length `lsp-ui-imenu--max-bars'. The ith value indicates whether the ith bar from the left is visible. DEPTH is the depth of the items in the index tree, starting from 0. COLOR-INDEX is the index of the color of the leftmost bar. Return the updated COLOR-INDEX. (fn TITLE ITEMS PADDING BARS DEPTH COLOR-INDEX) (defalias 'lsp-ui-imenu--insert-items #[1542 "G\301\302\211\203\265\211A\262\242\262\262T\262\211TU\303!\203\236\211A\262\242\n\301U\203;\304 \"\210\202J\305 &\210\203]\n\301V\203]  S\302I\210\n\301V\203h\306\202i\307T&\210)\203\215\n\301V\203\215  S\310I\210\n\301U\203\231 T\262\n\266\202\311\f    &c\266\202\266\207" [lsp-ui-imenu-kind-position 0 nil imenu--subalist-p lsp-ui-imenu--put-toplevel-title lsp-ui-imenu--put-subtitle top lsp-ui-imenu--insert-items t lsp-ui-imenu--make-line] 22 (#$ . 4524)]) #@14 (fn ITEMS) (defalias 'lsp-ui-imenu--get-padding #[257 "\301=\203\302\207\303\304\"\305\306\"\307\206\310!\207" [lsp-ui-imenu-kind-position top 1 -filter imenu--subalist-p mapcar #[257 "\211@G\207" [] 2 "\n\n(fn IT)"] -max (1)] 5 (#$ . 5551)]) #@20 (fn BITS OFFSET) (defalias 'lsp-ui-imenu--put-bit #[514 "\300\301\302\"\"\207" [logior lsh 1] 7 (#$ . 5810)]) #@20 (fn BITS OFFSET) (defalias 'lsp-ui-imenu--clear-bit #[514 "\300\301\302\303\"!\"\207" [logand lognot lsh 1] 8 (#$ . 5930)]) #@32 Buffer name for imenu buffers. (defvar lsp-ui-imenu-buffer-name "*lsp-ui-imenu*" (#$ . 6064)) #@31 Open ui-imenu in side window. (defalias 'lsp-ui-imenu #[0 "p\306 \210\307 !\nrq\210\310!\311\312\"\313\314 \315\"\315\316 \210\317 \210\211\203[\211@\312@!\203@\320\321\313 &\262\202T\322 \210\320\321\323 &\210T\262A\266\202\202\"\210\324 \210 \203f &eb\210\325\326\327\330\315$\210)\266)\331\332\"\333\323\"\210\334!\210\335\323\"\210\336 \210\337\315\"\210'\313U\203\243\340(\341!\210\342\343\315#)\207'\344 Z\342\345 \315#\207" [lsp-ui-imenu--origin lsp-ui-imenu-buffer-name imenu--index-alist lsp-ui-imenu--max-bars inhibit-read-only lsp-ui-imenu--custom-mode-line-format imenu--make-index-alist get-buffer-create lsp-ui-imenu--get-padding -partition-by imenu--subalist-p 0 make-bool-vector t remove-overlays erase-buffer lsp-ui-imenu--insert-items "" lsp-ui-imenu--put-separator 1 lsp-ui-imenu-mode add-hook post-command-hook lsp-ui-imenu--post-command nil display-buffer-in-side-window ((side . right)) set-window-margins select-window set-window-start lsp-ui-imenu--move-to-name-beginning set-window-dedicated-p only fit-window-to-buffer window-resize 3 window-width selected-window mode-line-format lsp-ui-imenu-window-width fit-window-to-buffer-horizontally] 15 (#$ . 6164) nil]) (defalias 'lsp-ui-imenu--kill #[0 "\300 \207" [kill-buffer-and-window] 1 nil nil]) #@18 (fn DIRECTION) (defalias 'lsp-ui-imenu--jump #[257 "\300`\301\"y\210\211\205\"\302 \303U?\205\"\211\300`\301\"\232\205\"y\210\202\207" [get-text-property title line-number-at-pos 1] 6 (#$ . 7486)]) (defalias 'lsp-ui-imenu--next-kind #[0 "\300\301!\207" [lsp-ui-imenu--jump 1] 2 nil nil]) (defalias 'lsp-ui-imenu--prev-kind #[0 "\300\301!\210\302`\303\"\304U?\205\301y\210\202\207" [lsp-ui-imenu--jump -1 get-text-property index 0] 3 nil nil]) (defalias 'lsp-ui-imenu--visit #[0 "\301`\302\"\303\304!!\210\211b\210\305`\306\"\207" [lsp-ui-imenu--origin get-text-property marker select-window get-buffer-window pulse-momentary-highlight-one-line next-error] 4 nil nil]) (defalias 'lsp-ui-imenu--view #[0 "\301`\302\"\303\304!!r\305\306\"\216\307@\310\"\210b\210\311 \210\312`\313\"*\207" [lsp-ui-imenu--origin get-text-property marker internal--before-with-selected-window get-buffer-window make-closure #[0 "\301\300!\207" [V0 internal--after-with-selected-window] 2] select-window norecord recenter pulse-momentary-highlight-one-line next-error] 5 nil nil]) #@36 Keymap for ‘lsp-ui-peek-mode’. (defvar lsp-ui-imenu-mode-map nil (#$ . 8568)) (byte-code "\2041\301 \302\303\304#\210\302\305\306#\210\302\307\310#\210\302\311\312#\210\302\313\314#\210\302\315\312#\210\302\316\314#\210\301\207" [lsp-ui-imenu-mode-map make-sparse-keymap define-key "q" lsp-ui-imenu--kill [right] lsp-ui-imenu--next-kind [left] lsp-ui-imenu--prev-kind [return] lsp-ui-imenu--view [M-return] lsp-ui-imenu--visit " " [134217741]] 5) (defvar lsp-ui-imenu-mode-hook nil) (byte-code "\300\301N\204\f\302\300\301\303#\210\304\305!\204\302\305\306\307#\210\300\207" [lsp-ui-imenu-mode-hook variable-documentation put "Hook run after entering lsp-ui-imenu mode.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" boundp lsp-ui-imenu-mode-map definition-name lsp-ui-imenu-mode] 4) (defvar lsp-ui-imenu-mode-map (make-sparse-keymap)) (byte-code "\301\302N\204\303\301\302\304\305!#\210\306\307!\204\303\307\310\311#\210\312\313 !\210\307\302N\204-\303\307\302\304\314!#\210\306\300!\204B\303\300\310\311#\210\315\316\300\317\"\210!\210\300\302N\204P\303\300\302\304\320!#\210\303\311\321\322#\207" [lsp-ui-imenu-mode-abbrev-table lsp-ui-imenu-mode-map variable-documentation put purecopy "Keymap for `lsp-ui-imenu-mode'." boundp lsp-ui-imenu-mode-syntax-table definition-name lsp-ui-imenu-mode (lambda (#1=#:def-tmp-var) (defvar lsp-ui-imenu-mode-syntax-table #1#)) make-syntax-table "Syntax table for `lsp-ui-imenu-mode'." (lambda (#1#) (defvar lsp-ui-imenu-mode-abbrev-table #1#)) define-abbrev-table nil "Abbrev table for `lsp-ui-imenu-mode'." derived-mode-parent special-mode] 5) #@234 Mode showing imenu entries. In addition to any hooks its parent mode `special-mode' might have run, this mode runs the hook `lsp-ui-imenu-mode-hook', as the final or penultimate step during initialization. \{lsp-ui-imenu-mode-map} (defalias 'lsp-ui-imenu-mode #[0 "\306\300!\210\307\310 \210\311\312\310\313N\203\314\311\313\310\313N#\210\315 !\204'\316 \317 \"\210\320\f!\211\2035\211\321 =\203;\322\f\323 \"\210\210\324 \325\"\204R =\204R\326 \325C#\210\327 !\210\330\f!\210 )\331\332!\207" [delay-mode-hooks major-mode mode-name lsp-ui-imenu-mode-map lsp-ui-imenu-mode-syntax-table lsp-ui-imenu-mode-abbrev-table make-local-variable t special-mode lsp-ui-imenu-mode "lsp-ui-imenu" mode-class put keymap-parent set-keymap-parent current-local-map char-table-parent standard-syntax-table set-char-table-parent syntax-table abbrev-table-get :parents abbrev-table-put use-local-map set-syntax-table run-mode-hooks lsp-ui-imenu-mode-hook local-abbrev-table] 5 (#$ . 10267) nil]) #@15 (fn ENABLE) (defalias 'lsp-ui-imenu-enable #[257 "\300\207" [nil] 2 (#$ . 11268)]) (provide 'lsp-ui-imenu)