;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\313\314\315\316\312\317%\210\320\321\322\323#\210\324\211\203C\211@\321N\203<\322N\204<\325\322\321N#\210A\266\202\202\"\210\326\321\322\327#\210\302\322\304\305\330DD\331\312\301\310\332\333\334& \207" [require lsp-mode custom-declare-variable lsp-modeline-code-actions-kind-regex funcall function #[0 "\300\207" [#1="$\\|quickfix.*\\|refactor.*"] 1 #1#] "Regex for the code actions kinds to show in the modeline." :type string :group custom-declare-face lsp-modeline-code-actions-face ((t :inherit homoglyph)) "Face used to code action text on modeline." lsp-faces defvaralias lsp-diagnostics-modeline-scope lsp-modeline-diagnostics-scope nil (saved-value saved-variable-comment) put make-obsolete-variable "lsp-mode 7.0.1" #[0 "\300\207" [:workspace] 1] "The modeline diagnostics scope." (choice (const :tag "File" :file) (const :tag "Project" :workspace) (const :tag "All Projects" :global)) :package-version (lsp-mode . "6.3")] 10) #@51 Holds the current code action string on modeline. (defvar lsp-modeline--code-actions-string nil (#$ . 1107)) (make-variable-buffer-local 'lsp-modeline--code-actions-string) #@43 Build the icon for modeline code actions. (defalias 'lsp-modeline--code-actions-icon #[0 "\300\301\302\303#\203\304\305\306\307\310\311%\207\312\313\314\307#\207" [require all-the-icons nil t all-the-icons-octicon "light-bulb" :face lsp-modeline-code-actions-face :v-adjust -0.0575 propertize "💡" face] 6 (#$ . 1286)]) #@54 Convert code ACTION to friendly string. (fn ACTION) (defalias 'lsp-modeline--code-action->string #[257 "\300\301\302\303!#\207" [replace-regexp-in-string "[\n ]+" " " lsp:code-action-title] 6 (#$ . 1616)]) #@78 Build the string to be presented on modeline for code ACTIONS. (fn ACTIONS) (defalias 'lsp-modeline--build-code-actions-string #[257 "\300 \301\211\205\f\302\303\"\262\211\205\304!\262\206\304\305!!\306\307#G\310U\311\312\313!\211\2052\314\315\"\262\211\205;\316!\262\317Q\203M\320\320\320\260\202e\320\320\320\301\311\321\322 !S!\323Q\324\325\306\307%\320\260\301\326\327\330\"\203w\202x\331P\332\333\334\335\336\337\340#\"&\207" [lsp-modeline--code-actions-icon propertize -first lsp:code-action-is-preferred\? lsp-modeline--code-action->string lsp-seq-first face lsp-modeline-code-actions-face 1 "(" where-is-internal lsp-execute-code-action -find #[257 "\211\300H\301>?\207" [0 (menu-bar normal-state)] 3 "\n\n(fn O)"] key-description ")" " " number-to-string seq-length " more)" display ((height 0.9)) help-echo format "Apply code actions %s\nmouse-1: " "select from multiple code actions" mouse-face mode-line-highlight local-map make-mode-line-mouse-map mouse-1 make-closure #[0 "\301\203\n\302\303\300!!\207\302\304\300!!\207" [V0 V1 lsp-execute-code-action lsp-seq-first lsp--select-action] 3 nil nil]] 19 (#$ . 1831)]) #@54 Update modeline with new code ACTIONS. (fn ACTIONS) (defalias 'lsp--modeline-update-code-actions #[257 "\203\n\302\303\"\262\304!\203\305\202\306!\307 \207" [lsp-modeline-code-actions-kind-regex lsp-modeline--code-actions-string seq-filter #[257 "\301\302\"\211?\206 \303\"\207" [lsp-modeline-code-actions-kind-regex gethash "kind" s-match] 5 "\n\n(fn INPUT0)"] seq-empty-p "" lsp-modeline--build-code-actions-string force-mode-line-update] 4 (#$ . 3010)]) #@73 Request code actions to update modeline for given BUFFER. (fn &rest _) (defalias 'lsp-modeline--check-code-actions #[128 "\300\301!\205\302\301\303 \304\305\306\307\310&\207" [lsp-feature\? "textDocument/codeAction" lsp-request-async lsp--text-document-code-action-params lsp--modeline-update-code-actions :mode unchanged :cancel-token :lsp-modeline-code-actions] 9 (#$ . 3489)]) #@39 Enable code actions on modeline mode. (defalias 'lsp-modeline--enable-code-actions #[0 "\205 \301\302!\205 \303\304!\207" [lsp-modeline-code-actions-enable lsp-feature\? "textDocument/codeAction" lsp-modeline-code-actions-mode 1] 2 (#$ . 3879)]) #@40 Disable code actions on modeline mode. (defalias 'lsp-modeline--disable-code-actions #[0 "\300\301!\207" [lsp-modeline-code-actions-mode -1] 2 (#$ . 4134)]) #@129 Non-nil if Lsp-Modeline-Code-Actions mode is enabled. Use the command `lsp-modeline-code-actions-mode' to change this variable. (defvar lsp-modeline-code-actions-mode nil (#$ . 4298)) (make-variable-buffer-local 'lsp-modeline-code-actions-mode) #@618 Toggle code actions on modeline. This is a minor mode. If called interactively, toggle the `Lsp-Modeline-Code-Actions 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-modeline-code-actions-mode'. The mode's hook is called both when the mode is enabled and when it is disabled. (fn &optional ARG) (defalias 'lsp-modeline-code-actions-mode #[256 "\303 \304=\203 ?\202\247\203\305W\203\306\202\307\310\301!\2031\311\300 \"\2031\300 B\203R\312\302\313\"\210\314\315\316\306\307$\210\314\317\320\306\307$\210\314\321\322\306\307$\210\202i\323\315\316\307#\210\323\317\320\307#\210\323\321\322\307#\210\324\325\n\"\326\327\203s\330\202t\331\"\210\332\333!\203\226\303 \203\210\211\303 \232\203\226\334\335\203\222\336\202\223\337\340#\210\210\341 \210\207" [lsp-modeline-code-actions-mode local-minor-modes global-mode-string current-message toggle 1 nil t boundp delq add-to-list (t (:eval lsp-modeline--code-actions-string)) add-hook lsp-on-idle-hook lsp-modeline--check-code-actions lsp-configure-hook lsp-modeline--enable-code-actions lsp-unconfigure-hook lsp-modeline--disable-code-actions remove-hook remove (t (:eval lsp-modeline--code-actions-string)) run-hooks lsp-modeline-code-actions-mode-hook lsp-modeline-code-actions-mode-on-hook lsp-modeline-code-actions-mode-off-hook called-interactively-p any message "Lsp-Modeline-Code-Actions mode %sabled%s" "en" "dis" " in current buffer" force-mode-line-update] 7 (#$ . 4550) (byte-code "\203\n\301!\202 \302C\207" [current-prefix-arg prefix-numeric-value toggle] 2)]) (defvar lsp-modeline-code-actions-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\313\314\300!\205#\310\211%\207" [lsp-modeline-code-actions-mode-map lsp-modeline-code-actions-mode-hook variable-documentation put "Hook run after entering or leaving `lsp-modeline-code-actions-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-modeline-code-actions-mode "" boundp] 6) #@49 Value of current buffer diagnostics statistics. (defvar lsp-modeline--diagnostics-string nil (#$ . 7011)) (make-variable-buffer-local 'lsp-modeline--diagnostics-string) #@87 Plist of workspaces to their modeline strings. The `:global' workspace is global one. (defvar lsp-modeline--diagnostics-wks->strings nil (#$ . 7186)) #@77 Calculate diagnostics statistics based on `lsp-modeline-diagnostics-scope'. (defalias 'lsp-modeline-diagnostics-statistics #[0 "\306=\203\f\307 C\202\310\311\312=!!\313 \314\"\315\314\316\317\320\"\"\210\211 W\203jH\314V\203c\321\322\323H\"\324\n\232\203C\325\202^ \232\203M\326\202^\f\232\203W\327\202^ \232\205^\327#C\244\262\211T\262\202!\321\330\331\"\332\333\334\335\336\337\340\315\341#\205\200\342\343\344\"&\207" [lsp-modeline-diagnostics-scope lsp/diagnostic-severity-max lsp/diagnostic-severity-error lsp/diagnostic-severity-warning lsp/diagnostic-severity-information lsp/diagnostic-severity-hint :file lsp--get-buffer-diagnostics ht-values lsp-diagnostics :workspace make-vector 0 nil mapc make-closure #[257 "\301\302\303\300\"\"\207" [V0 mapc make-closure #[257 "\301!\205\n\302\303\"\211\205\300HTI\266\202\207" [V0 ht\? gethash "severity"] 8 "\n\n(fn DIAG)"]] 5 "\n\n(fn BUF-DIAGS)"] propertize format "%s" face error warning success s-join "/" mouse-face mode-line-highlight help-echo "mouse-1: Show diagnostics" local-map require lsp-treemacs t make-mode-line-mouse-map mouse-1 lsp-treemacs-errors-list] 15 (#$ . 7342)]) #@39 Reset the modeline diagnostics cache. (defalias 'lsp-modeline--diagnostics-reset-modeline-cache #[0 "\302\303 @\304#\210\302\305\304#\210\304\211\207" [lsp-modeline--diagnostics-wks->strings lsp-modeline--diagnostics-string plist-put lsp-workspaces nil :global] 4 (#$ . 8530)]) #@37 Update diagnostics modeline string. (defalias 'lsp-modeline--diagnostics-update-modeline #[0 "\303\304\267\202? \206@\211 \202@\305 @\306\n\"\206% \307\n#\211\262\262\202@\306\n\310\"\206@\211 \307\n\310#\211\262\202@\311\211\207" [lsp-modeline-diagnostics-scope lsp-modeline--diagnostics-string lsp-modeline--diagnostics-wks->strings #[0 "\300 \211\211\301\230\262\203 \301\207\302P\207" [lsp-modeline-diagnostics-statistics "" " "] 4] #s(hash-table size 3 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (:file 7 :workspace 16 :global 42)) lsp-workspaces plist-get plist-put :global nil] 7 (#$ . 8817)]) #@38 Enable diagnostics on modeline mode. (defalias 'lsp-modeline--enable-diagnostics #[0 "\205 \301\302!\205 \303\304!\207" [lsp-modeline-diagnostics-enable lsp-feature\? "textDocument/publishDiagnostics" lsp-modeline-diagnostics-mode 1] 2 (#$ . 9467)]) #@39 Disable diagnostics on modeline mode. (defalias 'lsp-modeline--disable-diagnostics #[0 "\300\301!\207" [lsp-modeline-diagnostics-mode -1] 2 (#$ . 9726)]) (byte-code "\300\301\302\303#\210\304\301\302\305#\207" [defalias lsp-diagnostics-modeline-mode lsp-modeline-diagnostics-mode nil make-obsolete "lsp-mode 7.0.1"] 4) #@127 Non-nil if Lsp-Modeline-Diagnostics mode is enabled. Use the command `lsp-modeline-diagnostics-mode' to change this variable. (defvar lsp-modeline-diagnostics-mode nil (#$ . 10052)) (make-variable-buffer-local 'lsp-modeline-diagnostics-mode) #@612 Toggle diagnostics modeline. This is a minor mode. If called interactively, toggle the `Lsp-Modeline-Diagnostics 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-modeline-diagnostics-mode'. The mode's hook is called both when the mode is enabled and when it is disabled. (fn &optional ARG) (defalias 'lsp-modeline-diagnostics-mode #[256 "\303 \304=\203 ?\202\247\203\305W\203\306\202\307\310\301!\2031\311\300 \"\2031\300 B\203P\312\313\314\306\307$\210\312\315\316\306\307$\210\317\302\320\"\210\312\321\322\"\210\202f\323\313\314\307#\210\323\315\316\307#\210\323\321\322\"\210\324\325\n\"\326\327\203p\330\202q\331\"\210\332\333!\203\223\303 \203\205\211\303 \232\203\223\334\335\203\217\336\202\220\337\340#\210\210\341 \210\207" [lsp-modeline-diagnostics-mode local-minor-modes global-mode-string current-message toggle 1 nil t boundp delq add-hook lsp-configure-hook lsp-modeline--enable-diagnostics lsp-unconfigure-hook lsp-modeline--disable-diagnostics add-to-list (t (:eval (lsp-modeline--diagnostics-update-modeline))) lsp-diagnostics-updated-hook lsp-modeline--diagnostics-reset-modeline-cache remove-hook remove (t (:eval (lsp-modeline--diagnostics-update-modeline))) run-hooks lsp-modeline-diagnostics-mode-hook lsp-modeline-diagnostics-mode-on-hook lsp-modeline-diagnostics-mode-off-hook called-interactively-p any message "Lsp-Modeline-Diagnostics mode %sabled%s" "en" "dis" " in current buffer" force-mode-line-update] 7 (#$ . 10301) (byte-code "\203\n\301!\202 \302C\207" [current-prefix-arg prefix-numeric-value toggle] 2)]) (defvar lsp-modeline-diagnostics-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\313\314\300!\205#\310\211%\210\315\316!\207" [lsp-modeline-diagnostics-mode-map lsp-modeline-diagnostics-mode-hook variable-documentation put "Hook run after entering or leaving `lsp-modeline-diagnostics-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-modeline-diagnostics-mode "" boundp provide lsp-modeline] 6)