This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # admin-announcements (3)
- # beginners (133)
- # boot (123)
- # capetown (2)
- # cider (21)
- # cljs-dev (1)
- # cljsrn (2)
- # clojure (32)
- # clojure-czech (1)
- # clojure-russia (2)
- # clojure-spec (72)
- # clojurescript (4)
- # datomic (28)
- # emacs (19)
- # funcool (1)
- # hoplon (10)
- # jobs-rus (1)
- # onyx (1)
- # other-languages (3)
- # protorepl (3)
- # re-frame (10)
- # reagent (76)
- # ring (2)
- # rum (2)
- # spirituality-ethics (61)
- # test-check (2)
- # testing (1)
- # untangled (3)
@borkdude: You could of course do something like
(disclaimer: written in Slack, not tested)
(defn print-lines [lines obj] (->> obj str (clojure.string/split-lines) (take lines) (clojure.string/join \newline) println)
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?
This actually is not a cider/company thing, or indeed a cider thing. I think the problem is in cider-nrepl.
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 https://github.com/alexander-yakushev/compliment!
I had never even heard of this library, but apparently it powers all the completions in cider and vim-fireplace!
Fixed and pull request submitted. https://github.com/alexander-yakushev/compliment/pull/40
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!
(alter-var-root #'cider.inlined-deps.compliment.v0v3v0.compliment.sources.ns-mappings/var-symbol? (constantly (constantly true)))