Fork me on GitHub
#calva
<
2023-11-11
>
Christer Nilsson20:11:13

New to Calva. I can't get rid of three clj files, when starting Calva. One of them is hello_repl.clj

pez20:11:44

Hi! Welcome to Calva! calva You don’t need to start Calva. Do you mean the three files that open when you run the command Fire up the Getting Started REPL?

Christer Nilsson21:11:57

Exactly them, yes.

Christer Nilsson21:11:27

How do I know Calva is started? I see no indicator.

pez21:11:25

Calva activates when there is Clojure project files in the folder that it opened in VS Code. You will see a REPL button to the left in the status bar.

pez21:11:12

If you are new to Clojure: Here’s a minimal get started project, with some links in the readme to more beginner resources: https://github.com/PEZ/clojure-get-started-mini

Christer Nilsson21:11:58

Is the white dot in front of clojure-lsp the indicator?

pez21:11:04

Sort of. If you see that, then Calva is started. To the left of that you should also see the REPL-button. These buttons show up when the Calva extension activates. Then you should connect the REPL. Do you have a Clojure project you want to work with?

pez21:11:14

When you have connected the Calva to a REPL, the REPL button should turn orange.

Christer Nilsson21:11:17

I have to execute the Calva Command to see REPL. And then the three files show up.

pez21:11:01

Ah, but that is because it starts a Getting Started REPL. It is not the command to connect the REPL to your project.

pez21:11:26

Here’s a page about connecting the REPL: https://calva.io/connect/

Christer Nilsson21:11:53

I don't know the difference between babashka, nbb and joyride. (for project type)

pez21:11:47

If you use the minimal project I linked to above, then you should select deps.edn as the project type.

Christer Nilsson21:11:55

I don't think I have seen an deps.edn alternative. I can't see such a file either.

Christer Nilsson21:11:30

Atm I'm doing 1. Click Joyride, 2. Click REPL 3. Start Joyride.

pez21:11:32

Joyride is for scripting VS Code. You need the Joyride extension for that. (I think you should be alerted that the extension is needed, but I could be wrong.)

pez21:11:31

The minimal project, I link to it again: https://github.com/PEZ/clojure-get-started-mini has a Usage section telling you about the requirements and how to start the REPL.

Christer Nilsson22:11:05

Thanks a lot, I think the mini-project solved my problems!

🙏 1
Christer Nilsson22:11:43

Is it possible to see the values of all subexpressions simultaineously?

Christer Nilsson22:11:43

Like: (comment (* 2 (+ 3 4) # 12 ) # 14 )

pez22:11:38

The command you have for something like that I’d say are two: • Evaluate Current form • Evaluate To Cursor It’s a bit hard to explain in text here. If you have time for a video chat we can do a quick huddle if you like?

pez22:11:37

Here’s a video, it’s subtitles with the commands I use. Don’t know how easy it is to follow.

Christer Nilsson22:11:25

I think I cna see both 12 and 14 using ctrl+Enter, but not at the same time. This will do for tonight, thanks a lot!

🙏 1
pez22:11:56

I don’t get where you see 12, but we can sleep on it. 😃

Christer Nilsson21:11:19

Haha, I was quite tired... My tab key is not working. I would like to keep the tabs and have a size of 4 spaces. Do I have to change something in code, clojure, calva or parinfer? Tabs are working to my desire in other files, like python, coffeescript and others.

pez22:11:43

You can unbind the tab key, which Calva uses as the shortcut for formatting code the Clojure way.

Christer Nilsson22:11:48

I have no clue where to do that.

pez22:11:18

In VS Code’s keyboard shortcut bindings. There’s a command for opening them in a an editor view: Preferences: Open Keyboard Shortcuts

Christer Nilsson20:11:47

They are very good files, but I do not read more than once.

🧵 1
pez23:11:35

Dear Calva friends, here’s a dev version of Calva that can connect to the #C03U8L2NXNC nREPL server, which was just released. In the process I fixed some other issues with how Calva evaluates things and navigates namespaces. So it would be great if you tested that this Calva works with your projects. It should, but I could have missed something in my testing, of course. • https://output.circle-artifacts.com/output/job/800fdb10-a096-4c9e-8382-2463d58d86d5/artifacts/0/tmp/artifacts/calva-2.0.395-2343-squint-nrepl-c3b96003.vsix, download and from the VS Code Extensions panel, select Install from VSIX… from the top meatballs menu. (Make sure it was downloaded with the .vsix file extension. If not change .zip to .vsix.) Thanks in advance for any help testing! 🙏 ❤️ calva

pez10:11:18

I don’t know why, but often when downloading the .vsix, it gets saved as .zip