;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\311\302\312\313& \210\314\315\316\317\320DD\321\322\323\311\304&\210\314\324\316\317\325DD\326\322\327\311\304&\210\314\330\316\317\331DD\332\322\327\311\304\333\334& \210\335\336\337\340\311\304%\210\335\341\342\343\311\304%\210\335\344\345\346\311\304%\210\335\347\350\351\311\304%\210\335\352\353\354\311\304%\210\335\355\356\357\311\304%\210\335\360\361\362\311\304%\210\335\363\364\362\311\304%\210\335\365\366\367\311\304%\210\335\370\371\372\311\304%\210\335\373\374\375\311\304%\210\335\376\377\201@\311\304%\210\335\201A\201B\201C\311\304%\210\335\201D\201E\201F\311\304%\207" [require lsp-icons lsp-mode custom-declare-group lsp-headerline nil "LSP support for headerline" :prefix "lsp-headerline-" :group :tag "LSP Headerline" custom-declare-variable lsp-headerline-breadcrumb-segments funcall function #[0 "\300\207" [(path-up-to-project file symbols)] 1] "Segments used in breadcrumb text on headerline." :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))) lsp-headerline-breadcrumb-enable-symbol-numbers #[0 "\300\207" [nil] 1] "Whether to label symbols with numbers on the breadcrumb." boolean lsp-headerline-breadcrumb-enable-diagnostics #[0 "\300\207" [t] 1] "If non-nil, apply different face on the breadcrumb based on the errors." :package-version (lsp-mode . "7.1") custom-declare-face lsp-headerline-breadcrumb-separator-face ((t :inherit shadow :height 0.8)) "Face used for breadcrumb separator on headerline." lsp-headerline-breadcrumb-path-face ((t :inherit font-lock-string-face)) "Face used for breadcrumb paths on headerline." lsp-headerline-breadcrumb-path-error-face ((t :underline (:style wave :color "Red1") :inherit lsp-headerline-breadcrumb-path-face)) "Face used for breadcrumb paths on headerline when there is an error under that path" lsp-headerline-breadcrumb-path-warning-face ((t :underline (:style wave :color "Yellow") :inherit lsp-headerline-breadcrumb-path-face)) "Face used for breadcrumb paths on headerline when there is an warning under that path" lsp-headerline-breadcrumb-path-info-face ((t :underline (:style wave :color "Green") :inherit lsp-headerline-breadcrumb-path-face)) "Face used for breadcrumb paths on headerline when there is an info under that path" lsp-headerline-breadcrumb-path-hint-face ((t :underline (:style wave :color "Green") :inherit lsp-headerline-breadcrumb-path-face)) "Face used for breadcrumb paths on headerline when there is an hint under that path" 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-symbols-error-face ((t :inherit lsp-headerline-breadcrumb-symbols-face :underline (:style wave :color "Red1"))) "Face used for breadcrumb symbols text on headerline when there\nis an error in symbols range." lsp-headerline-breadcrumb-symbols-warning-face ((t :inherit lsp-headerline-breadcrumb-symbols-face :underline (:style wave :color "Yellow"))) "Face used for breadcrumb symbols text on headerline when there\nis an warning in symbols range." lsp-headerline-breadcrumb-symbols-info-face ((t :inherit lsp-headerline-breadcrumb-symbols-face :underline (:style wave :color "Green"))) "Face used for breadcrumb symbols text on headerline when there\nis an info in symbols range." lsp-headerline-breadcrumb-symbols-hint-face ((t :inherit lsp-headerline-breadcrumb-symbols-face :underline (:style wave :color "Green"))) "Face used for breadcrumb symbols text on headerline when there\nis an hints in symbols range." lsp-headerline-breadcrumb-deprecated-face ((t :inherit lsp-headerline-breadcrumb-symbols-face :strike-through t)) "Face used on breadcrumb deprecated text on modeline."] 10) #@52 Holds the current breadcrumb string on headerline. (defvar lsp-headerline--string nil (#$ . 4360)) (make-variable-buffer-local 'lsp-headerline--string) #@52 Holds the current breadcrumb string on headerline. (defvar lsp-headerline-arrow nil (#$ . 4518)) #@80 Holds the current breadcrumb path-up-to-project segments for caching purposes. (defvar lsp-headerline--path-up-to-project-segments nil (#$ . 4621)) (make-variable-buffer-local 'lsp-headerline--path-up-to-project-segments) #@49 Build the arrow icon for headerline breadcrumb. (defalias 'lsp-headerline--arrow-icon #[0 "\206\f\301\302\303\304\305$\211\207" [lsp-headerline-arrow lsp-icons-all-the-icons-material-icon "chevron_right" lsp-headerline-breadcrumb-separator-face ">" headerline-breadcrumb] 5 (#$ . 4849)]) #@63 Build the SYMBOL icon for headerline breadcrumb. (fn INPUT0) (defalias 'lsp-headerline--symbol-icon #[257 "\300\301\"\302\303\"\304P\207" [gethash "kind" lsp-icons-get-by-symbol-kind headerline-breadcrumb " "] 5 (#$ . 5146)]) #@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 (#$ . 5382)]) #@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 (#$ . 5837)]) #@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 (#$ . 6072)]) #@108 Making mouse event handler. Switch to current mouse interacting window before doing BODY. (fn &rest BODY) (defalias 'lsp-headerline--make-mouse-handler '(macro . #[128 "\300\301\302\303BBBB\207" [lambda (event) (interactive "e") (select-window (posn-window (elt event 1)))] 6 (#$ . 6368)])) (byte-code "\300\301\302\303#\210\304\301\305\306#\300\207" [put lsp-headerline--make-mouse-handler edebug-form-spec t function-put lisp-indent-function 0] 4) #@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#\312\313##\207" [lsp-headerline--with-action make-sparse-keymap define-key [header-line mouse-1] make-closure #[257 "\301\302\234\211@\262!\210\303\300!\207" [V0 select-window 1 dired] 4 "\n\n(fn EVENT)" #1="e"] [header-line mouse-2] #[257 "\301\302\234\211@\262!\210\303\300!\207" [V0 select-window 1 dired-other-window] 4 "\n\n(fn EVENT)" #1#] format "mouse-1: browse '%s' with Dired\nmouse-2: browse '%s' with Dired in other window" propertize lsp-full-path] 10 (#$ . 6826)]) #@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\300\314\"\315\316\317\"!\315\316\320\"!e=\203Gd=\203G\266\321\202N\312\322\f\"\266\203\262##\207" [gethash "name" lsp-headerline--with-action make-sparse-keymap define-key [header-line mouse-1] make-closure #[257 "\302\303\234\211@\262!\210\304\301!\203 \203\305 \210\306\300!\207" [V0 evil-mode select-window 1 boundp evil-set-jump lsp-headerline--go-to-symbol] 4 "\n\n(fn EVENT)" #1="e"] [header-line mouse-2] #[257 "\301\302\234\211@\262!\210\300\303\304\"\305\306\307\"!\305\306\310\"!e=\203)d=\203)~\207\311\300!\207" [V0 select-window 1 gethash "range" lsp--position-to-point lsp-get :start :end lsp-headerline--narrow-to-symbol] 8 "\n\n(fn EVENT)" #1#] format "mouse-1: go to '%s' symbol\nmouse-2: %s" "range" lsp--position-to-point lsp-get :start :end "widen" "narrow to '%s' range"] 17 (#$ . 7556)]) #@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 (#$ . 8610)]) #@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 (#$ . 8957)]) #@51 Build the file-segment string for the breadcrumb. (defalias 'lsp-headerline--build-file-string #[0 "\300 \301!\302!\211\203\303\304\"\305\306\307\310!#Q\207\207" [buffer-file-name f-filename f-ext lsp-icons-get-by-file-ext headerline-breadcrumb " " propertize font-lock-face lsp-headerline--face-for-path] 10 (#$ . 9361)]) #@39 Calculate the face for DIR. (fn DIR) (defalias 'lsp-headerline--face-for-path #[257 "\305\306!!\211\2036\307\204\310\207\211 \"\203\311\207\211\n\"\203\"\312\207\211 \"\203+\313\207\211\f\"\2034\314\207\310\207\310\207" [lsp-headerline-breadcrumb-enable-diagnostics lsp/diagnostic-severity-error lsp/diagnostic-severity-warning lsp/diagnostic-severity-information lsp/diagnostic-severity-hint lsp-diagnostics-stats-for directory-file-name #[514 "H\300U?\207" [0] 4 "\n\n(fn DIAGS SEVERITY)"] lsp-headerline-breadcrumb-path-face lsp-headerline-breadcrumb-path-error-face lsp-headerline-breadcrumb-path-warning-face lsp-headerline-breadcrumb-path-info-face lsp-headerline-breadcrumb-path-hint-face] 6 (#$ . 9699)]) #@46 Get the severiy level for RANGE. (fn RANGE) (defalias 'lsp-headerline--severity-level-for-range #[257 "\300C\301\302\303#\304 \"\210\211\242\207" [10 mapc make-closure #[257 "\302\303\302\304\"\"\302\305\"\306\300\"\205\301\211\242^\240\207" [V0 V1 gethash "start" "range" "severity" lsp-point-in-range\?] 6 "\n\n(fn INPUT0)"] lsp--get-buffer-diagnostics] 7 (#$ . 10435)]) #@58 Build the path-up-to-project segment for the breadcrumb. (defalias 'lsp-headerline--build-path-up-to-project-string #[0 "\301 \211\203\206\302\303\304 !\"\211\305\306\307\310 \307Q#\207\311\207" [lsp-headerline--path-up-to-project-segments lsp-workspace-root lsp-headerline--path-up-to-project-root lsp-f-parent buffer-file-name mapconcat #[257 "\300\301\302\303\304\305#!#\207" [propertize font-lock-face lsp-headerline--face-for-path get-text-property 0 lsp-full-path] 9 "\n\n(fn NEXT-DIR)"] " " lsp-headerline--arrow-icon ""] 8 (#$ . 10823)]) #@39 Get the face for SYMBOL. (fn INPUT0) (defalias 'lsp-headerline--face-for-symbol #[257 "\305\306\"\305\307\"\310!\203\311\207\204\312\207\211 U\203\313\207\211\nU\203'\314\207\211 U\203/\315\207\211\fU\2037\316\207\312\207" [lsp-headerline-breadcrumb-enable-diagnostics lsp/diagnostic-severity-error lsp/diagnostic-severity-warning lsp/diagnostic-severity-information lsp/diagnostic-severity-hint gethash "deprecated" "range" lsp-headerline--severity-level-for-range lsp-headerline-breadcrumb-deprecated-face lsp-headerline-breadcrumb-symbols-face lsp-headerline-breadcrumb-symbols-error-face lsp-headerline-breadcrumb-symbols-warning-face lsp-headerline-breadcrumb-symbols-info-face lsp-headerline-breadcrumb-symbols-hint-face] 6 (#$ . 11386)]) #@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 \312Q#\202*\314\262\2020\314\262\2026\314\262)\207\314\207" [lsp--document-symbols-request-async lsp-feature\? "textDocument/documentSymbol" t lsp--get-document-symbols lsp--symbols->document-symbols-hierarchy -map-indexed #[514 "\211TB\207" [] 4 "\n\n(fn INDEX ELT)"] mapconcat #[257 "\211\211A\262\242\301\302\"\303\304\305!#\306!\203'\303\307!\310\311#\312P\202(\313\2032P\2023P\314\"\207" [lsp-headerline-breadcrumb-enable-symbol-numbers gethash "name" propertize font-lock-face lsp-headerline--face-for-symbol lsp-headerline--symbol-icon number-to-string face lsp-headerline-breadcrumb-symbols-face " " #1="" lsp-headerline--symbol-with-action] 11 "\n\n(fn INPUT0)"] " " lsp-headerline--arrow-icon #1#] 9 (#$ . 12152)]) #@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\300\267\202\301 \202\"\302 \202\"\303 \202\"\304 \202\"\305\306\307!\"\210\310\211\310=\203*\310\207\311 \312\312R\207" [#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 21)) 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="" lsp-headerline--arrow-icon " "] 6 "\n\n(fn SEGMENT)"] #1#] 5 (#$ . 13098)]) #@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 (#$ . 13875)]) #@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 (#$ . 14111)]) #@37 Disable headerline breadcrumb mode. (defalias 'lsp-headerline--disable-breadcrumb #[0 "\300\301!\207" [lsp-headerline-breadcrumb-mode -1] 2 (#$ . 14368)]) #@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 (#$ . 14530)) (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\203Y\313\303\314\"\210\315\316\317\307\310$\210\315\320\317\307\310$\210\315\321\322\307\310$\210\315\323\324\307\310$\210\202x\325\320\317\310#\210\325\321\322\310#\210\325\323\324\310#\210\325\316\317\310#\210\307\326\327 \"\330\331\203\202\332\202\203\333\"\210\334\335!\203\245\304 \203\227\211\304 \232\203\245\336\337\203\241\340\202\242\341\342#\210\210\343 \210\207" [lsp-headerline-breadcrumb-mode local-minor-modes lsp-headerline--path-up-to-project-segments header-line-format current-message toggle 1 nil t boundp delq add-to-list (t (:eval lsp-headerline--string)) add-hook xref-after-jump-hook lsp-headerline--check-breadcrumb lsp-on-idle-hook 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 (#$ . 14783) (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->document-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 (#$ . 17341) "P"]) (eval-after-load 'evil #[0 "\300\301\302\303#\207" [evil-set-command-property lsp-breadcrumb-go-to-symbol :jump t] 4]) #@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->document-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 (#$ . 18102) "P"]) (defconst lsp-headerline-plist-value-when-compiled nil) (provide 'lsp-headerline)