;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\207" [require helm helm-imenu dash lsp-mode] 2) (defvar helm-lsp-symbols-request-id nil) (defvar helm-lsp-symbols-result-p nil) (defvar helm-lsp-symbols-result nil) (custom-declare-group 'helm-lsp nil "`helm-lsp' group." :group 'lsp-mode :tag "Language Server") #@97 Action for helm workspace symbol. CANDIDATE is the selected item in the helm menu. (fn INPUT0) (defalias 'helm-lsp-workspace-symbol-action #[257 "\300\301\"\302!\207" [gethash "location" lsp-goto-location] 4 (#$ . 410)]) (byte-code "\300\301\302\303\304\305%\210\306\307\310\311\312DD\313\304\305\314\315&\207" [custom-declare-face helm-lsp-container-face ((t :height 0.8 :inherit shadow)) "The face used for code lens overlays." :group helm-lsp custom-declare-variable helm-lsp-treemacs-icons funcall function #[0 "\300\207" [t] 1] "If non-nil, use `lsp-treemacs' icons." :type boolean] 8) #@39 Extract file name from URI. (fn URI) (defalias 'helm-lsp--extract-file-name #[257 "\301\302\303!!\304!>\204\305\306\307D\"\210\211\310H\262\311\230\203(\312\313\"A@\202+\314!\315\316#\207" [cl-struct-url-tags propertize url-generic-parse-url url-unhex-string type-of signal wrong-type-argument url 1 "jdt" s-match ".*(\\(.*\\)" f-filename face helm-lsp-container-face] 7 (#$ . 1011)]) #@34 Get the icon by KIND. (fn KIND) (defalias 'helm-lsp--get-icon #[257 "\301\302!\210\303\304!\305\306!!\307#\207" [lsp-treemacs-theme require lsp-treemacs gethash lsp-treemacs-symbol-kind->icon treemacs-theme->gui-icons treemacs--find-theme nil] 6 (#$ . 1414)]) #@80 Search against WORKSPACES NAME with default INPUT. (fn WORKSPACES NAME INPUT) (defalias 'helm-lsp--workspace-symbol #[771 "\303\203*\304\305\306\307\310\311\312\n\"\313\314\315\316\317\316\320\321\322\n\323\324\325\303\326\327&\330$)\207\331\332!\207" [helm-lsp-symbols-result lsp--buffer-workspaces helm-map nil helm :sources helm-make-source helm-source-sync :candidates make-closure #[0 " \203\n\207\300\306\307\310\311 D\312\313\314\315\316&\210\n)\207" [V0 helm-lsp-symbols-result-p helm-lsp-symbols-result lsp--buffer-workspaces helm-lsp-symbols-request-id helm-pattern nil lsp-request-async "workspace/symbol" :query #[257 "\304 \205 \305\211\306 )\207" [helm-lsp-symbols-request-id helm-alive-p helm-lsp-symbols-result-p helm-lsp-symbols-result nil t helm-update] 2 "\n\n(fn CANDIDATES)"] :mode detached :cancel-token :workspace-symbols] 8] :action helm-lsp-workspace-symbol-action :volatile t :fuzzy-match :match #[128 "\300\207" [t] 2 "\n\n(fn &rest _)"] :keymap :candidate-transformer #[257 "\301\302\303\"\"\207" [helm-candidate-number-limit -map #[257 "\211\302\303\"\302\304\"\302\305\"\302\306\302\307\"\"\310\"\206\311\312\313!\203P \203P\314!\2060\314\315!\316!\203;\202D\317\320\321\322#Q\320\323\321\324#\325!R\202x\316!\203Z\202d\317\320\321\322#\326R\317\320\327\330Q\321\331#\320\323\321\324#\325!\260B\207" [lsp-symbol-kinds helm-lsp-treemacs-icons gethash "containerName" "name" "kind" "uri" "location" alist-get "Unknown" featurep lsp-treemacs helm-lsp--get-icon fallback s-blank\? " " propertize face helm-lsp-container-face " ยท " success helm-lsp--extract-file-name " -" "(" ")" font-lock-type-face] 14 "\n\n(fn INPUT0)"] -take] 6 "\n\n(fn CANDIDATES)"] :candidate-number-limit :requires-pattern 0 :input user-error "No LSP workspace active"] 26 (#$ . 1683)]) #@119 `helm' for lsp workspace/symbol. When called with prefix ARG the default selection will be symbol at point. (fn ARG) (defalias 'helm-lsp-workspace-symbol #[257 "\301\302 \206\303\304!\305 \211\306H\262\"\307\205\310\311!#\207" [default-directory helm-lsp--workspace-symbol lsp-workspaces gethash lsp-workspace-root lsp-session 4 "Workspace symbol" thing-at-point symbol] 7 (#$ . 3535) "P"]) #@153 `helm' for lsp workspace/symbol for all of the current workspaces. When called with prefix ARG the default selection will be symbol at point. (fn ARG) (defalias 'helm-lsp-global-workspace-symbol #[257 "\300\301\302\303\304 \211\305H\262!!!\306\205\307\310!#\207" [helm-lsp--workspace-symbol -uniq -flatten ht-values lsp-session 4 "Global workspace symbols" thing-at-point symbol] 8 (#$ . 3941) "P"]) #@35 Show lsp code actions using helm. (defalias 'helm-lsp-code-actions #[0 "\301 \302!\203 \303\304\305\"\207\306!\307=\203\203\310\311!!\207\312\313\314\315\316\317\320\321\322\323&\"\207" [lsp-auto-execute-action lsp-code-actions-at-point seq-empty-p signal lsp-no-code-actions nil seq-length 1 lsp-execute-code-action lsp-seq-first helm :sources helm-make-source "Code Actions" helm-source-sync :candidates :candidate-transformer #[257 "\300\301\"\207" [-map #[257 "\211\300\301\"\211\302E\207" [gethash "title" :data] 6 "\n\n(fn INPUT0)"]] 4 "\n\n(fn CANDIDATES)"] :action (("Execute code action" lambda (candidate) (lsp-execute-code-action (plist-get candidate :data))))] 12 (#$ . 4352) nil]) (eval-after-load 'helm-projectile #[0 "\303\304\305\306\307\310\311\312 \313\n\314\315&\f!\210\316\317\320\"\207" [helm-projectile-fuzzy-match helm-projectile-projects-map helm-read-file-name-mode-line-string (lambda (def-tmp-var) (defvar helm-lsp-source-projects def-tmp-var "Helm source for known LSP projects.")) helm-make-source "LSP projects" helm-source-sync :candidates #[0 "\300 \211\301H\207" [lsp-session 1] 3] :fuzzy-match :keymap :mode-line :action helm-source-projectile-projects-actions defalias helm-lsp-switch-project #[256 "\302\211\303\304\305\306\307\310 \311Q\312 \313\314\315!&)\207" [helm-boring-file-regexp-list helm-projectile-truncate-lines nil helm :sources helm-lsp-source-projects :buffer "*helm projectile: " projectile-project-name "*" :truncate-lines :prompt projectile-prepend-project-name "Switch to LSP project: "] 12 "Use projectile with Helm for finding files in project\nWith a prefix ARG invalidates the cache first.\n\n(fn &optional ARG)" "P"]] 14]) (defconst helm-lsp--diag-mapping (byte-code "\304B \305B\n\306B \306BF\207" [lsp/diagnostic-severity-error lsp/diagnostic-severity-warning lsp/diagnostic-severity-information lsp/diagnostic-severity-hint error warning info] 5)) #@29 (fn INPUT0 INPUT1 INPUT2) (defalias 'helm-lsp--diag-matched #[771 "\300\301\"\302\300\303\"\210\300\304\"\300\305\300\306 \"\"\302\300\307\"\210\302\300\310\"\210\311\312\313\n\n $\"\207" [gethash "message" nil "source" "severity" "start" "range" "line" "character" -all\? make-closure #[257 "\211\304H\211\305\267\202\306\307\310O\300\"\207\311\307\310O\312\313\302 \"!\"\207\311\301\"\207" [V0 V1 V2 helm-lsp--diag-mapping 0 #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (35 9 42 17)) s-matches\? 1 nil s-contains\? symbol-name alist-get] 8 "\n\n(fn TOKEN)"]] 17 (#$ . 6288)]) #@36 Go to selected symbol (fn INPUT0) (defalias 'helm-lsp-jump-to-error #[257 "\211\211A\262\242@\300!\210\301!b\207" [find-file lsp--position-to-point] 6 (#$ . 6934)]) #@56 Go to selected symbol and fix the action. (fn INPUT0) (defalias 'helm-lsp-quick-fix #[257 "\211\211A\262\242@\300!\210\301!b\210\302\303!\207" [find-file lsp--position-to-point call-interactively lsp-execute-code-action] 6 (#$ . 7111)]) (byte-code "\300\301\302\303\304\305%\210\300\306\307\303\304\305%\210\300\310\311\303\304\305%\210\312\313\314\315\316DD\317\320\321%\207" [custom-declare-face helm-lsp-diag-error ((t :inherit error)) "Face used for corresponding diag error level." :group lsp-faces helm-lsp-diag-info ((t :inherit success)) helm-lsp-diag-warning ((t :inherit warning)) custom-declare-variable helm-lsp-diag-face-map funcall function #[0 "\304B \305B\n\306B \306BF\207" [lsp/diagnostic-severity-error lsp/diagnostic-severity-warning lsp/diagnostic-severity-information lsp/diagnostic-severity-hint helm-lsp-diag-error helm-lsp-diag-warning helm-lsp-diag-info] 5] "Alist diagnostics to face." :type alist] 6) #@19 (fn CANDIDATES) (defalias 'helm-lsp--diagnostics-transform #[257 "\301!\302\303\304\305\306\"\"\"\207" [helm-pattern helm-mm-split-pattern -sort #[514 "\211A\262\242\300\301\302A@\"!\205\301\303\301\302A@\"\"\300!\205%\301\304\"\300!\205/\301\305\"\211A\262\242\300\301\302A@\"!\205J\301\303\301\302A@\"\"\300!\205T\301\304\"\300!\205^\301\305\"\230\203\202\204l\306\207\204r\307\207=\203}W\207W\207\231\207" [ht\? gethash "range" "start" "line" "character" t nil] 14 "\n\n(fn INPUT0 INPUT1)"] -keep make-closure #[257 "\211\211A\262\242\211A\262\242@\303\304\"\303\305\"\303\306\"\303\307\303\310\"\"\303\311\"\303\312\"\313 \300#\205{\314\315\316\317!\203G\317\320 \"!\202W\321\314\322\320 \"\"\323\320 \n\"#\321\314\324\n\"\323\325#\n\321\323\325#\321\314\326  #\323\325#& E\207" [V0 helm-lsp--diag-mapping helm-lsp-diag-face-map gethash "message" "source" "severity" "start" "range" "line" "character" helm-lsp--diag-matched format "%s%s %s %s %s%s" fboundp lsp-treemacs-get-icon alist-get propertize "[%s] " face "[%s]" lsp-details-face ":%s:%s"] 23 "\n\n(fn INPUT0)"]] 8 (#$ . 8053)]) #@36 Diagnostics using `helm' (fn ARG) (defalias 'helm-lsp-diagnostics #[257 "\300\301!\203\302\303\304\305#\210\306\301!\207\307\310\311\312\313\314\315C\316\317\320\321\322\323\324\325\326\327\330\331&\332\304\333\301&\207" [get-buffer "*helm-lsp-diagnostics*" run-with-timer 0 nil helm-update helm-resume helm :sources helm-make-source "Diagnostics" helm-source-sync :mode-line "Diagnostics(s)" :candidates #[0 "\300\301\302\303\304 \"\"\207" [apply append ht-map #[514 "\300\301\302\303!\211\203\304\"\202\262#\"\207" [-map -partial list lsp-workspace-root f-relative] 10 "\n\n(fn FILE V)"] lsp-diagnostics] 5] :action (("Goto diagnostic" . helm-lsp-jump-to-error) ("Quick fix" . helm-lsp-quick-fix)) :persistent-action helm-lsp-jump-to-error :match #[128 "\300\207" [t] 2 "\n\n(fn &rest _)"] :volatile t :candidate-transformer helm-lsp--diagnostics-transform :candidate-number-limit :buffer] 20 (#$ . 9235) "P"]) (provide 'helm-lsp)