Fork me on GitHub

Not that I know of


Print-length only limits the number of elements printed. Not the actual size


@borkdude: You could of course do something like

(defn print-lines [lines obj] (->> obj str (clojure.string/split-lines) (take lines) (clojure.string/join \newline) println)
(disclaimer: written in Slack, not tested)


I’m not getting company completion suggestions for the . namespace, in CIDER. Any other namespace is fine—as long as my.ns is loaded, I can type my.ns/ and be rewarded with a pop-up list of vars from my.ns. But not so with ./. I am sure the namespace is loaded, since I can call functions from it, e.g. (./doc clojure.string/split-lines) since I have injected my utility functions into ., but the cider/company integration doesn’t seem to work. I have also tried company-manual-begin, but no luck.


Does anyone have insight on this? I was thinking it might be because the CIDER backend is limiting completion options to Java method calls since the symbol begins with ....


there's a compnay minumum prefix length to prevent it from autocompleting when the suggestion space is too large. I think it defaults to 3. maybe kick this down to 2?


but this would only be if no suggestions are shown.


Yes, no suggestions are shown.


ah then try that


No luck, I already have that set to 1.


This actually is not a cider/company thing, or indeed a cider thing. I think the problem is in cider-nrepl.


That’s where the completion list really comes from.


FWIW, tab completion works as expected with the . namespace in a regular lein repl—just not from emacs, through cider-nrepl.


OK, I’ve been doing some heavy code tracing, and this actually goes all the way back to!


I had never even heard of this library, but apparently it powers all the completions in cider and vim-fireplace!


I’ll still need to figure out how to inject the fix into my current setup, though, because I anticipate it will take a long time before this percolates all the way up into CIDER.


Adding the following code to the :injections vector of my profiles.clj resolves the problem for me without need for any changes upstream. Be warned, this is a very ugly hack!

  (constantly (constantly true)))