Skip to content

Commit

Permalink
Add info on custom completion style to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-yakushev authored and bbatsov committed Jan 22, 2017
1 parent db77e8c commit 04e428b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -12,6 +12,7 @@
* Add new customization variable `cider-font-lock-reader-conditionals` which toggles syntax highlighting of reader conditional expressions based on the buffer connection.
* Add new face `cider-reader-conditional-face` which is used to mark unused reader conditional expressions.
* [#1544](https://github.com/clojure-emacs/cider/issues/1544): Add a new defcustom `nrepl-use-ssh-fallback-for-remote-hosts` to control the behavior of `nrepl-connect` (and in turn that of `cider-connect`) for remote hosts.
* [#1910](https://github.com/clojure-emacs/cider/issues/1910): Add custom company-mode completion style to show fuzzy completions from Compliment.

### Changes

Expand Down
16 changes: 11 additions & 5 deletions doc/code_completion.md
Expand Up @@ -55,13 +55,19 @@ the time of this writing it's still in development).
By default `company-mode` will provide completion candidates with the assumption
that whatever you've typed so far (e.g. `map-`) is a completion prefix (meaning
you'd get only candidates that have `map-` in the beginnings of their names).
You can get enhanced fuzzy completion with the CIDER-specific completion style
by adding:

You can get enhanced fuzzy completion with `company-mode` if you install the
additional package [company-flx](https://github.com/PythonNut/company-flx).
This is powered internally by [flx](https://github.com/lewang/flx).
```el
(add-hook 'cider-repl-mode-hook #'cider-company-enable-fuzzy-completion)
(add-hook 'cider-mode-hook #'cider-company-enable-fuzzy-completion)
```

Basically with `company-flx` enabled typing something like `mp` will show you
`map-indexed` as one of the possible completion candidates.
Now `company-mode` will accept certain fuzziness when matching candidates
against the prefix. For example, typing `mp` will show you `map-indexed` as one
of the possible completion candidates, `cji` will complete to `clojure.java.io`,
etc. Different completion examples are
listed [here](https://github.com/alexander-yakushev/compliment/wiki/Examples).

### Completion annotations

Expand Down

0 comments on commit 04e428b

Please sign in to comment.