r/Clojure • • Dec 22 '21

CIDER 1.2 (Nice)

https://metaredux.com/posts/2021/12/22/cider-1-2-nice.html
82 Upvotes

9 comments sorted by

3

u/licht1nstein Dec 22 '21

Thank you for your amazing work!

Maybe somebody can advice how can I enable completion for required namespaces and libraries?

lsp-mode and anakondo both do not work

3

u/bozhidarb Dec 22 '21

All you need to do is connect to an nREPL server and start evaluating some namespaces. More details - https://docs.cider.mx/cider/1.2/usage/code_completion.html

1

u/licht1nstein Dec 22 '21

I tried, but it doesn't work. Only for the language itself. Thanks!

1

u/licht1nstein Dec 22 '21

Maybe it's the company-mode

1

u/licht1nstein Dec 25 '21 edited Dec 25 '21

I went through all the docs very thoroughly. The built-in completion works correctly, when I press TAB, I get the minibuffer with the correct options.

But company completion only works for core words, like comment, but it doesn't show options like str/lower-case if I type str/ (the built-in completion does).

I don't have any particular company configuration. And I would really like to have company use the same options for auto-complete as the built-in completion does.

UPDATE: After reading this thread I decided to use

(add-hook 'cider-repl-mode-hook #'cider-company-enable-fuzzy-completion)
(add-hook 'cider-mode-hook #'cider-company-enable-fuzzy-completion)

And now completions show up in company.

1

u/ericdallo Dec 22 '21

Since it doesn't work for both cider and LSP, it's probably your company config or something like that

3

u/sudkcoce Dec 22 '21

Thank you! 👏

2

u/bowmhoust Dec 22 '21

Nice! Much obliged!

2

u/robcorp Dec 23 '21

Thank you for all the hard work that makes our work that much easier! Happy Holidays!