Fork me on GitHub
Kelvin Mai01:02:04

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

❤️ 5

@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


Here is a quick Calva user guide I've created for those new to programming at our ClojureBridge event this weekend.


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)


@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.


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.


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.


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


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. 😞


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


@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.)


Autoconnect can be diabled in settings.


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


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


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


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


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!


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


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


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 ;


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


Yeah, but only using single ;


What's the difference, anyway?


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


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


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.


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


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


Looking forward to the feedback from those students!


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.


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


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


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


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


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


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


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

👍 5