;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\302\303\304\305\306\307\310\301\311\312& \210\313\314\315\304#\210\316\211\2039\211@\314N\2032\315N\2042\317\315\314N#\210A\266\202\202\210\320\314\315\321#\210\322\315\323\324\325DD\326\327\330\310\303\331\332& \210\313\333\334\304#\210\316\211\203y\211@\333N\203r\334N\204r\317\334\333N#\210A\266\202\202X\210\320\333\334\321#\210\322\334\323\324\335DD\336\327\337\310\303&\210\322\340\323\324\341DD\342\327\343\310\303&\210\322\344\323\324\345DD\346\327\347\310\303\331\350& \207" [require lsp-mode custom-declare-group lsp-diagnostics nil "LSP support for diagnostics" :prefix "lsp-disagnostics-" :group :tag "LSP Diagnostics" defvaralias lsp-diagnostic-package lsp-diagnostics-provider (saved-value saved-variable-comment) put make-obsolete-variable "lsp-mode 7.0.1" custom-declare-variable funcall function #[0 "\300\207" [:auto] 1] "The checker backend provider." :type (choice (const :tag "Pick flycheck if present and fallback to flymake" :auto) (const :tag "Pick flycheck" :flycheck) (const :tag "Pick flymake" :flymake) (const :tag "Use neither flymake nor lsp" :none) (const :tag "Prefer flymake" t) (const :tag "Prefer flycheck" nil)) :package-version (lsp-mode . "6.3") lsp-flycheck-default-level lsp-diagnostics-flycheck-default-level #[0 "\300\207" [error] 1] "Error level to use when the server does not report back a diagnostic level." (choice (const error) (const warning) (const info)) lsp-diagnostics-attributes #[0 "\300\207" [((unnecessary :foreground "gray") (deprecated :strike-through t))] 1] "The Attributes used on the diagnostics.\nList containing (tag attributes) where tag is the LSP diagnostic tag and\nattributes is a `plist' containing face attributes which will be applied\non top the flycheck face for that error level." (repeat list) lsp-diagnostics-disabled-modes #[0 "\300\207" [nil] 1] "A list of major models for which `lsp-diagnostics-mode' should be disabled." (repeat symbol) (lsp-mode . "7.1")] 10) #@81 True when lsp diagnostics flycheck integration has been enabled in this buffer. (defvar lsp-diagnostics--flycheck-enabled nil (#$ . 2078)) (make-variable-buffer-local 'lsp-diagnostics--flycheck-enabled) #@69 The value of flycheck-checker before lsp diagnostics was activated. (defvar lsp-diagnostics--flycheck-checker nil (#$ . 2287)) (make-variable-buffer-local 'lsp-diagnostics--flycheck-checker) #@133 Generate flycheck level from the original FLYCHECK-LEVEL (e. g. `error', `warning') and list of LSP TAGS. (fn FLYCHECK-LEVEL TAGS) (defalias 'lsp-diagnostics--flycheck-level #[514 "\300\301\302\303\304##\305!\206n\306\300\307\"!\310\311N\312N\"\210\313\314\315\"\"\210\211\262\306\300\316\"!\211\317\312#\266\211\317\320\321#\266\211\262\306!\322N\206N\323N\324\325 \326N\327 \330N\331 \332 \333\334N\335& \210\266\204\207" [format "lsp-flycheck-%s-%s" mapconcat symbol-name "-" intern-soft intern "lsp-%s-face" copy-face flycheck-overlay-category face mapc make-closure #[257 "\302\303\300\304\305 \"A$\207" [V0 lsp-diagnostics-attributes apply set-face-attribute nil assoc] 8 "\n\n(fn TAG)"] "lsp-%s-category" put priority 100 flycheck-fringe-bitmaps flycheck-fringe-bitmap-double-arrow flycheck-define-error-level :severity flycheck-error-severity :compilation-level flycheck-compilation-level :overlay-category :fringe-bitmap :fringe-face flycheck-fringe-face :error-list-face] 21 (#$ . 2485)]) #@68 Calculate flycheck level by SEVERITY and TAGS. (fn SEVERITY TAGS) (defalias 'lsp-diagnostics--flycheck-calculate-level #[514 "\301\267\202\302\202\303\202\304\202\304\202\305\306\"\211\203$\307\"\207\207" [lsp-flycheck-default-level #s(hash-table size 4 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (1 6 2 10 3 14 4 18)) error warning info seq-map #[257 "\211U\203\302\207\211 U\205\303\207" [lsp/diagnostic-tag-unnecessary lsp/diagnostic-tag-deprecated unnecessary deprecated] 3 "\n\n(fn TAG)"] lsp-diagnostics--flycheck-level] 7 (#$ . 3523)]) #@117 Start an LSP syntax check with CHECKER. CALLBACK is the status callback passed by Flycheck. (fn CHECKER CALLBACK) (defalias 'lsp-diagnostics--flycheck-start #[514 "\300\301\302\303#\210\211\304\305\306\307\"\310 \"\"\207" [remove-hook lsp-on-idle-hook lsp-diagnostics--flycheck-buffer t finished -map make-closure #[257 "\302\303\"\302\304\"\302\305\"\302\306\"\302\307\"\302\310\"\302\311\"\302\312\"\302\313\"\302\314\"\302\312\"\302\313\"\315\316p\317\300\320 \321\322\323\"\324\325\326\327T!\330\331!T\332\327T!\333\331!T&\207" [V0 buffer-file-name gethash "message" "severity" "tags" "code" "source" "range" "start" "line" "character" "end" flycheck-error-new :buffer :checker :filename :message :level lsp-diagnostics--flycheck-calculate-level :id :group :line lsp-translate-line :column lsp-translate-column :end-line :end-column] 37 "\n\n(fn INPUT0)"] lsp--get-buffer-diagnostics] 8 (#$ . 4117)]) #@29 Trigger flyckeck on buffer. (defalias 'lsp-diagnostics--flycheck-buffer #[0 "\300\301\302\303#\210\304 \207" [remove-hook lsp-on-idle-hook lsp-diagnostics--flycheck-buffer t flycheck-buffer] 4 (#$ . 5065)]) #@103 Report flycheck. This callback is invoked when new diagnostics are received from the language server. (defalias 'lsp-diagnostics--flycheck-report #[0 "\302>\204\303>\205\304 ?\205 \205\305\306 \307H\"\207" [flycheck-check-syntax-automatically lsp--cur-workspace idle-change save buffer-modified-p mapc #[257 "\301!\205B\302!\203\303!\205B\304\305\306\"\307\"?\205B\310\311\"\211\2031\310\312\"\211\313!)\202@rq\210\314\306\307\315\316$\210\317p!)\262\207" [lsp--buffer-workspaces lsp-buffer-live-p bufferp get-buffer-window -contains\? buffer-local-value lsp-on-idle-hook lsp-diagnostics--flycheck-buffer plist-get :with-current-buffer :workspaces #[0 "\300\301\302\303\304$\210\305p!\207" [add-hook lsp-on-idle-hook lsp-diagnostics--flycheck-buffer nil t lsp--idle-reschedule] 5] add-hook nil t lsp--idle-reschedule] 7 "\n\n(fn BUFFER)"] 9] 4 (#$ . 5279)]) (byte-code "\300\301\302\301\303\304#\305#\210\306\301\304\303\304\307%\207" [defalias lsp-diagnostics-flycheck-error-explainer cl-generic-define (e _server-id) nil "Explain a `flycheck-error' E in a generic way depending on the SERVER-ID.\n\n(fn E SERVER-ID)" cl-generic-define-method #[514 "\300!\207" [flycheck-error-message] 4 "\n\n(fn E SERVER-ID)"]] 6) (defalias 'lsp-diagnostics-lsp-checker-if-needed #[0 "\300\301!?\205\302\301\303\304\305\306\307\310\311\312\313&\n\207" [flycheck-valid-checker-p lsp flycheck-define-generic-checker "A syntax checker using the Language Server Protocol (LSP)\nprovided by lsp-mode.\nSee https://github.com/emacs-lsp/lsp-mode." :start lsp-diagnostics--flycheck-start :modes (lsp-placeholder-mode) :predicate #[0 "\207" [lsp-diagnostics-mode] 1] :error-explainer #[257 "\300\301\302 \242!\"\207" [lsp-diagnostics-flycheck-error-explainer lsp--workspace-server-id lsp-workspaces] 5 "\n\n(fn E)"]] 11]) #@67 Enable flycheck integration for the current buffer. (fn &rest _) (defalias 'lsp-diagnostics-flycheck-enable #[128 "\305\306!\210\307 \210\204 \310=\204 \311\300!\210\312\313\314!\210\315 \210\311\301!\210\310\316 !\210\310\f>\2044\310\fB\317\320\321\322\312$\210\317\323\321\322\312$\207" [lsp-diagnostics--flycheck-enabled flycheck-checker lsp-diagnostics--flycheck-checker major-mode flycheck-checkers require flycheck lsp-diagnostics-lsp-checker-if-needed lsp make-local-variable t flycheck-mode 1 flycheck-stop lsp-flycheck-add-mode add-hook lsp-diagnostics-updated-hook lsp-diagnostics--flycheck-report nil lsp-managed-mode-hook] 6 (#$ . 7115)]) #@72 Disable flycheck integration for the current buffer is it was enabled. (defalias 'lsp-diagnostics-flycheck-disable #[0 "\205\"\304 \210 \305=\203\306\301!\210\n\307\306\300!\210\307 \205\"\303\310!\207" [lsp-diagnostics--flycheck-enabled flycheck-checker lsp-diagnostics--flycheck-checker flycheck-mode flycheck-stop lsp make-local-variable nil 1] 2 (#$ . 7783)]) (defvar lsp-diagnostics--flymake-report-fn nil nil) (make-variable-buffer-local 'lsp-diagnostics--flymake-report-fn) #@16 Setup flymake. (defalias 'lsp-diagnostics--flymake-setup #[0 "\301\302\303\304\301\305$\210\302\306\307\301\305$\210\310\311!\207" [lsp-diagnostics--flymake-report-fn nil add-hook flymake-diagnostic-functions lsp-diagnostics--flymake-backend t lsp-diagnostics-updated-hook lsp-diagnostics--flymake-after-diagnostics flymake-mode 1] 5 (#$ . 8278)]) #@45 Handler for `lsp-diagnostics-updated-hook'. (defalias 'lsp-diagnostics--flymake-after-diagnostics #[0 "\203 \203 \302 \207 ?\205\303\211\207" [lsp-diagnostics--flymake-report-fn flymake-mode lsp-diagnostics--flymake-update-diagnostics nil] 2 (#$ . 8633)]) #@61 Flymake backend using REPORT-FN. (fn REPORT-FN &rest ARGS) (defalias 'lsp-diagnostics--flymake-backend #[385 "?\211\205\n\301 \207" [lsp-diagnostics--flymake-report-fn lsp-diagnostics--flymake-update-diagnostics] 4 (#$ . 8902)]) #@36 Report new diagnostics to flymake. (defalias 'lsp-diagnostics--flymake-update-diagnostics #[0 "\302\303!\211\205\304\305 !\"\262\211\205\306\307\"\262\310edB#\207" [lsp-diagnostics--flymake-report-fn buffer-file-name lsp-diagnostics t gethash lsp--fix-path-casing mapcar #[257 "\301\302\"\301\303\"\301\304\"\301\305\"\301\306\"\301\307\"\301\306\301\310\"\"\311!\211A\262\242U\203y\312pT#\211\203G\211@\262\211A\266\202\202y\203a\212eb\210\313T!\262\314T!\262)\210\202y\315\214~\210\212eb\210\313T!\262\314T!\262+\210\316p\f\317\267\202\214\320\202\215\321\202\215\322%\207" [lsp--already-widened gethash "message" "severity" "range" "start" "line" "character" "end" lsp--range-to-region flymake-diag-region point-at-bol point-at-eol t flymake-make-diagnostic #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (1 132 2 136)) :error :warning :note] 17 "\n\n(fn IT)"] :region] 5 (#$ . 9142)]) #@29 Enable LSP checker support. (defalias 'lsp-diagnostics--enable #[0 "\303>\205 \n\235?\205\304\305!\207" [lsp-diagnostics-provider major-mode lsp-diagnostics-disabled-modes (:auto :none :flycheck :flymake t nil) lsp-diagnostics-mode 1] 2 (#$ . 10128)]) #@30 Disable LSP checker support. (defalias 'lsp-diagnostics--disable #[0 "\300\301!\207" [lsp-diagnostics-mode -1] 2 (#$ . 10391)]) #@109 Non-nil if Lsp-Diagnostics mode is enabled. Use the command `lsp-diagnostics-mode' to change this variable. (defvar lsp-diagnostics-mode nil (#$ . 10526)) (make-variable-buffer-local 'lsp-diagnostics-mode) #@601 Toggle LSP diagnostics integration. This is a minor mode. If called interactively, toggle the `Lsp-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-diagnostics-mode'. The mode's hook is called both when the mode is enabled and when it is disabled. (fn &optional ARG) (defalias 'lsp-diagnostics-mode #[256 "\303 \304=\203 ?\202\247\203\305W\203\306\202\307\310\301!\2031\311\300 \"\2031\300 B\203\225\n\312=\203A\313\314!\204W\n\315=\203S\313\314!\204W\316\317!\204W\n\204e\320\321\306\307#\203e\322 \210\202\213\n\312=\204w\n\323=\204w\n\307=\203\201\320\324!\210\325 \210\202\213\n\326=\204\213\327\330!\210\331\332\333\306\307$\210\202\236\334 \210\335\332\333\307#\210\336\337\203\250\340\202\251\341\"\210\342\343!\203\313\303 \203\275\211\303 \232\203\313\344\345\203\307\346\202\310\347\350#\210\210\351 \210\207" [lsp-diagnostics-mode local-minor-modes lsp-diagnostics-provider current-message toggle 1 nil t boundp delq :auto functionp flycheck-mode :flycheck user-error "The lsp-diagnostics-provider is set to :flycheck but flycheck is not installed?" require flycheck lsp-diagnostics-flycheck-enable :flymake flymake lsp-diagnostics--flymake-setup :none lsp--warn "Unable to autoconfigure flycheck/flymake. The diagnostics won't be rendered." add-hook lsp-unconfigure-hook lsp-diagnostics--disable lsp-diagnostics-flycheck-disable remove-hook run-hooks lsp-diagnostics-mode-hook lsp-diagnostics-mode-on-hook lsp-diagnostics-mode-off-hook called-interactively-p any message "Lsp-Diagnostics mode %sabled%s" "en" "dis" " in current buffer" force-mode-line-update] 7 (#$ . 10739) (byte-code "\203\n\301!\202 \302C\207" [current-prefix-arg prefix-numeric-value toggle] 2)]) (defvar lsp-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\317\"\207" [lsp-diagnostics-mode-map lsp-diagnostics-mode-hook variable-documentation put "Hook run after entering or leaving `lsp-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-diagnostics-mode "" boundp add-hook lsp-configure-hook #[0 "\205\301 \207" [lsp-auto-configure lsp-diagnostics--enable] 1]] 6) (defconst lsp-diagnostics-plist-value-when-compiled nil) (provide 'lsp-diagnostics)