Fork me on GitHub
#calva
<
2021-10-26
>
Juλian (he/him)06:10:45

is there a way to disable the use of clojure-lsp in Calva?

pez07:10:31

No, not currently.

Juλian (he/him)07:10:23

okay, will set the path to /usr/bin/false until I've built my own clojure-lsp

pez07:10:17

Yeah, that is a way. Calva isn’t really prepared for it though, so there might be dragons.

Tomas Brejla21:10:19

Woud you share with us the reason why you want to disable it @U020G9UCM1N? Anything specific not working for you?

Juλian (he/him)08:10:11

the bundled binary is amd64 and there is no 32 bit armv7 binary. the embedded JAR release of clojure-lsp requires 2GB of memory and I only have 1GB. Even if I got it running somehow, I doubt it would work properly with so low memory (Calva, the Clojure REPL, and Codium need some, too)

pez08:10:58

Thanks for the clarification! Yes, clojure-lsp has some use cases where it doesn’t reach. @U9A1RLFNV and I have discussed how to support disabling/stopping/restarting and such better. It is a reason I want to keep maintaining code in Calva that does “the same thing” as clojure-lsp provides. It is a lot of “extra” work, but gets important in cases where clojure-lsp can’t be used. I am not an 80/20 type of guy, i guess. 😃 If there isn’t an issue about disabling clojure-lsp on the repo, please feel invited to create one, @U020G9UCM1N!

Tomas Brejla13:10:20

> there is no 32 bit armv7 binary Interesting. Are you doing some "lightweight" development on a tablet, chromebook or similar? I always wanted to know some real-world experience from someone who's using those devices this way. As far as I know, 32bit native image simply cannot be generated as GraalVM's native-image tool doesn't support that 32-bit target. And that's probably not going to change anytime soon. While I understand the need for disabling clojure-lsp completely (well, why not if some people want it that way in order to have lightweigh editor), my question would be : does "non-native" clojure-lsp really require 2GB? If so, why? Isn't there some option (such as those -Xmx, -Xms jvm flags) to limit that amount of memory to reasonably small amount?

bringe00:10:21

@U01LFP3LA6P You can find a discussion about clojure-lsp’s memory usage here: https://github.com/clojure-lsp/clojure-lsp/issues/229

👏 1
Benjamin07:10:40

I saw once there is this online vscode github thing. What would be super cool is to give a link to a noob and then be able to pair program with them developing some website. Preferably 1 account would have vim bindings and the other doesn't. Is there something that makes this possible?

pez07:10:16

With Codespaces you should be able to just do it. Assuming LiveShare works there, but I think it does.

pez07:10:56

The vscode.dev thing is a VS Code “light” and Calva doesn’t work there.

pez07:10:45

There is also Gitpod. Which is used for this thing: https://calva.io/get-started-with-clojure/

pez07:10:42

All that said, if the noob has VS Code, you can send them a LiveShare link w/o using any web versions. See https://calva.io/live-share/

Benjamin07:10:43

ah that sounds awesome thanks

Hukka09:10:58

Talking about share, http://vscode.dev is super annoying. Now all liveshare links open there and it takes 10 times as much clicking to get a calva share going by using the menus and pasting

introom14:10:18

When I jack in, how can I make Calva aware of my ~/.clojure/deps.end profile along with the project ones?

pez14:10:42

You can’t. But you can make Calva offer you to use any alias with calva.myCljAliases setting. See https://calva.io/connect/#customizing-jack-in

pez14:10:11

Do you need anything beyond that?

introom15:10:18

Seems working.

introom15:10:45

Just to confirm, I only have to add the aliases defined in my ~/.clojure/deps.edn to myCljsAliases.

introom15:10:54

Why do we need this extra step?

pez15:10:28

Because Calva does not read the user deps.edn. You are welcome to make it do that. Would be nice!

sparkofreason14:10:45

Connecting to a generic nrepl via calva, get a blank line when I try to print the last stack trace. Is there some setting I'm missing?

pez14:10:10

Depends on how generic. Are the Calva dependencies available on the server?

pez15:10:47

Are you trying to print it using the code lense (the button) in the output window, btw? Otherwise it is probably not about Calva dependencies.

sparkofreason15:10:01

I'm using the Calva command. Not sure about the dependencies, but it's a local dev environment. Is there something I'm supposed to add to my project?

sparkofreason15:10:16

I can see the stack trace by evaluating *e in the REPL.

pez15:10:29

Calva depends on cider-nrepl. There is a command for copying out the command Calva would use to start the project. Copy jack-in something something. It will show you which dependencies.

pez15:10:14

(Unless the the command-line you copy out above is fine for you.)

sparkofreason15:10:50

That did it, thanks. Was using the wrong alias to start the repl from the practicalli deps.edn.

pez15:10:25

I’m happy it’s working now!

1