Fork me on GitHub

Ah, yesterday's discussion has solved my issue. Is the idiomatic VSCode workflow to always have a project directory open then? Any way to do that automatically if I just open a .clj file deep in a project?


I don't know if I would call it idiomatic vscode, but Calva certainly assumes that there is a project directory opened. This is why step 1 in ”Connecting Calva” is what it is: There is also a page about workspace layouts that is linked from the getting-started page. This has been plauging Calva since day 1 nd we never seem to solve it fully... Not sure what automatic way there is. I do cmd+o and then use the cmd+up until I'm at the project root and hit enter.


That's how Emacs works in general. The Projectile (also by bbatsov, I think) package keeps going up until it sees something that can be called a project (a .git repo, a .projectile file or any of the pom.xml, project.clj, Makefile etc. etc.) and opens that behind our back.

❤️ 4

Maybe Calva can do the same?


Not sure if that's against VSCode norms.


We need to make Calva work w/o a project directory, because babashka.


also because normal clojure. I've used lein repl pretty often from a non-project dir


i use clj from non-proj dir sometimes to check things that are generic, but this is via terminal usually

Marc O'Morain12:04:49

I’m using Calva today, and it keeps “locking up” and the commands stop working. Is there anywhere that I can check for errors? Any debug view? The yellow “REPL <lightening> is showing” correctly, and some evaluation does work for a while, and then it stops responding.

Marc O'Morain12:04:26

Using k f for format stops working too, and clj-kondo stops working also.


@marc-omorain clj-kondo is a separate extension from calva. maybe you can try disabling one or the other to see what's the culprit

Marc O'Morain12:04:03

I restarted VSCode, and disabled clj-kondo, and it hasn’t hung in the last few minutes.

Marc O'Morain12:04:12

It’s broken again, so it wasn’t related to kondo.

Marc O'Morain12:04:35

[2020-04-24 13:45:45.336] [renderer1] [warning] UNRESPONSIVE extension host, 'betterthantomorrow.calva' took 92% of 5065.715ms, saved PROFILE here: '/var/folders/q0/2g2lcf6j79df6vxqm0cg_0zm0000gn/T/exthost-65a9d5.cpuprofile' [{"id":"betterthantomorrow.calva","total":4675972,"percentage":92},{"id":"gc","total":389639,"percentage":8}]
[2020-04-24 13:45:56.832] [renderer1] [warning] {}
[2020-04-24 13:45:58.781] [renderer1] [warning] {}

ryan echternacht13:04:51

@pez #620 is SO MUCH BETTER thank you

❤️ 4
calva 4

@marc-omorain, could be the last update. Can you try with 2.0.93?

Marc O'Morain14:04:09

trying that now 👌


@ryan072: Thanks! Super fun to implement, so glad if it is useful as well. 😃 Let's hope we can get any performance bugs chased out quickly.


Hi guys! I just got new update and saw this


It shows even if have "editor.renderIndentGuides": false, So I changed nothing, just got new update and they showed up instantly.


"calva.highlight.rainbowIndentGuides": false, helped to hide them, but as I understand there is something wrong with that.


Yes, it's a bit confusing, but there is no way to override the built-in guides, so they must be off. Will document it.


I think it’d better if calva.highlight.rainbowIndentGuides defaults to off then.


I disagree. 😎


Ok, but with that’s on, "editor.renderIndentGuides doesn’t make any sense more.


it won’t make sense regardless, unfortunately. ¯\(ツ)


VS Code's API limits this for us, but, maybe there is some middle ground...


@marc-omorain, did 2.0.93 work better?

Marc O'Morain16:04:59

yes, I have not had the problem with .93


I think one of your source files throws Calva .94 into an infinite loop. If you have the time to try see which one and figure out what's special about it, I'd love that!


@pez minor, but annoying issue I’d like to create a PR for that.

👍 8

had exactly the same issue with alabaster and arrived to that solution!


Thanks, @zelark! And extra thanks for researching it a bit.


@marc-omorain, if you do investigate it, disabling calva.highlight.rainbowIndentGuides should make the problem go away, and no need to downgrade to .93 ,if so.

ryan echternacht17:04:41

sometimes my calva -> nREPL connection grinds to a halt (auto formatting fails, the repl itself seems slow). Any thoughts on what’s going on/what I’m doing wrong?

ryan echternacht18:04:52

After a bit of research, it’s definitely on the calva side (my nREPL is fine). It keeps happening within 2 minutes of jacking into an nREPL. I’ve tried reinstalling calva and vscode and no dice. Thoughts?

ryan echternacht18:04:17

the calva repl stops accepting input. formatting stops working.

ryan echternacht18:04:27

@pez I can try to help with debugging, just not sure what is most helpful. looking at my system performance, the vscode rendered helper just goes haywire (>90% cpu on my macbook pro and my fans all kick on)


@ryan072, I think it is some source file in your project that exposes the problem. If you can figure out which one, we can narrow it down from there.

ryan echternacht18:04:33

ok, i just started using clj cli (instead of lein) so give me a few minutes to throw up a new project and see if i can repro


You do not need to jack in to expose the problem.


This is a problem with the parsing to produce the rainbow indent guides.

ryan echternacht19:04:00

fwiw, i disabled that at one poitn and still had the issue (downgrading definitely fixed it)


That is worth tons. Which setting did you disable?


Time to join a Zoom meeting, and we can look at it together?


Dear Calva friends: Latest Calva seems to introduce a severe problem with rendering, see above. I can't reproduce it, but in this build I have tried to safe guard against a potential infinite lopp. Please help testing it. Especially if you have the rendering problem. Here:


@zelark: ^That version ^ also intrduces a second setting, which makes it possible to highlight only the current/active indent. + it sets the highlight of indent gudes to off by default (and this new current/active to default on).


@pez I just ran into the render issue above and came here to see if someone else had the same problem. I have a code file that will repro it. Not sure if you still need more details.


So as soon as I put a \ before a } in this code it seems to lock it up.

(defn respond-hello [request]
  (let [nm (get-in request [:query-params :name])]
    {:status 200 :body \}))
Not that I wanted to put that there, but I think I originally hit a wrong key when typing and then realized I couldn't backspace


And then I get the message mentioned earlier

[2020-04-24 15:47:11.681] [renderer1] [warning] UNRESPONSIVE extension host, 'betterthantomorrow.calva' took 94% of 5047.946ms, saved PROFILE here: '/tmp/exthost-b0f97c.cpuprofile' [{"id":"betterthantomorrow.calva","total":4724394,"percentage":94},{"id":"gc","total":323330,"percentage":6}]
From the Log (Window) output


Weird thing is I can still type in the file just can't backspace or delete


This is with 2.0.94, I'm about to try the vsix above


It's still happening with the 2.0.95 vsix, specifically placing \ before } in the above code is causing it


FYI - disabling "Highlight Active Indent" fixed it

👍 4