Fork me on GitHub
#cider
<
2019-11-15
>
lvh03:11:08

Crossposting because not sure if Spacemacs or CIDER: https://clojurians.slack.com/archives/C09C8GRLY/p1573790183157300

dpsutton04:11:43

Are you using lsp by any chance?

dpsutton04:11:44

I stepped through the company complete code and it’s not fun. But I think it was lsp and cider both fighting over completions for me @lvh

lvh04:11:49

Not knowingly/intentionally and lsp seems like it'd involve some setup

lvh04:11:02

I assume that's clojure-speciifc lsp and not e.g. rust lsp

lvh04:11:57

yeah the string lsp only occurs in my dotfile in the context of go

dpsutton04:11:10

Clojure script by any chance?

lvh04:11:36

it's a clj + cljs project yes

lvh04:11:53

but I think that behavior is also in clj-only projects, lemme check

lvh04:11:13

(yep just confirmed)

dpsutton04:11:29

Can you toggle nrepl messages?

dpsutton04:11:47

I’m guessing completions are coming from nrepl but then something happens front end

dpsutton04:11:01

Fixup completion in CIDER

few issues:
- CIDER uses dumb completion in the repl for some reason. Need to use
'company-indent-or-complete-common' as the 'cider-repl-tab-command'
- set TAB to be ("TAB" . company-indent-or-complete-common)
globally.

Was having interesting issue: autocomplete at the repl sucked, but if
invoking company-complete-common manually it worked fine. However, was
getting no completion in source buffers just a "no completions found"
error. Still not exactly sure why this solved that but cargo cults
abound. Possible it had to do with the capf cache and it gets really
hairy in there at that point.
from a commit message in my init.el

dpsutton04:11:34

in my use-package cider ... :config (setq cider-repl-tab-command #'company-indent-or-complete-common))

dpsutton04:11:48

@lvh one thing to check is if your autocomplete works normally in a source buffer but this neutered way in the repl. if so the above should fix it for you

lvh12:11:33

Didn’t even try in the REPL, this was in source buffers

lvh12:11:39

Though jacked in of course

lvh12:11:47

(Thanks for all the debugging pointers!)

erwinrooijakkers11:11:43

How can I connect the REBL into a Cider workflow from Emacs? https://github.com/cognitect-labs/REBL-distro It says: >Replace your normal repl invocation (clj, or clojure e.g. for inferior-lisp) with REBL: > clj -R:rebl -m cognitect.rebl

lvh14:11:16

FWIW the plot thickens: autocomplete on io/ works fine.... :face_with_monocle:

justinbarclay15:11:06

I don’t know much about spacemacs, but are you using company mode as the back-end or ac?

futuro22:11:31

Sounds like there’s a 3-character minimum before autocompletion will work.

futuro22:11:01

Not sure why or where, but that seems to be the common thing in your examples.

justinbarclay02:11:45

That’s what I was trying to find out, company’s minimum prefix length is 3 characters. https://github.com/company-mode/company-mode/blob/master/company.el#L520