@@ -37,18 +37,27 @@ is already properly indented.
3737
3838== Completion styles
3939
40- CIDER defines (via the `completion-styles-alist` Elisp variable) a completion category named `cider`.
40+ CIDER defines a specialized completion category through the `cider-complete-at-point` function,
41+ added to `completion-at-point-functions`, establishing a dedicated completion category named
42+ `cider`.
4143
42- The `cider` completion category currently only supports `basic` completion styles (and not `partial-completion`, `orderless`, etc),
43- and `flex`, optionally (read more below).
44+ The CIDER completion at point function supports most completion styles, including
45+ `partial-completion`, `orderless` and `flex` (read more below).
4446
45- CIDER declares so in this fashion:
47+
48+ Sometimes the user may want to use a different completion style just for the CIDER
49+ complete at point function. That can be achieved by setting
50+ `completion-category-overrides`, overwriting the completion style of the CIDER
51+ complete at point function. The following snippet accomplishes that:
4652
4753[source,lisp]
4854----
4955(add-to-list 'completion-category-overrides '(cider (styles basic)))
5056----
5157
58+ This specifies that the `cider` completion category should employ the basic completion style by
59+ default.
60+
5261You can also enable the `flex` completion style by activating xref:usage/code_completion.adoc#fuzzy-candidate-matching[fuzzy candidate matching].
5362
5463== Auto-completion
@@ -131,13 +140,14 @@ without needing to hit an extra key, please customize:
131140
132141=== Fuzzy candidate matching
133142
134- By default, CIDER will provide completion candidates with the
135- assumption that whatever you've typed so far is a prefix of what
136- you're really trying to type. For example, if you type `map-` then
137- you'll only get completion candidates that have `map-` as the
138- beginning of their names. Sometimes, you don't know the exact prefix
139- for the item you want to type. In this case, you can get
140- CIDER-specific "fuzzy completion" by setting up in your Emacs init file:
143+ By default, CIDER will use the completion styles defined in
144+ `completion-styles`, the defaults being `(basic partial-completion
145+ emacs22)` since Emacs 23. For a better description of how those
146+ completion styles operates, refer to the official Emacs manual on
147+ https://www.gnu.org/software/emacs/manual/html_node/emacs/Completion-Styles.html[how completion alternatives are chosen].
148+
149+ CIDER provides a function to enable the `flex` completion style for CIDER-specific
150+ completions. If you wish to enable that, you can add this to your config:
141151
142152[source,lisp]
143153----
@@ -146,11 +156,11 @@ CIDER-specific "fuzzy completion" by setting up in your Emacs init file:
146156
147157This adds the `flex` completion style, as introduced in Emacs 27.
148158
149- Now, `company-mode` will accept certain fuzziness when matching
150- candidates against the prefix. For example, typing `mi` will show you
151- ` map-indexed` as one of the possible completion candidates and `cji`
152- will complete to `clojure.java.io`. Different completion examples are
153- shown
159+ Now, `company-mode` (and other completion packages like `corfu`) will
160+ accept certain fuzziness when matching candidates against the
161+ prefix. For example, typing `mi` will show you ` map-indexed` as one of
162+ the possible completion candidates and `cji` will complete to
163+ `clojure.java.io`. Different completion examples are shown
154164https://github.com/alexander-yakushev/compliment/wiki/Examples[here].
155165
156166NOTE: `cider-company-enable-fuzzy-completion` (now deprecated) should be used for Emacs < 27.
@@ -189,18 +199,6 @@ keys to cancel the prompt by customizing:
189199 (funcall f a b))))
190200----
191201
192- === Changing the completion style
193-
194- Sometimes the user may want to use a different completion style just for the CIDER
195- complete at point function. That can be achieved by setting
196- `completion-category-defaults`, overriting the completion style of the CIDER
197- complete at point function. The following snippet accomplishes that:
198-
199- [source,lisp]
200- ----
201- (add-to-list 'completion-category-defaults '(cider (styles basic)))
202- ----
203-
204202=== Updating stale classes and methods cache
205203
206204Sometimes, the completion fails to recognize new classes that came with
0 commit comments