Fork me on GitHub

@saikyun , can you describe the steps you take to start the repl and connect and such? Usually goto definition is a dependencies issue. But you also have those scheme warnings...

Alexander Kouznetsov06:04:56

Is anyone looking into implementing a symbol map for clojure files?


Welcome, @alexander.minolta! Not at the moment, that I am aware of. Wanna have a go at it?

Alexander Kouznetsov06:04:32

Thank you! Yeah, feels like very useful feature.


Indeed. I know someone, somewhere, made some experiments with it, but it was a long while ago, and that someone has left the building. 😃


If you do take it on. Please start by filing a feature request on the github repo and tell people you'll be working with a PR.


And the branch to base your PR on is pez/repl+jack-in. It has diverged quite a lot from master at this time.

Alexander Kouznetsov07:04:46

Could you please share a link to the description of the API referenced here?

(def operation
  {:EVALUATE "eval"
   :LIST_SESSIONS "ls-sessions"
   :LOAD_FILE "load-file"
   :COMPLETE "complete"
   :CLONE "clone"
   :CLOSE "close"
   :STACKTRACE "stacktrace"
   :INFO "info"
   :REFRESH "refresh"
   :REFRESH_ALL "refresh-all"
   :REFRESH_CLEAR "refresh-clear"
   :FORMAT_CODE "format-code"
   :TEST "test"
   :TEST_ALL "test-all"
   :RETEST "retest"
   :PPRINT "pprint"})


Not sure what it is you need here, but the file you picked up that from, shouldn't still be around any longer...

Alexander Kouznetsov07:04:45

I’m looking for a list of ops available.

Alexander Kouznetsov07:04:52

Such as this.client.write({ op: "load-file", session: this.sessionId, file, id, "file-name": opts.fileName, "file-path": opts.filePath })


Are you on pez/repl+jack-in? (Just checking)


I am not sure how to assemble the nrepl ops info, @U09LZR36F might know.


I think you've found the relevant Calva file, but anyway: calva/nrepl/index.ts.

Alexander Kouznetsov07:04:59

Yeah, would be great to know how to get symbol info.


There's a describe operation which will give you a list of ops available in your nrepl.


Is that what you mean?

Alexander Kouznetsov15:04:35

Kind of. I guess the extension relies on certain nrepl operations being available. I was wondering what is a set of them. I guess describe is one way to find out, the other might be just the documentation. Is this the one?

Alexander Kouznetsov15:04:32

Is there a way to extend the set of operations within the extension context?


How do you mean? Add ops on the fly?

Alexander Kouznetsov05:04:15

I tried pez/repl+jack-in branch but it doesn’t seem to build. So I will use master for now.


How didn’t it seem to build? Also you should use the dev branch now. I’ll see if I can pull the PR in there.


Now tried it. Very nice! See my comments on GitHub.

Alexander Kouznetsov05:04:09

It’s failing with:

[0] calva/calva-fmt/ts/providers/ontype_formatter.ts(11,40): error TS2345: Argument of type 'LineInputModel' is not assignable to parameter of type 'ReplReadline'.
[0]   Property 'parent' is missing in type 'LineInputModel'.
[0] 10:39:29 PM - Found 1 error. Watching for file changes.


Did you follow the steps from that wiki page?

Alexander Kouznetsov05:04:18

You’re right, I didn’t.


The build process has changed considerably between master and dev.


Trying out 164 now. Now I get “No symbols found”, whatever I try with.


Also, can you try to not include whitespace changes in these PRs? It makes it a bit hard to see where to find “real” changes and also will make merging trickier.

Alexander Kouznetsov04:04:06

Sorry, all of these are automatic. I’ll try to avoid adding them next time.


It's pretty hard to avoid. But at least in files that otherwise edited, it would be extra good not to have them.


@hoppy, about that packaging problem on your setup. I am worried it is an indication of something lurking, so if you want to investigate it, I'd be happy. However, I don't know anything specific you can try. It is quite awful when it only shows up in the built artifact... Had you spotted something particular about that? (Sorry, lots of things going on, so my memory has a hard time keeping up.)


@pez the repl server starts automatically when I start arcadia. 🙂 when connecting to that server I use Calva: Connect


the thing is that I think there might be information that arcadia's nREPL-server isn't giving Calva, so I think I'd need to suplement Arcadias nREPL-implementation


with what's missing


Is there a way for you to specify nREPL dependencies when starting Arcadia?


