;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\302\303\304\305\306DD\307\310\311\312\301&\210\302\313\304\305\314DD\315\310\316\312\301&\210\317\320\321\322\312\323%\210\317\324\325\326\312\323%\210\317\327\330\331\312\323%\210\317\332\333\331\312\323%\210\317\334\335\336\312\323%\210\317\337\340\341\312\323%\207" [require lsp-mode custom-declare-variable lsp-headerline-breadcrumb-segments funcall function #[0 "\300\207" [(path-up-to-project file symbols)] 1] "Face used on breadcrumb text on modeline." :type (repeat (choice (const :tag "Include the project name." project) (const :tag "Include the open file name." file) (const :tag "Include the directories up to project." path-up-to-project) (const :tag "Include document symbols if server supports it." symbols))) :group lsp-headerline-breadcrumb-enable-symbol-numbers #[0 "\300\207" [nil] 1] "Whether to label symbols with numbers on the breadcrumb." boolean custom-declare-face lsp-headerline-breadcrumb-separator-face ((t :inherit shadow :height 0.8)) "Face used for breadcrumb separator on headerline." lsp-faces lsp-headerline-breadcrumb-prefix-face ((t :inherit font-lock-string-face)) "Face used for breadcrumb prefix on headerline." lsp-headerline-breadcrumb-project-prefix-face ((t :inherit font-lock-string-face :weight bold)) "Face used for breadcrumb prefix on headerline.\nOnly if `lsp-headerline-breadcrumb-prefix` is `project-name-only`." lsp-headerline-breadcrumb-unknown-project-prefix-face ((t :inherit shadow :weight bold)) lsp-headerline-breadcrumb-symbols-face ((t :inherit font-lock-doc-face :weight bold)) "Face used for breadcrumb symbols text on headerline." lsp-headerline-breadcrumb-deprecated-face ((t :inherit font-lock-doc-face :strike-through t)) "Face used on breadcrumb deprecated text on modeline."] 8) #@52 Holds the current breadcrumb string on headerline. (defvar lsp-headerline--string nil (#$ . 1864)) (make-variable-buffer-local 'lsp-headerline--string) #@80 Holds the current breadcrumb path-up-to-project segments for caching purposes. (defvar lsp-headerline--path-up-to-project-string nil (#$ . 2022)) (make-variable-buffer-local 'lsp-headerline--path-up-to-project-string) #@79 Fix IMAGE background if it is a file otherwise return as an icon. (fn IMAGE) (defalias 'lsp-headerline--fix-image-background #[257 "\211\203#\300\301\302#\203#\303\304\302\305\306\307\300\301\302 #A!\310\311\312\310\"#B#\207\313\314\315#\207" [get-text-property 0 display propertize " " image plist-put cl-copy-list :background face-attribute header-line replace-regexp-in-string " \\| " ""] 11 (#$ . 2246)]) #@85 Return the filename from FILE-PATH with the extension related icon. (fn FILE-PATH) (defalias 'lsp-headerline--filename-with-icon #[257 "\300!\301!\211\203'\211\205\302\303\304\305#\205\306!\211\203%\307\310\311!#\207\207\207" [f-filename f-ext require lsp-treemacs nil t lsp-treemacs-get-icon format "%s %s" lsp-headerline--fix-image-background] 8 (#$ . 2667)]) #@49 Build the arrow icon for headerline breadcrumb. (defalias 'lsp-headerline--arrow-icon #[0 "\300\301\302\303#\203\304\305\306\307#\207\310\311\312\307#\207" [require all-the-icons nil t all-the-icons-material "chevron_right" :face lsp-headerline-breadcrumb-separator-face propertize "›" face] 4 (#$ . 3049)]) #@63 Build the SYMBOL icon for headerline breadcrumb. (fn INPUT0) (defalias 'lsp-headerline--symbol-icon #[257 "\300\301\"\302\303\304\305#\205\306\307!!\310P\207" [gethash "kind" require lsp-treemacs nil t lsp-headerline--fix-image-background lsp-treemacs-symbol-icon " "] 6 (#$ . 3367)]) #@194 Go to breadcrumb symbol. If the buffer is narrowed and the target symbol lies before the minimum reachable point in the narrowed buffer, then widen and narrow to the outer symbol. (fn INPUT0) (defalias 'lsp-headerline--go-to-symbol #[257 "\300\301\302\303\"\304\"!\302\305\"\300\301\304\"!\300\301\306\"!deZ\307 U\204*e^d]}\210b\207" [lsp--position-to-point lsp-get gethash "selectionRange" :start "range" :end buffer-size] 8 (#$ . 3664)]) #@49 Narrow to breadcrumb symbol range. (fn INPUT0) (defalias 'lsp-headerline--narrow-to-symbol #[257 "\300\301\"\302\303\304\"!\302\303\305\"!}\207" [gethash "range" lsp--position-to-point lsp-get :start :end] 7 (#$ . 4119)]) #@128 Assign LOCAL-MAP and HELP-ECHO-STRING to the region around the DISPLAY-STRING. (fn LOCAL-MAP HELP-ECHO-STRING DISPLAY-STRING) (defalias 'lsp-headerline--with-action #[771 "\300\301\302\303\304 &\207" [propertize mouse-face header-line-highlight help-echo local-map] 11 (#$ . 4354)]) #@99 Build action for FULL-PATH and DIRECTORY-DISPLAY-STRING. (fn FULL-PATH DIRECTORY-DISPLAY-STRING) (defalias 'lsp-headerline--directory-with-action #[514 "\300\301 \302\303\304\305\"#\210\302\306\304\307\"#\210\211\262\310\311\211##\207" [lsp-headerline--with-action make-sparse-keymap define-key [header-line mouse-1] make-closure #[0 "\301\300!\207" [V0 dired] 2 nil nil] [header-line mouse-2] #[0 "\301\300!\207" [V0 dired-other-window] 2 nil nil] format "mouse-1: browse '%s' with Dired\nmouse-2: browse '%s' with Dired in other window"] 10 (#$ . 4649)]) #@64 Build action for SYMBOL and SYMBOL-STRING. (fn INPUT0 INPUT1) (defalias 'lsp-headerline--symbol-with-action #[514 "\300\301\"\302\303 \304\305\306\307 \"#\210\304\310\306\311 \"#\210\211\262\312\313\211##\207" [gethash "name" lsp-headerline--with-action make-sparse-keymap define-key [header-line mouse-1] make-closure #[0 "\301\300!\207" [V0 lsp-headerline--go-to-symbol] 2 nil nil] [header-line mouse-2] #[0 "\301\300!\207" [V0 lsp-headerline--narrow-to-symbol] 2 nil nil] format "mouse-1: go to '%s' symbol\nmouse-2: narrow to '%s' range"] 13 (#$ . 5222)]) #@122 Find recursively the folders until the project ROOT-PATH. PATH is the current folder to be checked. (fn ROOT-PATH PATH) (defalias 'lsp-headerline--path-up-to-project-root #[514 "\211\300\301\"\204\302\303!\"B\262\304!\262\202\207" [nil lsp-f-same\? lsp-headerline--directory-with-action f-filename lsp-f-parent] 8 (#$ . 5800)]) #@54 Build the project-segment string for the breadcrumb. (defalias 'lsp-headerline--build-project-string #[0 "\300 \211\203\301\302\303!\"\304\305#\207\301\306\304\307#\207" [lsp-workspace-root propertize lsp-headerline--directory-with-action f-filename font-lock-face lsp-headerline-breadcrumb-project-prefix-face "" lsp-headerline-breadcrumb-unknown-project-prefix-face] 6 (#$ . 6147)]) #@51 Build the file-segment string for the breadcrumb. (defalias 'lsp-headerline--build-file-string #[0 "\300\301\302 !\303\304#\207" [propertize lsp-headerline--filename-with-icon buffer-file-name font-lock-face lsp-headerline-breadcrumb-prefix-face] 4 (#$ . 6551)]) #@58 Build the path-up-to-project segment for the breadcrumb. (defalias 'lsp-headerline--build-path-up-to-project-string #[0 "\300 \211\203\301\302\303\304\305 !\"\306\307\310 \"#\207\311\207" [lsp-workspace-root mapconcat #[257 "\300\301\302#\207" [propertize font-lock-face lsp-headerline-breadcrumb-prefix-face] 5 "\n\n(fn NEXT-DIR)"] lsp-headerline--path-up-to-project-root lsp-f-parent buffer-file-name format " %s " lsp-headerline--arrow-icon ""] 7 (#$ . 6820)]) #@46 Build the symbol segment for the breadcrumb. (defalias 'lsp-headerline--build-symbol-string #[0 "\301\302!\203:\303\304 \211\2035\305!\211\203/\306\307\"\211\203)\310\311\312\313\314 \"#\202*\315\262\2020\315\262\2026\315\262)\207\315\207" [lsp--document-symbols-request-async lsp-feature\? "textDocument/documentSymbol" t lsp--get-document-symbols lsp--symbols->symbols-hierarchy -map-indexed #[514 "\211TB\207" [] 4 "\n\n(fn INDEX ELT)"] mapconcat #[257 "\211\211A\262\242\301\302\"\301\303\"\304\305\203\306\202\307#\310!\2030\304\311!\312\307#\313P\2021\314\203;P\202<P\315\"\207" [lsp-headerline-breadcrumb-enable-symbol-numbers gethash "deprecated" "name" propertize font-lock-face lsp-headerline-breadcrumb-deprecated-face lsp-headerline-breadcrumb-symbols-face lsp-headerline--symbol-icon number-to-string face " " #1="" lsp-headerline--symbol-with-action] 12 "\n\n(fn INPUT0)"] format " %s " lsp-headerline--arrow-icon #1#] 9 (#$ . 7294)]) #@31 Build the header-line string. (defalias 'lsp-headerline--build-string #[0 "\301\302\303\304#!\207" [lsp-headerline-breadcrumb-segments string-trim-right mapconcat #[257 "\211\301\267\202\302 \202&\303 \202&\206&\304 \202&\305 \202&\306\307\310!\"\210\311\211\311=\203.\311\207\312\313\314 #\207" [lsp-headerline--path-up-to-project-string #s(hash-table size 4 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (project 6 file 11 path-up-to-project 16 symbols 25)) lsp-headerline--build-project-string lsp-headerline--build-file-string lsp-headerline--build-path-up-to-project-string lsp-headerline--build-symbol-string lsp-log "'%s' is not a valid entry for `lsp-headerline-breadcrumb-segments'" symbol-name #1="" format "%s %s " lsp-headerline--arrow-icon] 6 "\n\n(fn SEGMENT)"] #1#] 5 (#$ . 8289)]) #@69 Request for document symbols to build the breadcrumb. (fn &rest _) (defalias 'lsp-headerline--check-breadcrumb #[128 "\301 \302 \207" [lsp-headerline--string lsp-headerline--build-string force-mode-line-update] 2 (#$ . 9122)]) #@61 Cache the path-up-to-project breadcrumb segment if enabled. (defalias 'lsp-headerline--breadcrumb-cache-path-up-to-project #[0 "\205\303 >\205\304 \211\207" [lsp-headerline-breadcrumb-enable lsp-headerline-breadcrumb-segments lsp-headerline--path-up-to-project-string path-up-to-project lsp-headerline--build-path-up-to-project-string] 2 (#$ . 9357)]) #@36 Enable headerline breadcrumb mode. (defalias 'lsp-headerline--enable-breadcrumb #[0 "\205 \301\302!\205 \303\304!\207" [lsp-headerline-breadcrumb-enable lsp-feature\? "textDocument/documentSymbol" lsp-headerline-breadcrumb-mode 1] 2 (#$ . 9721)]) #@37 Disable headerline breadcrumb mode. (defalias 'lsp-headerline--disable-breadcrumb #[0 "\300\301!\207" [lsp-headerline-breadcrumb-mode -1] 2 (#$ . 9977)]) #@129 Non-nil if Lsp-Headerline-Breadcrumb mode is enabled. Use the command `lsp-headerline-breadcrumb-mode' to change this variable. (defvar lsp-headerline-breadcrumb-mode nil (#$ . 10138)) (make-variable-buffer-local 'lsp-headerline-breadcrumb-mode) #@618 Toggle breadcrumb on headerline. This is a minor mode. If called interactively, toggle the `Lsp-Headerline-Breadcrumb 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-headerline-breadcrumb-mode'. The mode's hook is called both when the mode is enabled and when it is disabled. (fn &optional ARG) (defalias 'lsp-headerline-breadcrumb-mode #[256 "\304 \305=\203 ?\202\247\203\306W\203\307\202\310\311\301!\2031\312\300 \"\2031\300 B\203U\313 \210\314\303\315\"\210\316\317\320\307\310$\210\316\321\322\307\310$\210\316\323\324\307\310$\210\202n\325\317\320\310#\210\325\321\322\310#\210\325\323\324\310#\210\307\326\327 \"\330\331\203x\332\202y\333\"\210\334\335!\203\233\304 \203\215\211\304 \232\203\233\336\337\203\227\340\202\230\341\342#\210\210\343 \210\207" [lsp-headerline-breadcrumb-mode local-minor-modes lsp-headerline--path-up-to-project-string header-line-format current-message toggle 1 nil t boundp delq lsp-headerline--breadcrumb-cache-path-up-to-project add-to-list (t (:eval lsp-headerline--string)) add-hook lsp-on-idle-hook lsp-headerline--check-breadcrumb lsp-configure-hook lsp-headerline--enable-breadcrumb lsp-unconfigure-hook lsp-headerline--disable-breadcrumb remove-hook remove (t (:eval lsp-headerline--string)) run-hooks lsp-headerline-breadcrumb-mode-hook lsp-headerline-breadcrumb-mode-on-hook lsp-headerline-breadcrumb-mode-off-hook called-interactively-p any message "Lsp-Headerline-Breadcrumb mode %sabled%s" "en" "dis" " in current buffer" force-mode-line-update] 7 (#$ . 10391) (byte-code "\203\n\301!\202 \302C\207" [current-prefix-arg prefix-numeric-value toggle] 2)]) (defvar lsp-headerline-breadcrumb-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-headerline-breadcrumb-mode-map lsp-headerline-breadcrumb-mode-hook variable-documentation put "Hook run after entering or leaving `lsp-headerline-breadcrumb-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-headerline-breadcrumb-mode boundp] 6) #@74 Go to the symbol on breadcrumb at SYMBOL-POSITION. (fn SYMBOL-POSITION) (defalias 'lsp-breadcrumb-go-to-symbol #[257 "\211\247\2038\301\302!\2034\303\304 \211\203,\305!\211\203#\306S8!\202'\307\310\"\262\2020\307\310\"\262)\207\307\311!\207\307\312!\207" [lsp--document-symbols-request-async lsp-feature\? "textDocument/documentSymbol" t lsp--get-document-symbols lsp--symbols->symbols-hierarchy lsp-headerline--go-to-symbol lsp--info "Symbol not found for position %s" "Server does not support breadcrumb." "Call this function with a number representing the symbol position on breadcrumb"] 6 (#$ . 12935) "P"]) #@84 Narrow to the symbol range on breadcrumb at SYMBOL-POSITION. (fn SYMBOL-POSITION) (defalias 'lsp-breadcrumb-narrow-to-symbol #[257 "\211\247\2038\301\302!\2034\303\304 \211\203,\305!\211\203#\306S8!\202'\307\310\"\262\2020\307\310\"\262)\207\307\311!\207\307\312!\207" [lsp--document-symbols-request-async lsp-feature\? "textDocument/documentSymbol" t lsp--get-document-symbols lsp--symbols->symbols-hierarchy lsp-headerline--narrow-to-symbol lsp--info "Symbol not found for position %s" "Server does not support breadcrumb." "Call this function with a number representing the symbol position on breadcrumb"] 6 (#$ . 13568) "P"]) (provide 'lsp-headerline)