Fork me on GitHub
#calva
<
2019-02-28
>
Kelvin Mai01:02:04

I'm glad my little video and your extension are bringing more people into clojure land 🙂

❤️ 5
pez05:02:12

@jacobhaag17 , that's weird and probably a bug. Can you reproduce/isolate it with a test where you can share the code?

Jacob Haag18:02:47

I will some time today and get back to ya

practicalli-johnny13:02:38

Here is a quick Calva user guide I've created for those new to programming at our ClojureBridge event this weekend. https://clojurebridgelondon.github.io/workshop/development-tools/editor-guides/vscode-calva.html

practicalli-johnny13:02:18

I would appreciate any feedback and corrections for anything I got wrong. I may remove the structured editing section and just link to the Calva paredit webpage (which is nicely written)

wekempf13:02:50

@jr0cket "Add Clojure Project to Atom" Should this be "Open Project Folder in VSCode"? It also seems backwards to me to open the terminal before opening the project? If you open the project first, when you open the terminal you shouldn't have to cd into the project folder as you'll already be there.

practicalli-johnny13:02:58

I seem to get prompted for a REPL connection when opening a clojure project, or specifically a file. This is why I changed the order. I am trying again on a clean machine (testing windows) to see if I get the same effect. Otherwise, I would agree the order you mention is more logical.

wekempf13:02:09

AFAIK Calva doesn't try to connect until a Clojure/ClojureScript file is opened. In that case, I don't get prompted for anything, but the status bar shows the attempt and eventual failure to connect. I can then follow your instructions and connect with Ctrl+Alt+V, c.

pez13:02:19

I think the autoconnect feature should be called into question. 😃

wekempf13:02:47

It would be interesting if the "autoconnect" feature could launch a new terminal and spin up the REPL. Of course, since there's different ways to start a REPL you'd have to define how this is done in a local config file or something. 😞

practicalli-johnny13:02:37

auto-connect seemed to be popping up quite a bit. I will see if its still doing the same on the other machine....

pez13:02:48

@bill.kempf we are working on a jack-in feature that will help you launch the repl with correct dependendencies and such. Scroll up in this channel and you'll find a preview VSIX file with jack-in enabled. (It is not a release candidate, because lacking some key features, but works for plain projects.)

pez13:02:06

Autoconnect can be diabled in settings.

wekempf13:02:11

@pez can comment. There may be a reason you get popups and I don't. But I've just verified behavior on my machine.

pez13:02:56

@jr0cket, nice guide! Will you make sure the project has the needed dependencies?

practicalli-johnny13:02:20

Oh, didnt I add that... ooops.... I will add after opening the project

pez13:02:09

As for ctrl+alt+v e it will evaluate the ”current” form. Be it before, under or after the cursor.

pez13:02:31

Maybe also mention that forms directly inside a (comment) form will be considered top-level by the Evaluate top level form commands. I (ab)use that feature a lot!

practicalli-johnny13:02:15

Ah (comment), yes, had some fun with that in CIDER too. I switched to #_ for commenting expressions personally, but useful to include. Thanks

pez13:02:09

Calva should handle #_ the same. That's probably a really easy fix.

practicalli-johnny13:02:03

Probably missing something, but is there a keybinding to toggle comment / uncomment a line with ;;. I use C-k C-c but it only seems to uses a single ;

pez13:02:34

I think the vscode commands Add/Remove/Toggle comment works for that...

pez13:02:59

Yeah, but only using single ;

pez13:02:08

What's the difference, anyway?

practicalli-johnny14:02:04

Single quote is typically used for a comment at the end of a line of code. Double quote is used to comment out a whole line or a comment line. So usually used as: ;; This is a comment on a line by itself (def mol 42) ; A comment of a particular line

practicalli-johnny14:02:39

Its part of the Clojure style guide, but as with all things is open to interpretation 🙂

practicalli-johnny14:02:51

Thanks everyone for your help. I'll let you know what sort of feedback we get from the students this weekend and will go see if I can add anything to the official docs early next week.

pez14:02:11

Seems clj-fmt doesn't honor that single-`; ` comment style

pez14:02:32

Is ctrl+k ctrl+o a standard key binding? It's cmd+o on my machine.

pez14:02:49

Looking forward to the feedback from those students!

practicalli-johnny15:02:04

I have made all the changes to the guide and a found a few extra things to add for Windows. I thought I had hit a block on windows until a config button for the built-in terminal popped up and let me change to GitBash shell (I had problems getting Leiningen working on Windows 10, wouldnt do the self-install) so installed the lein script to run in GitBash.

practicalli-johnny15:02:42

I am not seeing side-effect output like println in the REPL window. printlin does return nil as a result inline

practicalli-johnny15:02:33

I dont know what is standard keybindings for VScode or Calva... yet. I should know more by Sunday 🙂

pez16:02:33

The side-effects thing is a known problem. It works in the new repl window (testable with that vsix file a few screens up).

practicalli-johnny16:02:17

Thats okay... it all works in the repl... Just testing out the experience now it all works 🙂

pez16:02:58

About the keybindings. Maybe not instruct to use ctrl+k ctrl+o. On my machine ctrl+k is pretty destructive. 😃

practicalli-johnny16:02:22

Yes, may have to duplicate instructions for Mac and PC (`cmd` vs ctrl), but this is same with other editors too...

pez16:02:26

You always have the option to not mention some shortcuts. 😃

👍 5