atm there is no dependency management (it's coming I believe), so you'd have to add it manually to your project


but I'm guessing that things like cider-nrepl aren't very compatible with clojure clr


I guess there is some clr nrepl project?


though I'm not sure if arcadia uses this lib


Maybe @bozhidar knows something about efforts for getting nrepl to CLR?


I'm sure he would love you spearheading it, @saikyun 😃


@pez I'm not sure if we're talking past each other. go to def works in cider-mode for emacs, so there seems to be something missing in calva


Yeah, there probably are things missing in Calva. Maybe CIDER does something special for CLR or Arcadia.


Can you peek at definitions?


no, sadly not


do you know what code is called in calva when you do go to definiton? I could have a peek there


It's probably in calva/nrepl/index.ts.


The provider is in: calva/providers/definition.ts which then uses the info op.


Hey @pez, just popping by to say thank you for the awesome plugin! I’m a Sublime Text user, so switching to VS Code is easy for me and your plugin provides access to the goodies, that emacs /vim users are enjoying.


Hello, @sasho.popov! Thanks for cheering us on!

🙂 4

Dear friends of Calva. This Calva 2 build includes a setting for giving the Jack-in process any environment variable definitions it might need. Meant for being used for Workspace settings mostly. As an example: in my project at work I need this:

"calva.jackInEnv": {
        "DATOMIC_URI": "datomic:"


Quick question, is there a way to enable calva-paredit for js files as well?


I have tried, @slipset. But at least with paredit.js things did not behave. We're going to replace paredit.js with @mseddon's stuff, though, so just maybe we will be able to give paredit to other languages as well.


Just using Code a bit for Js work, as my Emacs tends to go hang it self at random points in time, and since I have my Clojure repl running inside Emacs, I don’t want to kill it off.


I keep trying to slurp and barf brackets in both JS and CSS and all over.

😂 4
Dmytro Bunin12:04:58

@pez when I try to jack in I get is not a function


You probably have aliases in your project file then, @dmytro.bunin?


You should be able to have that, of course, but I am probably doing the wrong thing with them....

Dmytro Bunin12:04:19

uh maybe it’s because the project is using boot

Dmytro Bunin12:04:30

I’ve only used the calva with tools-deps before


OK, so boot. Is the project open source?


It would be nice if Calva could support boot as well.

Dmytro Bunin12:04:50

oh well we are refactoring everything to tools.deps anwyays

Dmytro Bunin12:04:54

time to migrate 😄


lol. Yeah, maybe that's what will happen


Can you jack-in with tools-deps projects?

Dmytro Bunin12:04:57

I didn’t try yet

Dmytro Bunin12:04:46

I guess that’s not a boot issue then

Dmytro Bunin12:04:38

and yeah, in that project there are aliases

Dmytro Bunin12:04:49

same thing for different environment too


Yeah, I've changed the parser and it was a bit of work to make it play with the :profiles map in leiningen projects. Work that I haven't put into aliases yet.

Dmytro Bunin12:04:01

if I delete profiles

Dmytro Bunin12:04:04

I get this blob


Hmmm, I need to have a look.

Dmytro Bunin12:04:26

I meant aliases, not profiles

Dmytro Bunin12:04:18

is there a way not to include the cljs stuff when jacking in?

Dmytro Bunin12:04:23

cos it’s only a clojure service anyways

Dmytro Bunin12:04:58

welp gonna use the calva: Connect for now

Dmytro Bunin12:04:06

I hope this helps somehow 😄


Is there a way to see that there is no need for cljs stuff, you'd say?

Dmytro Bunin12:04:15

Im not sure I understand the question

Dmytro Bunin13:04:00

I think in cider there are two different commands to start the cljs and clj repls


I meant in the deps.edn file. (I'm embarrassingly unfamiliar with those.) If you would be parsing the file, what would you use to decide wether cljs repl deps should be injected or not?


I'm guessing that might be what's going wrong with piggieback there. It assumes clojurescript is present.

Dmytro Bunin13:04:52

we don’t use clojurescript ourselves, so I am embarrassingly unfamiliar with cljs setup of tools.deps too


I'll figure it out.


With Calva, is it possible to put some kind of a breakpoint statement somewhere in the code, stop execution at that point and start stepping in/over the code?


@sasho.popov, no, there's no debugger in Calva yet.


O.K., thank you very much.


If I start a repl with lein repl in a terminal in VS code, if I exit the repl, the nrepl server is not shutdown - I can reconnect to the same port and see in my repo, that I have the file .nrepl-port. What is the proper way to shutdown a nrepl server?


I see, that if I exit VS code altogether the .nrepl-port is cleaned up. So the logic is - as long as I have VS Code open, I shouldn’t need to kill the nrepl server?


I usually start my repl from a terminal outside vscode. That way I know where it is and how to kill it. 😃 But that is also because I restart vscode very often, due to maintaining Calva while working with other things.


Got it, thank you!


Saw this lib in #announcements Thought it might be of interest for integration in calva…


Is that your repo, @U0A6H3MFT?


@saikyun might be interested as well.


yes, it is my repo


it can be integrated with any editor which can highlight given string/column number


with some limitations about macroexpanded forms (they have not relations with source code text)


@sasho.popov, have you seen?


@U0A6H3MFT, I’m guessing this is hard to do for ClojureScript?


i think so. not about for swing gui windows, but mainly cause of absence eval form in cljs, as I remember


I am going to make a youtube stream about use this debugger and its some technical details at 17:00 UTC (in a 15 minutes). everybody are wellcome, but it will be IN RUSSIAN 🙂


my shame, I forgot that on one main window sharing all watcher windows was unvisible! 😞 only at the end of stream one man said me about it an I show the interactive watchers to. sorry for this


Next time you'll be thinking about things like that. 😀❤️


all previous times I shared whole screen and did not think about such problems. but recently google hangouts changed his interface and I can not share whole screen on translation start, and had to share anything I can.....


@pez Yes, thank you, I’ll look into this!


> Maybe @bozhidar knows something about efforts for getting nrepl to CLR?


The original nREPL CLR project was never completed and is effective dead.


Today there’s a newer project that works, at least to some extent.


Generally it’d be really nice if there was an official nREPL CLR (and that wouldn’t be hard to implement IMO), but no one has expressed any interest in working on such a project unfortunately.


If he had the server we could easily have added CLR support to third-party middleware using .cljc.


An nREPL bridge. That’s cool!


Yeah, it’s pretty similar to what piggieback does for ClojureScript.


I guess something like this could be extended to CLR itself, but it will be limitted to evaluation-only. Still, that certainly beats having nothing. 😄