;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\310\311\312\313\314DD\315\316\317\320\321\322\323& \210\310\324\312\313\325DD\326\316\317\320\321\322\327& \210\310\330\312\313\331DD\332\316\313\320\321\322\333& \210\310\334\312\313\335DD\336\316\337\320\321\322\340& \210\310\341\312\313\342DD\343\316\344\320\321\322\345& \207" [require subr-x thingatpt cider-client cider-common cider-doc cider-eldoc nrepl-dict custom-declare-variable cider-completion-use-context funcall function #[0 "\300\207" [t] 1] "When true, uses context at point to improve completion suggestions." :type boolean :group cider :package-version (cider . "0.7.0") cider-annotate-completion-candidates #[0 "\300\207" [t] 1] "When true, annotate completion candidates with some extra information." (cider . "0.8.0") cider-annotate-completion-function #[0 "\300\207" [cider-default-annotate-completion-function] 1] "Controls how the annotations for completion candidates are formatted.\nMust be a function that takes two arguments: the abbreviation of the\ncandidate type according to `cider-completion-annotations-alist' and the\ncandidate's namespace." (cider . "0.9.0") cider-completion-annotations-alist #[0 "\300\207" [(("class" "c") ("field" "fi") ("function" "f") ("import" "i") ("keyword" "k") ("local" "l") ("macro" "m") ("method" "me") ("namespace" "n") ("protocol" "p") ("protocol-function" "pf") ("record" "r") ("special-form" "s") ("static-field" "sf") ("static-method" "sm") ("type" "t") ("var" "v"))] 1] "Controls the abbreviations used when annotating completion candidates.\n\nMust be a list of elements with the form (TYPE . ABBREVIATION), where TYPE\nis a possible value of the candidate's type returned from the completion\nbackend, and ABBREVIATION is a short form of that type." (alist :key-type string :value-type string) (cider . "0.9.0") cider-completion-annotations-include-ns #[0 "\300\207" [unqualified] 1] "Controls passing of namespaces to `cider-annotate-completion-function'.\n\nWhen set to 'always, the candidate's namespace will always be passed if it\nis available. When set to 'unqualified, the namespace will only be passed\nif the candidate is not namespace-qualified." (choice (const always) (const unqualified) (const :tag "never" nil)) (cider . "0.9.0")] 10) (defvar cider-completion-last-context nil) #@76 Find the starting position of the symbol at point, unless inside a string. (defalias 'cider-completion-symbol-start-pos #[0 "\300 \211\205\301\302 8?\205\303\304!@\207" [symbol-at-point 3 syntax-ppss bounds-of-thing-at-point symbol] 3 (#$ . 2458)]) #@157 Extract the context at point. If point is not inside the list, returns nil; otherwise return "top-level" form, with symbol at point replaced by __prefix__. (defalias 'cider-completion-get-context-at-point #[0 "\212\3001\3011\302 \210\303 \210\30400\2020\305\262\202\305\262)\205D\212`\306 \307 \305\310 \210`\2058\311ZO\312Z\305OQ\266\205)\207" [(user-error) (scan-error) up-list check-parens t nil cider-completion-symbol-start-pos cider-defun-at-point beginning-of-defun 0 "__prefix__"] 10 (#$ . 2718)]) #@77 Extract context depending on `cider-completion-use-context' and major mode. (defalias 'cider-completion-get-context #[0 "\203\302\303!\203\3041\305 0\202\210\202\206 \306\202 \306 \230\203(\307\207\211\207" [cider-completion-use-context cider-completion-last-context derived-mode-p clojure-mode (error) cider-completion-get-context-at-point "nil" ":same"] 3 (#$ . 3250)]) #@101 Get "candidate" from CANDIDATE-MAP. Put type and ns properties on the candidate (fn CANDIDATE-MAP) (defalias 'cider-completion--parse-candidate-map #[257 "\300\301\"\300\302\"\300\303\"\304\305\306\307%\210\304\305\306\310%\210\207" [nrepl-dict-get "candidate" "type" "ns" put-text-property 0 1 type ns] 10 (#$ . 3645)]) #@222 Complete PREFIX with context at point. Completion relies on nREPL middleware. First we check if cider-nrepl's complete op is available and afterward we fallback on nREPL's built-in completion functionality. (fn PREFIX) (defalias 'cider-complete #[257 "\300 \204\301\207\302\303!\203\304 \305\"\306\307\"\207\302\310!\203%\306\307\311!\"\207\301\207" [cider-connected-p nil cider-nrepl-op-supported-p "complete" cider-completion-get-context cider-sync-request:complete mapcar cider-completion--parse-candidate-map "completions" cider-sync-request:completion] 6 (#$ . 3984)]) #@45 Get candidate type for SYMBOL. (fn SYMBOL) (defalias 'cider-completion--get-candidate-type #[257 "\301\302\303#\304\"A@\206\211\207" [cider-completion-annotations-alist get-text-property 0 type assoc] 5 (#$ . 4575)]) #@43 Get candidate ns for SYMBOL. (fn SYMBOL) (defalias 'cider-completion--get-candidate-ns #[257 "\301=\204\302=\205\303!?\205\304\305\306#\207" [cider-completion-annotations-include-ns always unqualified cider-namespace-qualified-p get-text-property 0 ns] 5 (#$ . 4804)]) #@61 Get completion function based on TYPE and NS. (fn TYPE NS) (defalias 'cider-default-annotate-completion-function #[514 "\211\205\300\301\"\205\300\302\"P\207" [format " (%s)" " <%s>"] 6 (#$ . 5090)]) #@474 Return a string suitable for annotating SYMBOL. If SYMBOL has a text property `type` whose value is recognised, its abbreviation according to `cider-completion-annotations-alist' will be used. If `type` is present but not recognised, its value will be used unaltered. If SYMBOL has a text property `ns`, then its value will be used according to `cider-completion-annotations-include-ns'. The formatting is performed by `cider-annotate-completion-function'. (fn SYMBOL) (defalias 'cider-annotate-symbol #[257 "\205\302!\303! \"\266\202\207" [cider-annotate-completion-candidates cider-annotate-completion-function cider-completion--get-candidate-type cider-completion--get-candidate-ns] 6 (#$ . 5305)]) #@31 Complete the symbol at point. (defalias 'cider-complete-at-point #[0 "\300\301!\211\205(\302 \205(\303 \206\304 ?\205(\211@A\305\306!\307\310\311\312\313\314\315\316\257 \207" [bounds-of-thing-at-point symbol cider-connected-p cider-in-string-p cider-in-comment-p completion-table-dynamic cider-complete :annotation-function cider-annotate-symbol :company-doc-buffer cider-create-doc-buffer :company-location cider-company-location :company-docsig cider-company-docsig] 12 (#$ . 6024)]) #@201 Force Compliment to refill its caches. This command should be used if Compliment fails to pick up new classnames and methods from dependencies that were loaded dynamically after the REPL has started. (defalias 'cider-completion-flush-caches #[0 "\300 \207" [cider-sync-request:complete-flush-caches] 1 (#$ . 6524) nil]) #@136 Open VAR's definition in a buffer. Returns the cons of the buffer itself and the location of VAR's definition in the buffer. (fn VAR) (defalias 'cider-company-location #[257 "\300!\211\205 \301\302\"\211\205\301\303\"\211\205\304!\211\205.r\211q\210\212eb\210Sy\210\211`*B\207" [cider-var-info nrepl-dict-get "file" "line" cider-find-file] 7 (#$ . 6851)]) #@41 Return signature for THING. (fn THING) (defalias 'cider-company-docsig #[257 "\300!\301\302\"\301\303\"\301\304\"\205$\305\306\307 \310\n!$\311\312\"#\207" [cider-eldoc-info lax-plist-get "ns" "symbol" "arglists" format "%s: %s" cider-eldoc-format-thing cider-eldoc-thing-type cider-eldoc-format-arglist 0] 13 (#$ . 7225)]) #@87 Return CIDER completion candidates for STRING as is, unfiltered. (fn STRING &rest _) (defalias 'cider-company-unfiltered-candidates #[385 "\300!\207" [cider-complete] 4 (#$ . 7567)]) (add-to-list 'completion-styles-alist '(cider cider-company-unfiltered-candidates cider-company-unfiltered-candidates "CIDER backend-driven completion style.")) #@63 Enable backend-driven fuzzy completion in the current buffer. (defalias 'cider-company-enable-fuzzy-completion #[0 "\301\300!\210\302\211\207" [completion-styles make-local-variable (cider)] 2 (#$ . 7919)]) (provide 'cider-completion)