Fork me on GitHub
#conjure
<
2021-02-04
>
Aleksander17:02:27

hmm, is there a good guideline how to debug coc/conjure autocompletion?

Aleksander17:02:13

I can see coc-conjure being a coc source for completion in :CocList sources

Aleksander17:02:51

but don’t get any completion for eg (clojure.string/s

Aleksander17:02:25

tried enabling let g:conjure#debug = v:true nothing interesting shows up

Aleksander17:02:36

:CocInfo shows:

dharrigan16:02:50

still having a problem?

Olical16:02:32

Hmm do you have CIDER's middleware set up in your nREPL?

Olical16:02:43

Because that's required for completion.

Aleksander11:02:07

vlaaad/reveal                 {:mvn/version "1.3.193"}
   564                 nrepl/nrepl                   {:mvn/version "0.8.3"}
   565                 cider/cider-nrepl             {:mvn/version "0.25.7"}
   566                 refactor-nrepl/refactor-nrepl {:mvn/version "2.5.0"}

Aleksander11:02:32

I have those depencies, anything more is needed?

Olical11:02:15

The dependencies are correct, but have you set the middleware when starting up your nREPL? https://docs.cider.mx/cider/basics/middleware_setup.html Not sure how you're starting your REPL, this might all already be done, but I just want to confirm.

Olical11:02:35

Just adding the dependencies isn't enough. If you use something like https://github.com/clojure-vim/vim-jack-in you get all this set up for you.

Olical11:02:12

The CIDER and nREPL websites have reaaaaly good documentation for all of this too, it's all just one liners that I copy from that website then project to project.

Olical11:02:33

(again, you may have all of this set up, but I want to confirm that this core dependency is all okay before chasing down weirder bugs etc)

Aleksander12:02:01

I’ll check the setup, that might be that

Olical12:02:39

I need to add support for nREPL 0.8+'s built in completion without CIDER, but I just haven't sat down to do it. It's not as powerful, but it's a baseline that requires no extra deps which is cool.

Olical12:02:01

Maybe in the next update, just publishing one now though 🙂

dharrigan12:02:07

This is my start-nrepl function

dharrigan12:02:12

(defn start-nrepl
  [env-port]
  (let [server-map (nrepl/start-server
                    :port (or env-port 0)
                    :handler (apply nrepl.server/default-handler
                                    (-> (map #'cider.nrepl/resolve-or-fail cider.nrepl/cider-middleware)
                                        (conj #'refactor-nrepl.middleware/wrap-refactor)
                                        (conj #'portal.nrepl/wrap-portal))))
  ;                                      (conj #'vlaaad.reveal.nrepl/middleware))))
        port (:port server-map)
        port-file (io/file ".nrepl-port")]
    (.deleteOnExit port-file)
    (spit port-file port)
    (println (ansi/green (str "nREPL client can be connected to port " port)))))

dharrigan12:02:27

Maybe that might be helpful 🙂