This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # aleph (10)
- # announcements (1)
- # aws-lambda (1)
- # beginners (162)
- # calva (81)
- # chlorine-clover (2)
- # cider (18)
- # clj-kondo (2)
- # cljs-dev (1)
- # cljsrn (12)
- # clojure (64)
- # clojure-australia (6)
- # clojure-europe (13)
- # clojure-nl (3)
- # clojure-sweden (26)
- # clojure-uk (36)
- # clojurescript (45)
- # community-development (10)
- # conjure (16)
- # core-logic (4)
- # crux (30)
- # cursive (6)
- # datascript (1)
- # emacs (1)
- # events (2)
- # fulcro (87)
- # girouette (5)
- # honeysql (4)
- # hoplon (3)
- # hugsql (3)
- # leiningen (8)
- # malli (18)
- # off-topic (33)
- # pathom (14)
- # reitit (5)
- # remote-jobs (1)
- # reveal (1)
- # shadow-cljs (50)
- # sql (3)
- # startup-in-a-month (1)
- # vim (5)
https://calva.io/workspace-layouts/ This may help you, but may not be exactly what you want.
If you're saying you want to start a clojure cli repl, and also a shadow-cljs repl, separately, and have calva switch between them, there's no real easy way that I know of, but you can start one via jack-in (if you want), and start another manually in a terminal, and run Calva's "connect to running repl" command to switch between them, providing the port.
I'm not sure if you could also start the shadow repl from the clojure-cli repl, but if so, it might be easier to switch between them. I haven't done much work like that, so someone else here may have another suggestion.
Ok, I’ll try that.
Another issue I’ve run into:
None of my logs seem to print to the repl.
(println "Hi there") prints to the repl when I run my server in emacs, but not when I do it in calva.
It will print it, if I evaluate the function call. But it won’t if the function is called by an endpoint being triggered.
I can fiddle a little more with it, but I just wanted to post it here in case it was anything obvious
I'm not sure which part of what I said you meant you will try, but I just realized this part of that doc actually looks like your scenario: https://calva.io/workspace-layouts/#one-folder-two-windows - and may be easier than trying to switch in the same vs code window providing a port. With the way in the doc you can use jack-in for both too.
Great! This works. I have to start to windows, but I can connect to the repl in the other one
Arhh, they only show up in the jacked-in terminal. And not the output file
Not sure why the printing happens that way, or if we can make it print to the Calva output window when the function's hit via endpoint. Maybe @pez will have some insight here when he gets back on.
Calva version 2.0.155 is out! 🎉 • https://github.com/BetterThanTomorrow/calva/issues/989 • Update clojure-lsp to 2021.01.28-03.03.16 • Fix: https://github.com/BetterThanTomorrow/calva/issues/901 Thanks to @claudius.nicolae for the nrepl port race condition fix!
@alexander.minolta, about the printing of things going on in the server. It’s the way the nrepl server is attached, it doesn’t get hold of stdout from some threads. Or, I shouldn’t speculate too much, @bozhidar might be better to explain this. But anyway, Calva prints nrepl connection doesn’t get hodl of it and thus does not print it. But all is not lost. For jack-in sessions we can relay the output of the jack-in process to the output window. I am guessing that is what CIDER does too, or can it print it there even for non-jack-in sessions… Again, hopefully we can get Bozhidar’s input on it. In any case, please file an issue about that you want that output in the repl window (if you still want it after having found where it prints). Sounds like it could be an opt-in thing, because I certainly have projects where I wouldn’t want that. Some servers are very chatty.
Just happened to notice this comment... I think this is the root cause: https://github.com/nrepl/nrepl/issues/119 I think every editor that uses nREPL would benefit if that issue were resolved.
I agree it is confusing the way it is now, but if it is fixed there, I hope the messages are made special so that the editor can choose to relay them specially. (Added that to the issue now).
Unfortunately, it's also pretty hard to get it right due to how Java output streams work, otherwise we would have fixed it by now. The closest we got to a solution was the output middleware in cider-nrepl that does some aggressive output rebindings, but because some users complained about this I was wary of using the same approach in nREPL.
If someone wants to take a closer look and suggest different approaches - be my guest.
https://github.com/BetterThanTomorrow/calva/issues/985 This really irks me, and what's worse I can't achieve it easily from outside Calva.
There are several ways to do it. Expand selection, then delete, is one. Or use
No, it’s by design. https://calva.io/paredit/#strings-are-not-lists-but-anyway But we are considering if we should be make it a bit more of a special case than we do today.
We probably should treat it in a more special case way. I can fix this easily, I think.
It can do damage too: "let me edit my financial message string: replace this '(' meaning sale, with 'x' meaning refund:
backspace, x" boom we broke the bank!
It starts authomatically on every VSCode instance with Clojure project I opened, even if it is a cljs project and I'm not going to start a REPL, takes a lot of time on my machine and can freeze it at all on next VSCode instance open.
I think this is a reasonable complaint which can probably be addressed by the Calva and/or Clojure-LSP team. It's just the way you said it, which doesn't make it come across effectively ;)
Here's a "right now" trick: rename
~/.vscode/extensions/betterthantomorrow.calva-2.0.155/clojure-lsp.jar with an underscore in front. Won't be able to start anymore. An error will be printed in the output, but otherwise things will work.
BTW, are you using which version of calva? The latest one uses improved versions of clojure-lsp that should not be a issue for users, otherwise it'd be great what's the performance issue
Ugh, removing of the clojure-lsp jar is bad advice. It might or might not work depending on what you do. The reason clojure-lsp can’t be disabled is that we don’t have the time to maintain Calva if we need to consider all-over if clojure-lsp is enabled or not.
Also: > even if it is a cljs project and I’m not going to start a REPL Two things: 1. One of the major reasons clojure-lsp is added is because it makes a lot of Calva features available without the REPL. 2. cljs and REPL are not mutually exclusive.
VSCode Version: 1.52.1 Commit: ea3859d4ba2f3e577a159bc91e3074c5d85c0523 Date: 2020-12-16T16:32:10.090Z Electron: 9.3.5 Chrome: 83.0.4103.122 Node.js: 12.14.1 V8: 126.96.36.199-electron.0 OS: Linux x64 5.4.0-62-generic Calva v2.0.155
I'm not a native speaker and maybe dont know about outside of dictionaries accents of some english words. But "Better Than Tomorrow" sounds contraversaly ) I remember good old days when I switched to Calva from Emacs and it was like a holiday ) But later cames gui-repl with bugs and without ability to return to good terminal-based. Now it's a third repl, better than that gui but worse than first terminal-like. And newcoming lsp. I renamed file and disabled it, for the first look there are no freezes but I had no time to check all. I understand the reasons of lsp and calva. But on my long calva usage I'm afraid, that every time moment I can say, that current state of things is "Better Than Tomorrow" (((. I dont want to switch back to Emacs, I like VSCode and fact that Calva is free, but maybe keep it as it is, for preventing fact, that yesterdays one was better?
Sounds interesting, dont know how they will work wih updated fresh VSCode, but, thanks, I'l try to get and install old Calva
If you want something more basic, there are also alternatives to Calva, like Clover (which is for REPL over a socket) or another one which is nREPL only.
You can then install the clj-kondo plugin optionally aside from that, if you want linting, or not.
I dont need a lot - I can start repl manually in side terminal, only what I need from plugin - just hotkeys for 3-4 operations - load file, eval expression and maybe that's all
There is also a #chlorine channel which is the same plugin, but for Atom. They share basically the same code.
Maybe it was true for you then, @ivana, that yesterday’s Calva was better than tomorrow’s. 😃
@ivana no, you can’t. And I think you are being rude. People have been working super hard with creating and improving clojure-lsp.
https://twitter.com/pcalcado/status/1354813122742079491 (unrelated to prior discussion which I didn't read yet, until now)
Apropos the discourse on open source community etiquette, I think this is the best piece ever, by margins: https://www.youtube.com/watch?v=GXgbV7jB_Bc
10x, my Mac CPU is staying in 100% for hours until reboot due to some Java process related to LSP server. Disabling for now
That is the latest Calva. Do we know if there are performance issues with the latest versus previous couple of versions?
clojure-lsp has a xmx of 2GB, lowering that may affect users with huge projects, not sure the best way to handle that
we already made a lot of improvements like use just clj-kondo to analysis and batch analysis classpath which reduced a lot the memory usage last week release, more info here: https://github.com/clojure-lsp/clojure-lsp/issues/268
It works nicely when I open projects. And it starts much faster than it used to. Haven’t noticed much CPU or RAM usage either, but I have a pretty decent machine so maybe not the best test subject for the issue.Still, I’m thinking it could be specific to certain platforms.
Also, what probably is much worse than some temporary heatage is the reported freezing of the UI. Which sounds like a Calva issue to me, rather than a clojure-lsp one.
Here we have one local mem "works on my machine" as a developers answer on customers issue. Do you have such mem in Sweden? 🙂
Could be an issue with specific OS's or specific JDK versions. That could be hard to track down, but we can start here: https://github.com/BetterThanTomorrow/calva/issues/990
I put it in the Calva repo because we don't know for sure if it's not specific to Calva (at least some symptoms), and because Calva users may find it more easily
Re: recent "remove lsp" I think I'm seeing "extra fan hurling" on my antique laptop; only on first run though, it's fast after (probably cache build).
And if you can figure out at which Calva version it started to happen: golden stars in heaven for you (as we say in Sweden).