;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\300\303!\210\304\305\306\307\310\311\310\312\310\313\314\315\314\316& \210\317\320\321\322\323DD\324\325\326\310\313&\210\317\327\321\322\330DD\331\325\332\310\305&\210\317\333\321\322\334DD\335\325\336\310\305&\210\317\337\321\322\340DD\341\325\342\310\305&\210\317\343\321\322\344DD\345\325\346\310\305&\210\317\347\321\322\350DD\351\325\352\310\305&\210\317\353\321\322\354DD\355\325\356\310\357&\207" [require lsp-mode dash lsp-ui-util 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-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-auto-refresh #[0 "\300\207" [nil] 1] "Automatically refresh imenu when certain conditions meet." (choice (const :tag "Enable" t) (const :tag "Active only when after save" after-save) (const :tag "Disable" nil)) lsp-ui-imenu-auto-refresh-delay #[0 "\300\207" [1.0] 1] "Delay time to refresh imenu." float 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 lsp-ui-menu] 14) (defconst lsp-ui-imenu--max-bars 8) #@31 Auto refresh timer for imenu. (defvar lsp-ui-imenu--refresh-timer nil (#$ . 1792)) (make-variable-buffer-local 'lsp-ui-imenu--refresh-timer) #@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 (#$ . 1939)]) #@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 (#$ . 2333)]) #@14 (fn INDEX) (defalias 'lsp-ui-imenu--get-color #[257 "\301G\"8\207" [lsp-ui-imenu-colors mod] 4 (#$ . 2617)]) #@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 (#$ . 2737)]) #@40 Variable that holds overlay for imenu. (defvar lsp-ui-imenu-ov nil (#$ . 3154)) (make-variable-buffer-local 'lsp-ui-imenu-ov) #@21 Make imenu overlay. (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 (#$ . 3286)]) #@30 Post command hook for imenu. (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\2039\305 !\205m\316 !\202m\317 \313`\320\"\313`\321\"\322 \\\323 {\324\322 \323 #\210\306\307\325GZ\326\327\330\"P!\262PD#\266\204)\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 delete-overlay lsp-ui-imenu--make-ov padding title line-beginning-position line-end-position move-overlay string propertize make-string 32] 13 (#$ . 3453)]) (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 (#$ . 4506)]) #@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 (#$ . 4897)]) #@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 (#$ . 5247)]) #@123 Get imenu padding determined by `lsp-ui-imenu-kind-position'. ITEMS are used when the kind position is 'left. (fn ITEMS) (defalias 'lsp-ui-imenu--get-padding #[257 "\301\267\202\302\207\303\304\"\305\306\"\307\206\310!\207\311\312\"\207" [lsp-ui-imenu-kind-position #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (top 6 left 8)) 1 -filter imenu--subalist-p mapcar #[257 "\211@G\207" [] 2 "\n\n(fn IT)"] -max (1) user-error "Invalid value for imenu's kind position: %s"] 5 (#$ . 6275)]) #@20 (fn BITS OFFSET) (defalias 'lsp-ui-imenu--put-bit #[514 "\300\301\302\"\"\207" [logior lsh 1] 7 (#$ . 6815)]) #@20 (fn BITS OFFSET) (defalias 'lsp-ui-imenu--clear-bit #[514 "\300\301\302\303\"!\"\207" [logand lognot lsh 1] 8 (#$ . 6935)]) #@32 Buffer name for imenu buffers. (defvar lsp-ui-imenu-buffer-name "*lsp-ui-imenu*" (#$ . 7069)) #@28 Refresh imenu content menu (defalias 'lsp-ui-imenu--refresh-content #[0 "\306p\307 \210\310\n! rq\210\311!\312\313\"\314\315\f\306\"\306\316 \210\317 \210\211\203]\211@\313@!\203B\320\321\314 &\262\202V\322 \210\320\321\323 &\210T\262A\266\202\202$\210\324 \210\203jeb\210\325\326\327\330\306$)\266\204)\266\202)\207" [imenu-auto-rescan lsp-ui-imenu--origin lsp-ui-imenu-buffer-name imenu--index-alist lsp-ui-imenu--max-bars inhibit-read-only t imenu--make-index-alist get-buffer-create lsp-ui-imenu--get-padding -partition-by imenu--subalist-p 0 make-bool-vector 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 lsp-ui-imenu--custom-mode-line-format mode-line-format] 15 (#$ . 7169)]) #@31 Open ui-imenu in side window. (defalias 'lsp-ui-imenu #[0 "\304\305!\210p\306 \210\307 !\310 \210\311\312\"\313\305\"\210\314!\210\315\305\"\210\316 \210\317\320\"\210\n\321U\203<\322\323!\210\324\325\320#)\207\n\326 Z\324\327 \320#\207" [lsp-ui-imenu--origin lsp-ui-imenu-buffer-name lsp-ui-imenu-window-width fit-window-to-buffer-horizontally lsp-ui-imenu-buffer-mode 1 imenu--make-index-alist get-buffer-create lsp-ui-imenu--refresh-content 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 t 0 only fit-window-to-buffer window-resize 3 window-width selected-window] 7 (#$ . 8014) nil]) #@20 Kill imenu window. (defalias 'lsp-ui-imenu--kill #[0 "\300\301!\210\302 \207" [lsp-ui-imenu-buffer-mode -1 kill-buffer-and-window] 2 (#$ . 8728) 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 (#$ . 8885)]) #@29 Jump to next kind of imenu. (defalias 'lsp-ui-imenu--next-kind #[0 "\300\301!\207" [lsp-ui-imenu--jump 1] 2 (#$ . 9098) nil]) #@33 Jump to previous kind of imenu. (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 (#$ . 9230) 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 (byte-code "\300 \301\302\303#\210\301\304\305#\210\301\306\307#\210\301\310\311#\210\301\312\313#\210\301\314\315#\210\301\316\313#\210\301\317\315#\210\207" [make-sparse-keymap define-key "q" lsp-ui-imenu--kill "r" lsp-ui-imenu--refresh [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) (#$ . 10055)) (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 (#$ . 11761) nil]) #@29 Safe refresh imenu content. (defalias 'lsp-ui-imenu--refresh #[0 "\302!\211\205%\303 r\304\305\"\216p\232\203\306\307 !!\210\202 p\310 *\262\207" [lsp-ui-imenu-buffer-name lsp-ui-imenu--origin get-buffer internal--before-save-selected-window make-closure #[0 "\301\300!\207" [V0 internal--after-save-selected-window] 2] select-window get-buffer-window lsp-ui-imenu--refresh-content] 5 (#$ . 12762) nil]) #@46 Starts the auto refresh timer. (fn &rest _) (defalias 'lsp-ui-imenu--start-refresh #[128 "\302!\210\303 \304\305#\211\207" [lsp-ui-imenu--refresh-timer lsp-ui-imenu-auto-refresh-delay lsp-ui-util-safe-kill-timer run-with-idle-timer nil lsp-ui-imenu--refresh] 5 (#$ . 13181)]) #@31 Enable `lsp-ui-imenu-buffer'. (defalias 'lsp-ui-imenu-buffer--enable #[0 "\205\301=\203\302\303\304\305\306$\207\302\307\304\305\306$\210\302\303\304\305\306$\207" [lsp-ui-imenu-auto-refresh after-save add-hook after-save-hook lsp-ui-imenu--start-refresh nil t after-change-functions] 5 (#$ . 13466)]) #@32 Disable `lsp-ui-imenu-buffer'. (defalias 'lsp-ui-imenu-buffer--disable #[0 "\205\301=\203\302\303\304\305#\207\302\306\304\305#\210\302\303\304\305#\207" [lsp-ui-imenu-auto-refresh after-save remove-hook after-save-hook lsp-ui-imenu--start-refresh t after-change-functions] 4 (#$ . 13780)]) #@117 Non-nil if Lsp-Ui-Imenu-Buffer mode is enabled. Use the command `lsp-ui-imenu-buffer-mode' to change this variable. (defvar lsp-ui-imenu-buffer-mode nil (#$ . 14084)) (make-variable-buffer-local 'lsp-ui-imenu-buffer-mode) #@612 Minor mode 'lsp-ui-imenu-buffer-mode'. This is a minor mode. If called interactively, toggle the `Lsp-Ui-Imenu-Buffer 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-imenu-buffer-mode'. The mode's hook is called both when the mode is enabled and when it is disabled. (fn &optional ARG) (defalias 'lsp-ui-imenu-buffer-mode #[256 "\302 \303=\203 ?\202\247\203\304W\203\305\202\306\307\301!\2031\310\300 \"\2031\300 B\203;\311 \210\202>\312 \210\313\314\203H\315\202I\316\"\210\317\320!\203k\302 \203]\211\302 \232\203k\321\322\203g\323\202h\324\325#\210\210\326 \210\207" [lsp-ui-imenu-buffer-mode local-minor-modes current-message toggle 1 nil t boundp delq lsp-ui-imenu-buffer--enable lsp-ui-imenu-buffer--disable run-hooks lsp-ui-imenu-buffer-mode-hook lsp-ui-imenu-buffer-mode-on-hook lsp-ui-imenu-buffer-mode-off-hook called-interactively-p any message "Lsp-Ui-Imenu-Buffer mode %sabled%s" "en" "dis" " in current buffer" force-mode-line-update] 6 (#$ . 14313) (byte-code "\203\n\301!\202 \302C\207" [current-prefix-arg prefix-numeric-value toggle] 2)]) (defvar lsp-ui-imenu-buffer-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%\210\314\315!\207" [lsp-ui-imenu-buffer-mode-map lsp-ui-imenu-buffer-mode-hook variable-documentation put "Hook run after entering or leaving `lsp-ui-imenu-buffer-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-imenu-buffer-mode boundp provide lsp-ui-imenu] 6)