Fork me on GitHub
#calva
<
2019-12-18
>
Adrian Smith20:12:10

is anyone successfully using calva with vim keys?

pez20:12:28

@sfyire have you read the doc page about it? Not meant as an RTFM, just checking.

Adrian Smith20:12:55

yeah looks like "Remap Calva’s `clearInlineResults` " has helped I didn't initially see how it was breaking what I was trying to do

alidlorenzo21:12:53

what counts as clojure cli option when starting a repl? all I have is a deps.edn file (not using lein or boot) what else do i need for it to work? right now the connection just hangs and never opens

pez21:12:16

@sfyire does that mean you are now successfully using Calva with the VIM extension?

pez21:12:24

@alidcastano That should work. Can you describe a bit more about your project and the steps you take to jack-in?

Adrian Smith21:12:39

@pez yes, I'm trying atom at the moment because vscode's parinfer doesn't interact well with vim, trying to see if I can move away from Cursive for teaching purposes

alidlorenzo21:12:28

it's just a fresh project with a deps.edn file, tring to use it for a datomic api

pez21:12:10

@alidcastano , and can you describe the steps you take in trying to connect?

alidlorenzo21:12:18

open up project in vscode (no workspaces) > run calva start connection > clojure cli anything else I should be more specific about? i just started this prooject but here's my deps

{:paths ["src" "resources"]
 :deps {com.cognitect/anomalies {:mvn/version "0.1.12"}
        com.datomic/client-cloud {:mvn/version "0.8.81"}
        com.datomic/ion {:mvn/version "0.9.35"}
        org.clojure/clojure {:mvn/version "1.10.1"}}
 :mvn/repos {"datomic-cloud" {:url ""}}}

pez21:12:28

parinfer and vscode… 😞

pez21:12:20

Calva tries to compensate with a good Paredit: https://calva.readthedocs.io/en/latest/paredit.html

pez21:12:38

@alidcastano what do you do to “run calva start connection”?

alidlorenzo21:12:16

open up command menu and look for the "start calva repl" option

pez22:12:23

Calva: Start a Project REPL and Connect (aka Jack-in) ?

alidlorenzo22:12:45

sorry i was abbreviating it 😅

pez22:12:06

Haha, no problem, I just need to know the specifics. Can you share the project on github? Maybe that is the fastest way I can check what is going on….

alidlorenzo22:12:38

there's not much too it yet, basically a fresh setup. just this deps.edn file

(ns resoflect.core
  (:require [datomic.client.api :as d]))

(def cfg {:server-type :ion
          :region "us-east-1"
          :system "resodb"
          :creds-profile "default"
          :endpoint ""
          :proxy-port 8182})

(def client (d/client cfg))
and this src/example file
(ns example.core
  (:require [datomic.client.api :as d]))

(def cfg {:server-type :ion
          :region "us-east-1"
          :system "example"
          :creds-profile "default"
          :endpoint ""
          :proxy-port 8182})

(def client (d/client cfg))

alidlorenzo22:12:23

i can ofc share it but idt it's anything speccific to my setup, I was maybe wondering if I was missing a dependency that calva uses to start the repl server

alidlorenzo22:12:41

but connecting to repl via clojure command and loading namespace manually and everything works

pez22:12:10

I do not see anything specific, and Calva should be injecting the dependencies it needs.

alidlorenzo22:12:07

the clojure cli calva repl works for you on your machine?

pez22:12:56

So if I do:

clj -A:new app pez/fresh-deps

pez22:12:31

then open that project in Calva and jack-in, selecting no aliases, Calva just starts the project and connects.

pez22:12:42

What OS are you using?

pez22:12:22

What messages do you get, in the terminal, jack-in process, and in Calva says?

alidlorenzo22:12:04

calva says stays at

Jacking in...
im using macOS

alidlorenzo22:12:19

that command doesn't work for me clj -A:new app pez/fresh-deps

alidlorenzo22:12:34

maybe im missing a global dependecy

pez22:12:57

What do you get in the jack-in terminal?

alidlorenzo22:12:22

what'st he jack in terminal? only other thing i see is the statusbar that says "launching repl using clojure cli"

alidlorenzo22:12:58

my regular terminal doesn't have anything cause im not running anything on it

pez22:12:54

The jack-in should start in a VS Code terminal.

pez22:12:45

You get the drop down menu where you can choose Clojure CLI, right?

alidlorenzo22:12:54

yea, but I guess that jack-in part isn't occuring for me

alidlorenzo22:12:07

tried closing terminal to see if having it open was effecting things, but nothing

alidlorenzo22:12:19

ooh maybe because i configured* a custom terminal setup

alidlorenzo22:12:59

or iterm2 i guess it would be

pez23:12:11

I don’t think it should matter what terminal you have. This should happen in an integrated terminal inside vscode.

alidlorenzo23:12:21

created project with command you posted above, and ran same steps, same issue so yea only thing i can think of is the terminal configuration

pez23:12:26

can you do a quick Zoom so we can look at it together?

pez23:12:30

Another thing you can try is to start the repl from the terminal yourself and then use the Calva connect command. This command should be what you need to start the REPL:

clojure -Sdeps '{:deps {nrepl {:mvn/version "0.6.0"} cider/cider-nrepl {:mvn/version "0.22.4"}}}'  -m nrepl.cmdline --middleware "[cider.nrepl/cider-middleware]"

alidlorenzo23:12:00

just seeing this, tried the snippet below and that works - I was able to connect

alidlorenzo23:12:28

so i guess something is interfering with jack-in process

pez00:12:19

Yeah. I do wonder what that could be….

pez00:12:09

Can you file an issue about it? Use the Report Issue command in the VS Code help menu, which will include version details. Include a small repro and the info about connect working.

alidlorenzo01:12:34

ok here you go: https://github.com/BetterThanTomorrow/calva/issues/526 thanks for taking time to try and resolve issue

alidlorenzo01:12:32

also can ofc schedule a Zoom chat if you think that would help. but happy to just start repl manually and connect for now that you showed me how

pez09:12:24

The Zoom would be more for my sake. 😃 I doubt I can help you during the session, but I would like to get a better idea about what could be going on.

pez09:12:29

I’ll have some time during the x-mas holidays . Hopefully we can find a common slot.