;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\300\303!\210\304\305\306\307\310\311\312\301\313\314& \210\315\316\317\306#\210\320\211\203A\211@\316N\203:\317N\204:\321\317\316N#\210A\266\202\202 \210\322\316\317\323#\210\324\317\325\326\327DD\330\312\305\331\332\333\334& \210\324\335\325\326\336DD\337\333\340\312\305\341\342& \210\324\343\325\326\344DD\345\333\346\312\305\341\347& \210\324\350\325\326\351DD\352\312\305\331\332\333\353& \210\324\354\325\326\355DD\356\312\305\331\332\333\353& \207" [require lsp-mode lsp-protocol cl-lib custom-declare-group lsp-clojure nil "LSP support for Clojure." :link (url-link "https://github.com/snoe/clojure-lsp") :group :tag "Lsp Clojure" defvaralias lsp-clojure-server-command lsp-clojure-custom-server-command (saved-value saved-variable-comment) put make-obsolete-variable "lsp-mode 7.1" custom-declare-variable funcall function #[0 "\300\207" [nil] 1] "The clojure-lisp server command." :risky t :type (repeat string) lsp-clojure-server-download-url #[0 "\301\302\303\267\202\304\202\305\202\306\202\307\"\207" [system-type format "https://github.com/clojure-lsp/clojure-lsp/releases/latest/download/clojure-lsp-native-%s-amd64.zip" #s(hash-table size 3 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (gnu/linux 8 darwin 12 windows-nt 16)) "linux" "macos" "windows" nil] 4] "Automatic download url for lsp-clojure." string :package-version (lsp-mode . "7.1") lsp-clojure-server-store-path #[0 "\302\303 \304=\203 \305\202\306#\207" [lsp-server-install-dir system-type f-join "clojure" windows-nt "clojure-lsp.exe" "clojure-lsp"] 5] "The path to the file in which `clojure-lsp' will be stored." file (lsp-mode . "7.1") lsp-clojure-workspace-dir #[0 "\300\301\302!!\207" [expand-file-name locate-user-emacs-file "workspace/"] 3] "LSP clojure workspace directory." directory lsp-clojure-workspace-cache-dir #[0 "\301\302\"\207" [lsp-clojure-workspace-dir expand-file-name ".cache/"] 3] "LSP clojure workspace cache directory."] 10) #@19 (fn KEY SOURCE) (defalias 'dash-expand:&Clojure:CursorInfoParams #[514 "\300>\204\301\302\303!\"\204\304\305\306#\210\307\301\302\303!\"\203(\303!\310\311O\2022\303\312\313\"A!\310\311OE\207" [(:text-document :position) s-starts-with\? ":_" symbol-name error "Unknown key: %s. Available keys: %s" (:text-document :position) gethash 1 nil assoc ((:text-document . :textDocument) (:position . :position))] 7 (#$ . 2099)]) #@19 (fn KEY SOURCE) (defalias 'dash-expand:&Clojure:CursorInfoParams\? #[514 "\300>\204\f\301\302\303#\210\304\305D\306\307\310\311\"A!\312\313OEE\207" [(:text-document :position) error "Unknown key: %s. Available keys: %s" (:text-document :position) when ht\? gethash symbol-name assoc ((:text-document . :textDocument) (:position . :position)) 1 nil] 9 (#$ . 2541)]) #@15 (fn OBJECT) (defalias 'lsp-clojure-cursor-info-params\? #[257 "\300!\203\301\302!\303\304\"\262\305\"\207\211<\205\301\303\306\"\307\"\207" [ht\? -all\? ht-keys make-closure #[257 "\211\300\235\207" [V0] 3 "\n\n(fn PROP)"] ("textDocument" "position") #[257 "\301\300\"\207" [V0 plist-member] 4 "\n\n(fn PROP)"] (:textDocument :position)] 6 (#$ . 2922)]) #@66 (fn &rest PLIST &key TEXT-DOCUMENT POSITION &allow-other-keys) (defalias 'lsp-make-clojure-cursor-info-params #[128 "\300\301\"A@\300\302\"A@\303\304\305\"\211\262\306\307\310\"\311\312\"\"\210\207" [plist-member :text-document :position make-hash-table :test equal mapc make-closure #[257 "\211\211A\262\242@\301\302\303\304\"A\206!\300#\207" [V0 puthash lsp-keyword->string assoc ((:text-document . :textDocument) (:position . :position))] 9 "\n\n(fn INPUT0)"] -partition 2] 9 (#$ . 3294)]) #@32 (fn &rest PROPERTY-BINDINGS) (defalias 'Clojure:CursorInfoParams--pcase-macroexpander #[128 "\300\301\302\303\304\305\"\306\203z\211A\262\242\211A\262\242\306\307\310\311\"\206+\312\313\314!\315#!\316!9\205@?\206@\317\320\314!\"\211\203^\321\322\323\324\325EEEB\262A\262 \266\202 \321\322\326\324\325EEEB\262AA\262 \266\202 \262\"BB\207" [and (pred ht\?) append -map #[257 "\300\301\302\303\304\305!EED\207" [pred lambda (hash-table) ht-contains\? hash-table lsp-keyword->string] 8 "\n\n(fn KEY)"] (:textDocument :position) nil lsp-keyword->string alist-get ((:text-document . :textDocument) (:position . :position)) error "Unknown key: %s. Available keys: %s" symbol-name (:text-document :position) lsp-keyword->symbol s-starts-with\? ":" app lambda (hash-table) ht-get hash-table (hash-table)] 20 (#$ . 3809)]) (byte-code "\300\301\302\303#\300\304\305\301#\303\207" [define-symbol-prop Clojure:CursorInfoParams--pcase-macroexpander edebug-form-spec nil Clojure:CursorInfoParams pcase-macroexpander] 5) #@15 (fn OBJECT) (defalias 'lsp:clojure-cursor-info-params-text-document #[257 "\300!\205\n\301\302\"\207" [ht\? gethash "textDocument"] 4 (#$ . 4867)]) #@21 (fn OBJECT VALUE) (defalias 'lsp:set-clojure-cursor-info-params-text-document #[514 "\300\301#\210\207" [puthash "textDocument"] 6 (#$ . 5026)]) #@15 (fn OBJECT) (defalias 'lsp:clojure-cursor-info-params-position #[257 "\300!\205\n\301\302\"\207" [ht\? gethash "position"] 4 (#$ . 5182)]) #@21 (fn OBJECT VALUE) (defalias 'lsp:set-clojure-cursor-info-params-position #[514 "\300\301#\210\207" [puthash "position"] 6 (#$ . 5332)]) (lsp-dependency 'clojure-lsp '(:download :url lsp-clojure-server-download-url :decompress :zip :store-path lsp-clojure-server-store-path :set-executable\? t) '(:system "clojure-lsp")) #@84 Send an executeCommand request for COMMAND with ARGS. (fn COMMAND &optional ARGS) (defalias 'lsp-clojure--execute-command #[513 "\300 \210\301\302\303\"\"\207" [lsp--cur-workspace-check lsp-send-execute-command apply vector] 7 (#$ . 5663)]) #@186 Send an executeCommand request for REFACTOR-NAME with ADDITIONAL-ARGS. If there are more arguments expected after the line and column numbers. (fn REFACTOR-NAME &rest ADDITIONAL-ARGS) (defalias 'lsp-clojure--refactoring-call #[385 "\300 \210\301\302 \303 SiBBB\"\207" [lsp--cur-workspace-check lsp-clojure--execute-command lsp--buffer-uri line-number-at-pos] 8 (#$ . 5914)]) #@55 Add to IMPORT-NAME to :import form. (fn IMPORT-NAME) (defalias 'lsp-clojure-add-import-to-namespace #[257 "\300\301\"\207" [lsp-clojure--refactoring-call "add-import-to-namespace"] 4 (#$ . 6298) "MImport name: "]) #@49 Apply add-missing-libspec refactoring at point. (defalias 'lsp-clojure-add-missing-libspec #[0 "\300\301!\207" [lsp-clojure--refactoring-call "add-missing-libspec"] 2 (#$ . 6520) nil]) #@38 Apply clean-ns refactoring at point. (defalias 'lsp-clojure-clean-ns #[0 "\300\301!\207" [lsp-clojure--refactoring-call "clean-ns"] 2 (#$ . 6711) nil]) #@40 Apply cycle-coll refactoring at point. (defalias 'lsp-clojure-cycle-coll #[0 "\300\301!\207" [lsp-clojure--refactoring-call "cycle-coll"] 2 (#$ . 6869) nil]) #@43 Apply cycle-privacy refactoring at point. (defalias 'lsp-clojure-cycle-privacy #[0 "\300\301!\207" [lsp-clojure--refactoring-call "cycle-privacy"] 2 (#$ . 7033) nil]) #@40 Apply expand-let refactoring at point. (defalias 'lsp-clojure-expand-let #[0 "\300\301!\207" [lsp-clojure--refactoring-call "expand-let"] 2 (#$ . 7206) nil]) #@81 Move form at point into a new function named FUNCTION-NAME. (fn FUNCTION-NAME) (defalias 'lsp-clojure-extract-function #[257 "\300\301\"\207" [lsp-clojure--refactoring-call "extract-function"] 4 (#$ . 7370) "MFunction name: "]) #@43 Apply inline-symbol refactoring at point. (defalias 'lsp-clojure-inline-symbol #[0 "\300\301!\207" [lsp-clojure--refactoring-call "inline-symbol"] 2 (#$ . 7606) nil]) #@79 Move form at point into a new let binding as BINDING-NAME. (fn BINDING-NAME) (defalias 'lsp-clojure-introduce-let #[257 "\300\301\"\207" [lsp-clojure--refactoring-call "introduce-let"] 4 (#$ . 7779) "MBinding name: "]) #@90 Move form at point into nearest existing let binding as BINDING-NAME. (fn BINDING-NAME) (defalias 'lsp-clojure-move-to-let #[257 "\300\301\"\207" [lsp-clojure--refactoring-call "move-to-let"] 4 (#$ . 8006) "MBinding name: "]) #@42 Apply thread-first refactoring at point. (defalias 'lsp-clojure-thread-first #[0 "\300\301!\207" [lsp-clojure--refactoring-call "thread-first"] 2 (#$ . 8240) nil]) #@46 Apply thread-first-all refactoring at point. (defalias 'lsp-clojure-thread-first-all #[0 "\300\301!\207" [lsp-clojure--refactoring-call "thread-first-all"] 2 (#$ . 8410) nil]) #@41 Apply thread-last refactoring at point. (defalias 'lsp-clojure-thread-last #[0 "\300\301!\207" [lsp-clojure--refactoring-call "thread-last"] 2 (#$ . 8592) nil]) #@45 Apply thread-last-all refactoring at point. (defalias 'lsp-clojure-thread-last-all #[0 "\300\301!\207" [lsp-clojure--refactoring-call "thread-last-all"] 2 (#$ . 8759) nil]) #@40 Apply unwind-all refactoring at point. (defalias 'lsp-clojure-unwind-all #[0 "\300\301!\207" [lsp-clojure--refactoring-call "unwind-all"] 2 (#$ . 8938) nil]) #@43 Apply unwind-thread refactoring at point. (defalias 'lsp-clojure-unwind-thread #[0 "\300\301!\207" [lsp-clojure--refactoring-call "unwind-thread"] 2 (#$ . 9102) nil]) #@22 Request server info. (defalias 'lsp-clojure-server-info #[0 "\300 \210\301\302\303\"\207" [lsp--cur-workspace-check lsp-notify "clojure/serverInfo/log" nil] 3 (#$ . 9275) nil]) #@31 Request server info raw data. (defalias 'lsp-clojure-server-info-raw #[0 "\300 \210\301\302\303\304\305\306\"\307\306\310\311%\"\207" [lsp--cur-workspace-check message "%s" json-serialize lsp-request "clojure/serverInfo/raw" nil :null-object :false-object :json-false] 8 (#$ . 9458) nil]) #@31 Request cursor info at point. (defalias 'lsp-clojure-cursor-info #[0 "\300 \210\301\302\303\304\305\306\307 \"\310\311\312\313 S\314i$$\"\207" [lsp--cur-workspace-check lsp-notify "clojure/cursorInfo/log" lsp-make-clojure-cursor-info-params :textDocument lsp-make-text-document-identifier :uri lsp--buffer-uri :position lsp-make-position :line line-number-at-pos :character] 11 (#$ . 9753) nil]) #@35 Ask to user the macro to resolve. (defalias 'lsp-clojure--ask-macro-to-resolve #[0 "\300\301\302\303\304\305%\207" [lsp--completing-read "Select how LSP should resolve this macro:" ("clojure.core/def" "clojure.core/defn" "clojure.core/let" "clojure.core/for" "clojure.core/->" "clojure.core/->>" "clj-kondo.lint-as/def-catch-all") identity nil t] 6 (#$ . 10155)]) #@44 Ask to user the clj-kondo config dir path. (defalias 'lsp-clojure--ask-clj-kondo-config-dir #[0 "\300\301\302\303\304!\305\"\302\306 \206\307\310\"D\311\312\313%\207" [lsp--completing-read "Select where LSP should save this setting:" f-join expand-file-name "~/" ".config/clj-kondo/config.edn" lsp-workspace-root "project" ".clj-kondo/config.edn" identity nil t] 6 (#$ . 10525)]) #@58 Ask to user how the unresolved macro should be resolved. (defalias 'lsp-clojure-resolve-macro-as #[0 "\300 \210\301\302\303 \304 Si\305 \306 \257\"\207" [lsp--cur-workspace-check lsp-clojure--execute-command "resolve-macro-as" lsp--buffer-uri line-number-at-pos lsp-clojure--ask-macro-to-resolve lsp-clojure--ask-clj-kondo-config-dir] 7 (#$ . 10913) nil]) #@78 Intercept resolve-macro-as command and send all necessary data. (fn INPUT0) (defalias 'lsp-clojure--resolve-macro-as #[257 "\300\301\"\300\302\"\303 \304 \305\306D\"\"\207" [gethash "command" "arguments" lsp-clojure--ask-macro-to-resolve lsp-clojure--ask-clj-kondo-config-dir lsp-clojure--execute-command append] 11 (#$ . 11276)]) #@47 Ensure that directory PATH exists. (fn PATH) (defalias 'lsp-clojure--ensure-dir #[257 "\300!?\205 \301\302\"\207" [file-directory-p make-directory t] 4 (#$ . 11620)]) #@97 Given a FILE-LOCATION return the file containing the metadata for the file. (fn FILE-LOCATION) (defalias 'lsp-clojure--get-metadata-location #[257 "\300\301\302!\303!#\207" [format "%s.%s.metadata" file-name-directory file-name-base] 6 (#$ . 11797)]) #@66 Check URI for a valid jar and include it in workspace. (fn URI) (defalias 'lsp-clojure--file-in-jar #[257 "\302\303\"\210\304\305\"\306\307\310#P\311!\204q\312\313!!\210\314\315\316\"\317\320\321\322D\"!\323\324\325\"\326\327\"\216r\211q\210c\210)r\211q\210\330\316\211\316\331%\210*\266\332!\323\324\325\"\326\333\"\216r\211q\210c\210)r\211q\210\330\316\211\316\331%\210*\266)\207" [lsp-clojure-workspace-cache-dir lsp--cur-workspace string-match "^\\(jar\\|zip\\):\\(file:.+\\)!/\\(.+\\)" match-string 3 s-replace "/" "." file-readable-p lsp-clojure--ensure-dir file-name-directory lsp-find-workspace clojure-lsp nil lsp-send-request lsp-make-request "clojure/dependencyContents" :uri generate-new-buffer " *temp file*" t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] write-region 0 lsp-clojure--get-metadata-location #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2]] 13 (#$ . 12057)]) #@40 Return the clojure-lsp server command. (defalias 'lsp-clojure--server-executable-path #[0 "\300\301!\206 \302\303!\207" [executable-find "clojure-lsp" lsp-package-path clojure-lsp] 2 (#$ . 13026)]) (byte-code "\300\301\302\303\304\305\306\307\310\311\"\312\313\314\315\316\317\320\321\"\322\323\324#\210\211\262\325\317\320\321\"\322\326\327#\210\211\262\330\331\332\333&!\207" [lsp-register-client make-lsp-client :download-server-fn #[1028 "\300\301#\207" [lsp-package-ensure clojure-lsp] 8 "\n\n(fn CLIENT CALLBACK ERROR-CALLBACK UPDATE\\=\\?)"] :semantic-tokens-faces-overrides (:types (("macro" . font-lock-keyword-face) ("keyword" . clojure-keyword-face))) :new-connection lsp-stdio-connection #[0 "\206\301 C\207" [lsp-clojure-custom-server-command lsp-clojure--server-executable-path] 1] #[0 "\206\301 \207" [lsp-clojure-custom-server-command lsp-clojure--server-executable-path] 1] :major-modes (clojure-mode clojurec-mode clojurescript-mode) :library-folders-fn #[257 "C\207" [lsp-clojure-workspace-cache-dir] 2 "\n\n(fn WORKSPACE)"] :uri-handlers make-hash-table :test equal puthash "jar" lsp-clojure--file-in-jar :action-handlers "resolve-macro-as" lsp-clojure--resolve-macro-as :initialization-options (:dependency-scheme "jar") :server-id clojure-lsp] 20) (defconst lsp-clojure-plist-value-when-compiled nil) (provide 'lsp-clojure)