I have just started clojure does anyone uses VScode for clojure. If yes what plugin do you guys suggest me? Main feature i want to have is jumping to the functions definitions, please help.
I have used Clojure plugin by Andrey Lisin, func jump is only working for the inbuild funcs like println
, reduce
the jump is not working for my defined functions, please help
Hey @riteeks56 I'm not a VScode user, but to me it seems like Calva (https://marketplace.visualstudio.com/items?itemName=cospaia.clojure4vscode) is the more fully featured one.
@pez is always present here, he's one of the developers as far as I'm aware
Ya but I am getting command 'calva.connect' not found
when try to connect to calva connect. Should i do something more after installing the pulgin?@pez
Thanks @andre.stylianos
It could be that Calva is not activated. It wakes up when you open a clojure file. And only then the connect command is available.
Also, Calva needs some middleware to be present and working. This is a profiles.clj
that works:
{:repl {:plugins [[cider/cider-nrepl "0.17.0"]]
:dependencies [[org.clojure/tools.nrepl "0.2.13"]
[cider/piggieback "0.3.5"]
[figwheel-sidecar "0.5.16"]]
:repl-options {:nrepl-middleware [cider.piggieback/wrap-cljs-repl]}}}
When the dependencies are satisfied you will be able to get documentation, peek at definitions and jump to implementations for built-in symbols as well as your own or any libraries. Even Java implementations (but not JavaScript).
I think that your problems with Andrey Lisin’s plugin might be a dependency issue. (Even if I hope you will find Calva the better of the two, generally.)
so i have to put this in profiles.clj
and then reload vs code then it should work?
Thanks for the help @pez
@nick652: I have just released a new version of Calva where the ontype-indenting is moved to Calva Formatter (which is installed together with Calva). I was just about to try fix the problem with indenting conflicts between Format Selection/Document and the ontype indenter. But to me it seems that it works. The
(or
this
that)
case at least. And some others I have tried. Can you check if there are still issues with this? I do not understand why it would be fixed by this refactoring of mine, but anyway, I am happy if there is less work left. 😃My pleasure! You will need to restart the REPL too, for the middleware to be activated.
The first problem you reported was not about middleware, though. It was either that you hadn’t opened a clojure file or that the Calva extension failed to activate (happens at times, I haven’t figured out why).
That's great news! Thanks for the update. I'll pull the new version down in a bit and let you know if that issue is gone for me as well.
what should be the location of this profiles.clj
@pez
In the .lein/
directory of your home directory.
still getting command 'calva.connect' not found
. Idk what is the reason. I desperately wanted to use this plugin as its features seems to be pretty good but i am unable to use. @pez (i tried multiple times)
Which version of Calva are you using?
1.3.0
@pez is it working fine for you?
Yes, it’s working fine for me. But 1.3.0 is a strange version, latest is 1.3.27…