Fork me on GitHub
#calva
<
2020-03-11
>
Akash10:03:42

Hi I recently started using using Calva for clojure. Its fantastic. I wanted to know if there is a way (shortcut) to get back to the previous commands in repl ?

pez10:03:30

Welcome, @akash.chakresh, and thanks!

pez10:03:41

Do you mean the REPL Window? Then the alt+up should work if you have multiline keybindings. Otherwise just up.

pez10:03:27

Also note that if you instead of the REPL window use the editor for your REPL-ing, then you wouldn't have the problem to begin with. 😃

Akash10:03:59

I’m using calva repl in vscode. That’s not what you suggest?

pez11:03:30

Not sure what that means... What I do is that I evaluate things in the editor, not at the REPL prompt. See https://calva.readthedocs.io/en/latest/try-first.html

Akash12:03:45

Okay. Gotcha.

Akash10:03:51

Hi Peter. Thanks a lot. alt+up worked. Where do I see all the shortcuts :thinking_face:

pez11:03:02

There is only one shortcut you need to remember, the one to bring up the Command Palette. From there type Calva and all Calva commands are visible, with their shortcuts. You can also check the Feature Contributions tab of the Calva extension (from the Extensions view). I wrote some about this here: https://calva.readthedocs.io/en/latest/finding-commands.html

pez11:03:36

New VSIX built for the soon to be released formatting configuration: https://4547-125431277-gh.circle-artifacts.com/0/tmp/artifacts/calva-2.0.81-wip-cljfmt-config-f62db0d1.vsix Main difference is that now you can have the config file outside of the project directory. Might be useful for some, and not for others.

👍 8
tjb15:03:45

hey everyone! love the extension and being able to use VSCode + Clojure has really helped me focus on learning clojure and not learn some new tooling. on that note, i have had issues with the intellisense not kicking in…i am currently not at my personal laptop to debug but curious if anyone else has had issues with the intellisense before?

👋 4
pez15:03:30

Hello @tjb, welcome!

tjb15:03:59

i have also noticed i cannot cmd+click a function to jump to that function…is that possible with calva?

tjb15:03:19

high probability: im dumb and it is mentioned in the docs somewhere 😛

pez15:03:31

Those problems usually mean you don't have the right dependencies loaded in the REPL server. So might come down to how you connect to Calva to the project. Can you describe?

tjb15:03:15

what i usually do is boot up my vscode, go to the bottom left and connect vscode to the REPL (if im describing things correctly).

tjb15:03:29

i am also make a video later tonight to describe it better

pez15:03:59

I think I get it. So you have the REPL running already?

tjb15:03:12

i boot up the repl via vscode

pez15:03:25

Is it feasible to you to let Calva start the REPL?

tjb15:03:38

i believe that is what i am doing let me check this doc to confirm

tjb15:03:48

yes! this is what i am doing

tjb15:03:02

Calva boots up the repl for me

pez15:03:47

Hmmm, then it should work (including cmd-click)...

tjb15:03:01

let me try again tonight (i am in the usa) and make a screen capture of what i am encountering

tjb15:03:03

maybe that will help!

pez15:03:54

That might help.

pez15:03:04

What kind of project is it?

tjb15:03:11

just a personal web app 🙂

pez15:03:28

Figwheel? shadow-cljs?

tjb15:03:37

neither?

tjb15:03:40

i am p new to clojure

pez15:03:46

Interesting. 😃

tjb15:03:46

i use lein to start the proj

pez15:03:10

So you tell Calva it is a Leiningen project?

pez15:03:23

It is not ClojureScript, I gather?

tjb15:03:35

ah yes correct it is not clojurescript

pez15:03:52

Then this should totally work even more.

tjb15:03:54

oh maybe that is my issue! not telling Calva that i am using leiningen?

pez15:03:34

When you Jack in, Calva should ask you for the project type. And it should see that it could be a Leiningen project and offer you that option.

tjb16:03:10

hmmmm ok i usually follow the steps that are on the screen so perhaps i am doing that already

tjb16:03:15

then i opt-out of Jack-In

pez16:03:38

opt out? How?

tjb16:03:57

right? you can select to use jack-in or not?

pez16:03:38

Yes, and the terminology here is ”to let Calva boot your REPL == Jack in" 😃

‼️ 4
pez16:03:49

So maybe you do not let Calva do it.

tjb16:03:58

ahhhhh ok

pez16:03:40

Now I think you might be equipped with the knowledge to get it to work. 😍

pez16:03:10

So do not start your REPL using lein. Use jack in.

tjb16:03:17

yes i believe so! i will post and update tonight if i am able to make it work

pez16:03:49

Post regardless. Hopefully someone will be in your TZ and can help if it still is not working.

👍 4
tjb16:03:24

INTERESTING! it does work on this mac

tjb16:03:30

but on my ubuntu machine i was having issues

tjb16:03:34

ok i will investigate more tn

pez16:03:06

Great. Could be an issue on ubuntu of course. That has happened before.

pez16:03:41

But I don't think it should be general, and we can probably find the culprit.

pez21:03:28

Your emojis are wanted here, Calva-friends. 😃

✔️ 8
calva 8
😃 8
👌 8
😁 8
😂 8
erwinrooijakkers14:03:54

Great. Is this similar to Emacs Cider’s formatting (https://github.com/bbatsov/clojure-style-guide#body-indentation) taking note of special forms and certain macros with body params? E.g.,

;; good
(when something
  (something-else))

;; But also,
(defmacro my-own [& body] 
  (do ~@body))

(my-own 1
        2
        3)

erwinrooijakkers14:03:56

Ah I see you can pass metadata param as well

(defmacro my-own
  {:style/indent 1}
  [& body]
  (do ~@body))

(my-own 1
  2)

pez15:03:52

We're not honoring the cider indent spec atm. I am not sure how to do that. Maybe something that cljfmt needs to do...