;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\210\300\306!\210\300\307!\210\300\310!\207" [require cider-client cider-common subr-x cider-compat cider-util nrepl-dict seq eldoc] 2) #@59 Extra commands to be added to eldoc's safe commands list. (defvar cider-extra-eldoc-commands '("yas-expand") (#$ . 296)) (byte-code "\300\301\302\303\304DD\305\306\307\310\311\312\313& \207" [custom-declare-variable cider-eldoc-max-num-sexps-to-skip funcall function #[0 "\300\207" [30] 1] "The maximum number of sexps to skip while searching the beginning of current sexp." :type integer :group cider :package-version (cider . "0.10.1")] 10) #@55 The eldoc information for the last symbol we checked. (defvar cider-eldoc-last-symbol nil (#$ . 745)) (byte-code "\300\301!\210\302\303\304\305\306DD\307\310\311\312\313\314\315& \210\302\316\304\305\317DD\320\310\321\322\323\312\313\314\324& \210\302\325\304\305\326DD\327\310\330\322\331\312\313\314\332& \210\302\333\304\305\334DD\335\310\330\312\313\314\336& \207" [make-variable-buffer-local cider-eldoc-last-symbol custom-declare-variable cider-eldoc-ns-function funcall function #[0 "\300\207" [identity] 1] "A function that returns a ns string to be used by eldoc.\nTakes one argument, a namespace name.\nFor convenience, some functions are already provided for this purpose:\n`cider-abbreviate-ns', and `cider-last-ns-segment'." :type (choice (const :tag "Full namespace" identity) (const :tag "Abbreviated namespace" cider-abbreviate-ns) (const :tag "Last name in namespace" cider-last-ns-segment) (function :tag "Custom function")) :group cider :package-version (cider . "0.13.0") cider-eldoc-max-class-names-to-display #[0 "\300\207" [3] 1] "The maximum number of classes to display in an eldoc string.\nAn eldoc string for Java interop forms can have a number of classes prefixed to\nit, when the form belongs to more than 1 class. When, not nil we only display\nthe names of first `cider-eldoc-max-class-names-to-display' classes and add\na \"& x more\" suffix. Otherwise, all the classes are displayed." integer :safe integerp (cider . "0.13.0") cider-eldoc-display-for-symbol-at-point #[0 "\300\207" [t] 1] "When non-nil, display eldoc for symbol at point if available.\nSo in (map inc ...) when the cursor is over inc its eldoc would be\ndisplayed. When nil, always display eldoc for first symbol of the sexp." boolean booleanp (cider . "0.13.0") cider-eldoc-display-context-dependent-info #[0 "\300\207" [nil] 1] "When non-nil, display context dependent info in the eldoc where possible.\nCIDER will try to add expected function arguments based on the current context,\nfor example for the datomic.api/q function where it will show the expected\ninputs of the query at point." (cider . "0.15.0")] 12) #@344 Return a formatted CLASS-NAMES prefix string. CLASS-NAMES is a list of classes to which a Java interop form belongs. Only keep the first `cider-eldoc-max-class-names-to-display' names, and add a "& x more" suffix. Return nil if the CLASS-NAMES list is empty or mapping `cider-eldoc-ns-function' on it returns an empty list. (fn CLASS-NAMES) (defalias 'cider--eldoc-format-class-names #[257 "\302\303\304\305!\"\"\211\205\211G\211\205N \2033\211 V\2033\306\307\310\311 \"\312\313\314#\266\202\315\" Z#\207\211\316V\203I\306\317\310\312\313\314#\266\202\315\"\"\207\306\320@\"\207" [cider-eldoc-ns-function cider-eldoc-max-class-names-to-display seq-remove null mapcar apply-partially format "(%s & %s more)" cider-propertize seq-take " " mapconcat identity ns 1 "(%s)" "%s"] 12 (#$ . 2873)]) #@359 Format the eldoc subject defined by NS, SYMBOL, THING and TYPE. THING represents the thing at point which triggered eldoc. Normally NS and SYMBOL are used (they are derived from THING), but when empty we fallback to THING (e.g. for Java methods). Format it as a function, if FUNCTION-P is non-nil. Else format it as a variable. (fn NS SYMBOL THING TYPE) (defalias 'cider-eldoc-format-thing #[1028 "\203\301\230\204\202\211\205\302\"\211\205/\203+;\203+!\202/\303!\211\203H\304\305\306\307\310#\203A\202E\302\311\"#\207\207" [cider-eldoc-ns-function "" cider-propertize cider--eldoc-format-class-names format "%s/%s" get-text-property 1 face ns] 13 (#$ . 3689)]) #@641 Return the formatted eldoc string for VAR and DOCSTRING. Consider the value of `eldoc-echo-area-use-multiline-p' while formatting. If the entire line cannot fit in the echo area, the var name may be truncated or eliminated entirely from the output to make room for the description. Try to truncate the var with various strategies, so that the var and the docstring can be displayed in the minibuffer without resizing the window. We start with `cider-abbreviate-ns' and `cider-last-ns-segment'. Next, if the var is in current namespace, we remove NS from the eldoc string. Otherwise, only the docstring is returned. (fn VAR NS DOCSTRING) (defalias 'cider-eldoc-format-sym-doc #[771 "\302\303 !SGG\\Z\304\305\306\307#)\266\203GZ\310Z\306=\204?\311X\2030\203?\203GGV\204?\203G\312\313 #\207\203X\314\311O#\207GV\203d\311O\207\315!GX\203x\312\313\315\n!#\207\316!GX\203\214\312\313\316\n!#\207\317 \230\203\260GGZX\203\260\312\313\320\312\321 \"\322\f##\207\207" [eldoc-echo-area-use-multiline-p inhibit-changing-match-data window-width minibuffer-window "\n" nil t string-match 2 0 format "%s: %s" cider-eldoc-format-sym-doc cider-abbreviate-ns cider-last-ns-segment cider-current-ns replace-regexp-in-string "%s/" ""] 14 (#$ . 4395)]) #@161 Return the formatted eldoc string for a variable. THING is the variable name. ELDOC-INFO is a p-list containing the eldoc information. (fn THING ELDOC-INFO) (defalias 'cider-eldoc-format-variable #[514 "\300\301\"\300\302\"\300\303\"\304\305$\205\306#\207" [lax-plist-get "ns" "symbol" "docstring" cider-eldoc-format-thing var cider-eldoc-format-sym-doc] 10 (#$ . 5708)]) #@218 Return the formatted eldoc string for a function. THING is the function name. POS is the argument-index of the functions arglists. ELDOC-INFO is a p-list containing the eldoc information. (fn THING POS ELDOC-INFO) (defalias 'cider-eldoc-format-function #[771 "\300\301\"\300\302\"\300\303\"\304\305\306\n\307$\310 \"#\207" [lax-plist-get "ns" "symbol" "arglists" format "%s: %s" cider-eldoc-format-thing fn cider-eldoc-format-arglist] 13 (#$ . 6103)]) #@118 Format the the function ARGLIST for eldoc. POS is the index of the currently highlighted argument. (fn ARGLIST POS) (defalias 'cider-highlight-args #[514 "\300!\301C\302\303\304$\305#\207" [cider--find-rest-args-position 0 mapconcat make-closure #[257 "\303\304\"\305\230\203 \207\302\242T\300U\204%\301\203-\302\242T\301V\203-\300\301V\203-\306\307\310#\202.\211\302\211\242T\240\210\207" [V0 V1 V2 format "%s" "&" propertize face eldoc-highlight-function-argument] 6 "\n\n(fn ARG)"] " "] 10 (#$ . 6573)]) #@61 Find the position of & in the ARGLIST vector. (fn ARGLIST) (defalias 'cider--find-rest-args-position #[257 "\300\301\"\207" [seq-position "&"] 4 (#$ . 7101)]) #@96 Format the ARGLIST for eldoc. POS is the index of the argument to highlight. (fn ARGLIST POS) (defalias 'cider-highlight-arglist #[514 "\300\301\"\302Q\207" ["[" cider-highlight-args "]"] 6 (#$ . 7268)]) #@91 Format all the ARGLIST for eldoc. POS is the index of current argument. (fn ARGLIST POS) (defalias 'cider-eldoc-format-arglist #[514 "\300\301\302\303\"\304#\305Q\207" ["(" mapconcat make-closure #[257 "\301\300\"\207" [V0 cider-highlight-arglist] 4 "\n\n(fn ARGS)"] " " ")"] 7 (#$ . 7481)]) #@167 Move to the beginning of current sexp. Return the number of nested sexp the point was over or after. Return nil if the maximum number of sexps to skip is exceeded. (defalias 'cider-eldoc-beginning-of-sexp #[0 "\302\303\3041Q\3051&`\306\307!\210\306\310!\210`W\205\310\211\262\2620\210\202)\311\266`\306\307!\210`W\205D \205; Y?\205AT\211\262\262\205L\202)0\210\202T\311\266)\207" [parse-sexp-ignore-comments cider-eldoc-max-num-sexps-to-skip t 0 (error) (error) forward-sexp -1 1 nil] 5 (#$ . 7784)]) #@111 Return the type of the ELDOC-INFO being displayed by eldoc. It can be a function or var now. (fn ELDOC-INFO) (defalias 'cider-eldoc-thing-type #[257 "\300\301\"\211\302\267\202\303\207\304\207\305\207\306\207\307\207\310\207" [lax-plist-get "type" #s(hash-table size 5 test equal rehash-size 1.5 rehash-threshold 0.8125 purecopy t data ("function" 10 "special-form" 12 "macro" 14 "method" 16 "variable" 18)) fn special-form macro method var nil] 4 (#$ . 8317)]) #@219 Return eldoc info at point. First go to the beginning of the sexp and check if the eldoc is to be considered (i.e sexp is a method call) and not a map or vector literal. Then go back to the point and return its eldoc. (defalias 'cider-eldoc-info-at-point #[0 "\212\300 ?\2057`\301 \210`\206`Sf\206\302\303>?\2055\211b\210\304\305\306 !!\211\2053\307\310\306 \311BBBB\262\262)\207" [cider-in-comment-p cider-eldoc-beginning-of-sexp 0 (34 123 91) cider-eldoc-info cider--eldoc-remove-dot cider-symbol-at-point "eldoc-info" "thing" ("pos" 0)] 7 (#$ . 8790)]) #@49 Return eldoc info for first symbol in the sexp. (defalias 'cider-eldoc-info-at-sexp-beginning #[0 "\212\300 \211\205 \301S]\211\205;`\206`Sf\206\301\302>\206!\303 ?\205;\304\305\306 !!\211\2059\307\310\306 \311\257\262\266\202)\207" [cider-eldoc-beginning-of-sexp 0 (34 123 91) cider-in-comment-p cider-eldoc-info cider--eldoc-remove-dot cider-symbol-at-point "eldoc-info" "thing" "pos"] 9 (#$ . 9362)]) #@222 Return eldoc information from the sexp. If `cider-eldoc-display-for-symbol-at-poin' is non-nil and the symbol at point has a valid eldoc available, return that. Otherwise return the eldoc of the first symbol of the sexp. (defalias 'cider-eldoc-info-in-current-sexp #[0 "\203 \301 \206 \302 \207" [cider-eldoc-display-for-symbol-at-point cider-eldoc-info-at-point cider-eldoc-info-at-sexp-beginning] 1 (#$ . 9788)]) #@82 Convert THING values that match ns macro keywords to function names. (fn THING) (defalias 'cider-eldoc--convert-ns-keywords #[257 "\211\300\267\207\301\207\302\207\303\207\304\207\207" [#s(hash-table size 4 test equal rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (":import" 4 ":refer-clojure" 6 ":use" 8 ":refer" 10)) "clojure.core/import" "clojure.core/refer-clojure" "clojure.core/use" "clojure.core/refer"] 3 (#$ . 10212)]) #@105 Return the info for THING. This includes the arglist and ns and symbol name (if available). (fn THING) (defalias 'cider-eldoc-info #[257 "\303!\304\305!\205\211\205\211\306\307\310\311#)\266\204?\205\312\313\"?\205\312\314\"?\205\312\315\"?\205\316\307\310\311#)\266\203?\205\312\317\"\203X\320\321\322\323\324\257\207\325\307\310\311#)\266\203\203q\320\321\322\323\326\257\207\211 @\232\203| A@\207\327!\211\205\330\305\"\330\331\"\330\321\"\330\332\"\330\333\"\330\334\"\330\335\"\203\257\336\230\204\257\202\260\203\276\336\230\204\276\202\302\337\340\"\332\320\323 \331\321\257\n\n\203\375\341\232\203\363\342\232\203\363\343\323\"\344\323\345!#\266\266\211\202 D\266\211\202 D\266\211\262\207" [inhibit-changing-match-data cider-eldoc-last-symbol cider-eldoc-display-context-dependent-info cider-eldoc--convert-ns-keywords cider-nrepl-op-supported-p "eldoc" "\\`[ \n ]*\\'" nil t string-match string-prefix-p "\"" "#" "\\" "^[0-9]" ":" "symbol" "type" "function" "arglists" (("map") ("map" "not-found")) "^[A-Z].+\\.$" (("args*")) cider-sync-request:eldoc nrepl-dict-get "docstring" "ns" "class" "name" "member" "" format ".%s" "datomic.api" "q" lax-plist-get lax-plist-put cider--eldoc-add-datomic-query-inputs-to-arglists] 22 (#$ . 10658)]) #@158 Remove the preceding "." from a namespace qualified SYM and return sym. Only useful for interop forms. Clojure forms would be returned unchanged. (fn SYM) (defalias 'cider--eldoc-remove-dot #[257 "\211\205 \300\301\302#\207" [replace-regexp-in-string "/\\." "/"] 5 (#$ . 12009)]) #@70 Check whether FILE-NAME is representing an EDN file. (fn FILE-NAME) (defalias 'cider--eldoc-edn-file-p #[257 "\211\205 \300!\301\232\207" [file-name-extension "edn"] 3 (#$ . 12299)]) #@78 Add the expected inputs of the datomic query to the ARGLISTS. (fn ARGLISTS) (defalias 'cider--eldoc-add-datomic-query-inputs-to-arglists #[257 "\300 \203\"\300 \301\302!\303\"\211\203 \304\305\303\305\306@\"\"@\"C\207\207\207" [cider-second-sexp-in-list nrepl-dict-get cider-sync-request:eldoc-datomic-query "inputs" append remove "&"] 9 (#$ . 12491)]) #@88 Backend function for eldoc to show argument list in the echo area. (fn &rest IGNORED) (defalias 'cider-eldoc #[128 "\302 \2059\303>?\2059\304 !?\2059\305 \306\307\"\306\310\"\306\311\"\2057\312!\313=\2032\314\"\207\315#\266\204\207" [last-command buffer-file-name cider-connected-p (next-error previous-error) cider--eldoc-edn-file-p cider-eldoc-info-in-current-sexp lax-plist-get "eldoc-info" "pos" "thing" cider-eldoc-thing-type var cider-eldoc-format-variable cider-eldoc-format-function] 9 (#$ . 12858)]) #@94 Setup eldoc in the current buffer. eldoc mode has to be enabled for this to have any effect. (defalias 'cider-eldoc-setup #[0 "\302\303!\203\304\303\305\306\307$\210\202\310\300!\210\305\311\312 \"\207" [eldoc-documentation-function cider-extra-eldoc-commands boundp eldoc-documentation-functions add-hook cider-eldoc nil t make-local-variable apply eldoc-add-command] 5 (#$ . 13390)]) (provide 'cider-eldoc)